     }((dd1c82af35290ac7302de2dec50fc1da492760b7}(sha(dd1c82af35290ac7302de2dec50fc1da492760b7node_idEC_kwDOAHoJt9oAKGRkMWM4MmFmMzUyOTBhYzczMDJkZTJkZWM1MGZjMWRhNDkyNzYwYjccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(hFabian Stäberh
fabian@fstab.deh2023-08-29T19:22:43ZumessageAdd OpenTelemetry Exportertree}(h(60f4fe6491dc7a5d02a3a298bd324f232af2db9furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/60f4fe6491dc7a5d02a3a298bd324f232af2db9fuhhhttps://api.github.com/repos/prometheus/client_java/git/commits/dd1c82af35290ac7302de2dec50fc1da492760b7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuhdhttps://api.github.com/repos/prometheus/client_java/commits/dd1c82af35290ac7302de2dec50fc1da492760b7html_urlYhttps://github.com/prometheus/client_java/commit/dd1c82af35290ac7302de2dec50fc1da492760b7comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/dd1c82af35290ac7302de2dec50fc1da492760b7/commentsh	}(loginfstabidJ' hMDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_id h"https://api.github.com/users/fstabh'https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuh}(h,fstabh.J' hMDQ6VXNlcjMzMDUzNQ==h02https://avatars.githubusercontent.com/u/330535?v=4h2h3h"https://api.github.com/users/fstabh'https://github.com/fstabh6,https://api.github.com/users/fstab/followersh89https://api.github.com/users/fstab/following{/other_user}h:2https://api.github.com/users/fstab/gists{/gist_id}h<9https://api.github.com/users/fstab/starred{/owner}{/repo}h>0https://api.github.com/users/fstab/subscriptionsh@'https://api.github.com/users/fstab/orgshB(https://api.github.com/users/fstab/reposhD3https://api.github.com/users/fstab/events{/privacy}hF2https://api.github.com/users/fstab/received_eventshHUserhJuparents]}(h(97cfe5accbf64cba792cdc32a524244f71a66086hdhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086h'Yhttps://github.com/prometheus/client_java/commit/97cfe5accbf64cba792cdc32a524244f71a66086uastats}(totalM	additionsM	deletionsM`ufiles](}(h(ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedhdKheKchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7patchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(h(bbe7aab8ad67d7ecfec27072a34f33936d1c1953hj2examples/example-exemplars-tail-sampling/README.mdhlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(h(ed293444607ffb9985c6670a77cc6042b9f84eddhj<examples/example-exemplars-tail-sampling/docker-compose.yamlhlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(h(81c6d573c5f3130cacfdc28c011a18a260bcd288hjIexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlhlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(h(e91ade6aceaf818d176460321559b0b310dcab3dhjHexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlhlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(h(8bdf213ec9a35830a610393c3496be82b3232d26hj.examples/example-exporter-httpserver/README.mdhlrenamedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2FREADME.mdhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2FREADME.mdhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(h(a425c326850318d40de104ce142b72d365af6c29hj,examples/example-exporter-httpserver/pom.xmlhlrenamedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>h#examples/example-httpserver/pom.xmlu}(h(0563d583a93f32d63b484dd0d677f75db81927cahjfexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javahlrenamedhdK heK hnK hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javahshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7h]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(h(1b95eccc2632c79e6f0939feae3e6d938b8b4f45hj1examples/example-exporter-opentelemetry/README.mdhladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2FREADME.mdhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2FREADME.mdhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(h(923840e0c85a643976792d88e8dff7c10d446ceehjBexamples/example-exporter-opentelemetry/config/otelcol-config.yamlhladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(h(e5d4e01d34dddbb87f4b134cd16c60909caf63afhj>examples/example-exporter-opentelemetry/config/prometheus.yamlhladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -0,0 +1,6 @@
+global:
+  scrape_interval: 10s
+scrape_configs:
+  - job_name: "prometheus-direct"
+    static_configs:
+      - targets: ["localhost:9400"]u}(h(b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5hj;examples/example-exporter-opentelemetry/docker-compose.yamlhladdedhdK$heK hnK$hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(h(ba0a58f2101902c5eaca8d6eb7b54ce20e9abcfchj/examples/example-exporter-opentelemetry/pom.xmlhladdedhdKLheK hnKLhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXx  @@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(h(adde09b848ce7d6bc5d2539581bcd764f69bd272hjlexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javahladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javahshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,137 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import com.sun.org.apache.bcel.internal.classfile.Unknown;
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.proto.metrics.v1.internal.Sum;
+
+import java.util.Random;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        targetInfo.setLabelValues("1.0.0");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(h(8d50c0c80603d5469a7144bac6387c8bff45e75bhj2examples/example-exporter-servlet-tomcat/README.mdhlrenamedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.h)examples/example-tomcat-servlet/README.mdu}(h(aa89bfc43d3859d5988d9fa2ac2fd1376980dd97hj0examples/example-exporter-servlet-tomcat/pom.xmlhlrenamedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>h'examples/example-tomcat-servlet/pom.xmlu}(h(7a95e36da299e8ce780ea5f0d2f2751765754afchj{examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javahlrenamedhdK heK hnK hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javahshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hrexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(h(571e55a2b5d259f0401a881e9631fa0acce8e791hjnexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javahlrenamedhdK heK hnK hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javahshttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7heexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(h(6535b05e1474660627803d1962e85282e910cf9dhjexamples/pom.xmlhlmodifiedhdKheKhnKhojhttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fpom.xmlhqihttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/examples%2Fpom.xmlhs|https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(h(9cd27a42c58845389736906bc49d2160af05792fhjintegration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javahsX  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(h(b46c112af431ec1a41165983f476978e4d0a654ehjintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javahlmodifiedhdKheKhnKhoX  https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javahqX
  https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javahsX   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(h(9a44b01535c57c14d4ace04dd1c4e716316c7c32hjintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javahlmodifiedhdKheKhnKhoX  https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javahqX  https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javahsX#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(h(ba5d97577739137181a6d15e70170bba6923ecc0hjpom.xmlhlmodifiedhdKheKhnKho_https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/pom.xmlhq^https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/pom.xmlhsqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(h(6d06746f76a09f4d3be70c7bf19de87731cf51a5hjfprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javahlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(h(66ed3633b53aa109119a31abbd0e7ed1828a1eb4hjiprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javahladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(h(4707dd862b1a6956db02a8ea544b5f7d4c9cdfdchj^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(h(c4a09be7b8ca24e342cd99173c0a8674e703cb60hjdprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(h(5b3f97252da66db1d71c3bf0f0434788f9a9e6e3hjNprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javahlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(h(ea32a6ccacc2f3a8b2040d1a91a98369337b4770hjBprometheus-metrics-config/src/test/resources/prometheus.propertieshlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertieshqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertieshshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(h(acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99hjRprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javahlmodifiedhdK&heKhnK4hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(h(d324a2700c70b915e444403f75a9c17c96e70bbfhjTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(h(a1c1769d98559841ca83eb49e1ca2977e32e6114hjeprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javahlmodifiedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u<     }(h(035f2133482078e18c05d544d2633b8ade9d8bebhjYprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(h(48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980hj[prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(h(c6d5b7719d02f25c2a8635bcc774374e4f552b97hjVprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javahlmodifiedhdKRheKhnKThohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(h(6b5266962f80db0e582089efb438621100a5ce92hj1prometheus-metrics-exporter-opentelemetry/pom.xmlhladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(h(ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javahladdedhdMheK hnMhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u}(h(1f38e66e229b1affd0ba181ec4ff285e3e71bcadhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javahladdedhdK heK hnK hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(h(111e288b6fbb92f184c092cefd60615e80d45aa0hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javahladdedhdKWheK hnKWhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        MetricSnapshots snapshots = registry.scrape(); // TODO: Filter
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i=0; i<labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(h(c4319b7fc6bb838489686542d8817d5c53daad94hj|prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javahladdedhdK"heK hnK"hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(h(053c2b53ab0a361d01905748b8e4445d725b3e63hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javahladdedhdK
heK hnK
hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javahsX   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(h(093b3b44dc76bd71ffb168b5a87b471c2699ef06hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javahladdedhdK<heK hnK<hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(h(fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javahladdedhdKWheK hnKWhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(h(6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javahladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(h(d365c26fb4969d38448d8e1bd702b7e55e061b2ehjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javahladdedhdK.heK hnK.hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(h(86d56d2d79c660d5d01c2802f73e94787343c22ehjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javahladdedhdKUheK hnKUhoX  https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javahqX   https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u     }(h(7908bee2ba3c186de26199f194bdde88245a9b3fhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javahladdedhdKDheK hnKDhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(h(3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javahladdedhdK=heK hnK=hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(h(a0b4aed8397b8eac69d32d28215f110df28b893bhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javahladdedhdK+heK hnK+hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(h(a6d4d38306bfcadc9a3f139d83c0672bda6df4d2hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javahladdedhdKPheK hnKPhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(h(883b06e08475fcbe0e3464b61fa883d3db0a28d1hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javahladdedhdK1heK hnK1hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(h(353a1623c7ae3932afa295452af773fa7d9aecdbhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javahladdedhdK:heK hnK:hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javahsX   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(h(16c307059c9e17bbe682b5f0b35b72b6a2b69d77hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javahladdedhdK&heK hnK&hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(h(0dce35fa640fb1e114f86e0bfc229347a8d616dehjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javahladdedhdK1heK hnK1hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javahsX   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(h(ddf2160d04ae48dbdec91f99d371475820c13180hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javahladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(h(7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javahladdedhdKWheK hnKWhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(h(3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ehjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javahladdedhdK5heK hnK5hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(h(9b2f53c1255abbda709af7892125aa70ba69f819hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javahladdedhdK+heK hnK+hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(h(930715492a4380a13a088d728e21b7460031bb2chjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javahladdedhdK%heK hnK%hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(h(0e9c61c1f039218ae47e778f137078dcd1ed1cbdhjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javahladdedhdK)heK hnK)hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(h(fafc2be77024fc40abd2d2e78abe8864b891c438hjprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javahladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(h(f5d86ba1f71fd7393035dff48f730aca3caea09ehjeprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertieshladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertieshqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertieshshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(h(d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105hjKprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorehladdedhdKheK hnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorehqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorehshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -0,0 +1 @@
+*.jaru}(h(24a9f8dffef1509961ecdc2e2deee91f7072c264hj:prometheus-metrics-exposition-formats/generate-protobuf.shhlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(h(a8eef2c7a6358645e787ef96c3c16364ed5f2452hj-prometheus-metrics-exposition-formats/pom.xmlhlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(h(d66bf16a8ab922374af7c7723bf3a41c1b7b90a7hjprometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javahlmodifiedhdMheMzhnMhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javahsX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7u}(h(eea5f929a0b4ea14792d7806f6306662879017f8hjyprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(h(e8beeee6cc34e7c8cb4a02386ae20f3488fdf936hjmprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7hu@@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(h(1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9hjEprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protohlmodifiedhdK	heK hnK	hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protohqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protohshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(h(cf6cb09a68200d8a7ee152c58204667a90c06ce1hjvprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(h(6cad6a6a39a5d85d46c0c9ae08240896f2754bbehjhprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javahlmodifiedhdKheKhnKhohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javahqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javahshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(h(b872ee0cefa8765c12f85f4d0580453c1b4de6cchj.prometheus-metrics-shaded-dependencies/pom.xmlhladdedhdK(heK hnK(hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(h(d68cc1c041afdbe3b0e6b071317d9b9a2755e068hjVprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlhladdedhdK~heK hnK~hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u^     }(h(7b0019461389b754822ed106979b1e5c461f8032hjprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javahladdedhdK	heK hnK	hoX   https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javahqX  https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javahsX2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(h(b856ef185427b3939f8b4292d464b4b9f1de817chjQprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlhladdedhdK\heK hnK\hohttps://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlhqhttps://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huX8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(h(3f63392a763257f697e79251d10d442a341fa7eahjprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javahladdedhdK	heK hnK	hoX  https://github.com/prometheus/client_java/blob/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javahqX  https://github.com/prometheus/client_java/raw/dd1c82af35290ac7302de2dec50fc1da492760b7/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javahsX+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=dd1c82af35290ac7302de2dec50fc1da492760b7huXf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(h(b929015f99f5db26a5d2aed1b1bd53518ed59b5chjprotobuf-shaded/.gitignorehlremovedhdK heKhnKhothttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2F.gitignorehqshttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2F.gitignorehshttps://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=97cfe5accbf64cba792cdc32a524244f71a66086hu@@ -1 +0,0 @@
-src/main/javau}(h(5db4149b724982e6ff8f55ae96f4f8a07804d590hjprotobuf-shaded/README.mdhlremovedhdK heKhnKhoshttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2FREADME.mdhqrhttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2FREADME.mdhshttps://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=97cfe5accbf64cba792cdc32a524244f71a66086hu@@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(h(ddfe62d9884175f9b37ea50638f1dcd45dd63c34hjprotobuf-shaded/pom.xmlhlremovedhdK heKhnKhoqhttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2Fpom.xmlhqphttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2Fpom.xmlhshttps://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086huX  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(009222bcb7cece36e9dc6f705b1156424167c1e6}(sha(009222bcb7cece36e9dc6f705b1156424167c1e6node_idEC_kwDOAHoJt9oAKDAwOTIyMmJjYjdjZWNlMzZlOWRjNmY3MDViMTE1NjQyNDE2N2MxZTYcommit}(author}(nameCianShevemail*47430248+CianShev@users.noreply.github.comdate2023-07-06T09:43:40Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-06T09:43:40ZumessageUpdate README.md

Fixed small spelling error in README.md

Signed-off-by: CianShev <47430248+CianShev@users.noreply.github.com>tree}(j  (6bcb8205c9e60f551039f8bb7c5729a829c68efeurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/6bcb8205c9e60f551039f8bb7c5729a829c68efeuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/009222bcb7cece36e9dc6f705b1156424167c1e6
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkpozMCRBK7hj4Ov3rIwAAeqkIAJf1EZA0XzWmLBEdqnuUmMiP
NDW3iMPt4RDR3hIzdAZ3Qe68QIXcJ//T0xNBJ3T1eKsdgBWD1QYFZwQGtc4XSp1/
ybm1t9Y+igGntprmml9M0Unct18i7Tlzr8Trl6n7VWlVp1AauW57+HMBEBvZjaFB
xdy0YtCTFuhnyjApZR1YHesSamh+2vcZ8doLF2zJCHLJM82sz3gAYvKid1Qigv2J
+kq0duBtXK7wcW59FlafbiozlDAyjksX0S1+MIYnwnzhWpkCvlpQBpMGEZyKsGtN
Y4aYUJ8L9i7mMQhaF8+axTed2kldwXiyMDrueRAGUQUqF6sgzhS0Ufw1KJtTqlA=
=fcSY
-----END PGP SIGNATURE-----
payloadXc  tree 6bcb8205c9e60f551039f8bb7c5729a829c68efe
parent db2304d042a8f9373504b167efcfbbea13a9e1cd
author CianShev <47430248+CianShev@users.noreply.github.com> 1688636620 +0100
committer GitHub <noreply@github.com> 1688636620 +0100

Update README.md

Fixed small spelling error in README.md

Signed-off-by: CianShev <47430248+CianShev@users.noreply.github.com>uuj  dhttps://api.github.com/repos/prometheus/client_java/commits/009222bcb7cece36e9dc6f705b1156424167c1e6html_urlYhttps://github.com/prometheus/client_java/commit/009222bcb7cece36e9dc6f705b1156424167c1e6comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/009222bcb7cece36e9dc6f705b1156424167c1e6/commentsj  }(loginCianShevidJhj  MDQ6VXNlcjQ3NDMwMjQ4
avatar_url4https://avatars.githubusercontent.com/u/47430248?v=4gravatar_idh3j  %https://api.github.com/users/CianShevj  https://github.com/CianShev
followers_url/https://api.github.com/users/CianShev/followers
following_url<https://api.github.com/users/CianShev/following{/other_user}	gists_url5https://api.github.com/users/CianShev/gists{/gist_id}starred_url<https://api.github.com/users/CianShev/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/CianShev/subscriptionsorganizations_url*https://api.github.com/users/CianShev/orgs	repos_url+https://api.github.com/users/CianShev/repos
events_url6https://api.github.com/users/CianShev/events{/privacy}received_events_url5https://api.github.com/users/CianShev/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h3j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj!  /https://api.github.com/users/web-flow/followersj#  <https://api.github.com/users/web-flow/following{/other_user}j%  5https://api.github.com/users/web-flow/gists{/gist_id}j'  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j)  3https://api.github.com/users/web-flow/subscriptionsj+  *https://api.github.com/users/web-flow/orgsj-  +https://api.github.com/users/web-flow/reposj/  6https://api.github.com/users/web-flow/events{/privacy}j1  5https://api.github.com/users/web-flow/received_eventsj3  Userj5  uparents]}(j  (db2304d042a8f9373504b167efcfbbea13a9e1cdj  dhttps://api.github.com/repos/prometheus/client_java/commits/db2304d042a8f9373504b167efcfbbea13a9e1cdj  Yhttps://github.com/prometheus/client_java/commit/db2304d042a8f9373504b167efcfbbea13a9e1cduastats}(totalK	additionsK	deletionsKufiles]}(j  (b8655dea765c3d36977d5ef2cbf51d7334d2a2d2filename	README.mdstatusmodifiedjO  KjP  KchangesKblob_urlahttps://github.com/prometheus/client_java/blob/009222bcb7cece36e9dc6f705b1156424167c1e6/README.mdraw_url`https://github.com/prometheus/client_java/raw/009222bcb7cece36e9dc6f705b1156424167c1e6/README.mdcontents_urlshttps://api.github.com/repos/prometheus/client_java/contents/README.md?ref=009222bcb7cece36e9dc6f705b1156424167c1e6patchX  @@ -84,7 +84,7 @@ the environment variable `PROMETHEUS_DISABLE_CREATED_SERIES=true`.
 
 ## Building
 
-Building the repository needs Java 11 (The project the project still supports Java 6 and Java versions > 11 dropped support for Java 6 output). We recommend to use an [up-to-data Java 8 installation](https://adoptium.net/en-GB/marketplace/?version=8). The project provides the maven wrapper and therefore no local maven installqation is needed. To build the repository just call `./mvnw verify`.
+Building the repository needs Java 11 (The project the project still supports Java 6 and Java versions > 11 dropped support for Java 6 output). We recommend to use an [up-to-data Java 8 installation](https://adoptium.net/en-GB/marketplace/?version=8). The project provides the maven wrapper and therefore no local maven installation is needed. To build the repository just call `./mvnw verify`.
 
 ## Instrumenting
 uau(1bf202a664733297e0f20d77baf5e123ffe2676e}(sha(1bf202a664733297e0f20d77baf5e123ffe2676enode_idEC_kwDOAHoJt9oAKDFiZjIwMmE2NjQ3MzMyOTdlMGYyMGQ3N2JhZjVlMTIzZmZlMjY3NmUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-10T22:09:29Zu	committer}(jl  Fabian Stäberjn  fabian@fstab.dejp  2023-07-10T22:09:29ZumessageExporter servlettree}(jd  (f6d23794b87b96bc6ff67a4c404bd429ed035cfburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f6d23794b87b96bc6ff67a4c404bd429ed035cfbuj|  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1bf202a664733297e0f20d77baf5e123ffe2676e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj|  dhttps://api.github.com/repos/prometheus/client_java/commits/1bf202a664733297e0f20d77baf5e123ffe2676ehtml_urlYhttps://github.com/prometheus/client_java/commit/1bf202a664733297e0f20d77baf5e123ffe2676ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1bf202a664733297e0f20d77baf5e123ffe2676e/commentsjj  }(loginfstabidJ' jf  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j|  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujr  }(j  fstabj  J' jf  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j|  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jd  (b6c123bfce7a110d4e1d4be2fab092153df2d63fj|  dhttps://api.github.com/repos/prometheus/client_java/commits/b6c123bfce7a110d4e1d4be2fab092153df2d63fj  Yhttps://github.com/prometheus/client_java/commit/b6c123bfce7a110d4e1d4be2fab092153df2d63fuastats}(totalK(	additionsK	deletionsKufiles]}(jd  (151dfbf881b6e4ba264a67cc2d75e2e26266509afilenameprometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javastatusmodifiedj  Kj  KchangesK(blob_urlhttps://github.com/prometheus/client_java/blob/1bf202a664733297e0f20d77baf5e123ffe2676e/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaraw_urlhttps://github.com/prometheus/client_java/raw/1bf202a664733297e0f20d77baf5e123ffe2676e/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=1bf202a664733297e0f20d77baf5e123ffe2676epatchX
  @@ -51,25 +51,27 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
         if (allowedNames != null) {
             filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
         }
-        switch (request.getParameter("debug")) {
-            case "openmetrics":
-                response.setContentType("text/plain");
-                expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                break;
-            case "text":
-                response.setContentType("text/plain");
-                expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                break;
-            case "prometheus-protobuf":
-                response.setContentType("text/plain");
-                String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                response.getWriter().write(debugString);
-                break;
-            default:
-                String acceptHeader = request.getHeader("Accept");
-                ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-                response.setContentType(writer.getContentType());
-                writer.write(response.getOutputStream(), registry.scrape(filter));
+        String debugParam = request.getParameter("debug");
+        if (debugParam != null) {
+            switch (debugParam) {
+                case "openmetrics":
+                    response.setContentType("text/plain");
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "text":
+                    response.setContentType("text/plain");
+                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "prometheus-protobuf":
+                    response.setContentType("text/plain");
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
+                    response.getWriter().write(debugString);
+                    return;
+            }
         }
+        String acceptHeader = request.getHeader("Accept");
+        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+        response.setContentType(writer.getContentType());
+        writer.write(response.getOutputStream(), registry.scrape(filter));
     }
 }uau(f188773d87ffc9059459a01d1d30688e61bb231a}(sha(f188773d87ffc9059459a01d1d30688e61bb231anode_idEC_kwDOAHoJt9oAKGYxODg3NzNkODdmZmM5MDU5NDU5YTAxZDFkMzA2ODhlNjFiYjIzMWEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-05T21:01:53Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-05T21:01:53ZumessageAdapt for Micrometer PoCtree}(j  (d638af1ba3e5147d03cf71a76fb5f41ab2758594urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d638af1ba3e5147d03cf71a76fb5f41ab2758594uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f188773d87ffc9059459a01d1d30688e61bb231a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/f188773d87ffc9059459a01d1d30688e61bb231ahtml_urlYhttps://github.com/prometheus/client_java/commit/f188773d87ffc9059459a01d1d30688e61bb231acomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f188773d87ffc9059459a01d1d30688e61bb231a/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj
  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (4834536272b4926efd7ec5b493dd10b70c2abc48j  dhttps://api.github.com/repos/prometheus/client_java/commits/4834536272b4926efd7ec5b493dd10b70c2abc48j  Yhttps://github.com/prometheus/client_java/commit/4834536272b4926efd7ec5b493dd10b70c2abc48uastats}(totalK	additionsK	deletionsKufiles](}(j  (81ff931ce511e1e05fd6ea3ef92a646983553542filenameTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javastatusmodifiedj9  Kj:  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/f188773d87ffc9059459a01d1d30688e61bb231a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaraw_urlhttps://github.com/prometheus/client_java/raw/f188773d87ffc9059459a01d1d30688e61bb231a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=f188773d87ffc9059459a01d1d30688e61bb231apatchX  @@ -52,8 +52,12 @@ public B withConstLabels(Labels constLabels) {
         }
 
         public M register() {
+            return register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public M register(PrometheusRegistry registry) {
             M metric = build();
-            PrometheusRegistry.defaultRegistry.register(metric);
+            registry.register(metric);
             return metric;
         }
 u}(j  (22b6076542f6da856dc1fcbf50bfbd65793fc501j?  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajA  modifiedj9  Kj:  KjC  KjD  https://github.com/prometheus/client_java/blob/f188773d87ffc9059459a01d1d30688e61bb231a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajF  https://github.com/prometheus/client_java/raw/f188773d87ffc9059459a01d1d30688e61bb231a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=f188773d87ffc9059459a01d1d30688e61bb231ajJ  X  @@ -39,7 +39,7 @@ private String makeName(String name, Unit unit) {
         return name;
     }
 
-    protected static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
+    public static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
 
         protected String name;
         private Unit unit;ueu(957cfccf21a74821273a2333e43c822883bacb51}(sha(957cfccf21a74821273a2333e43c822883bacb51node_idEC_kwDOAHoJt9oAKDk1N2NmY2NmMjFhNzQ4MjEyNzNhMjMzM2U0M2M4MjI4ODNiYWNiNTEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-31T20:42:08Zu	committer}(j^  Fabian Stäberj`  fabian@fstab.dejb  2023-08-31T20:42:13ZumessageAdd JVM GC metricstree}(jV  (9b2f64bea2a5f42f24b826bea4622b752528a234urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9b2f64bea2a5f42f24b826bea4622b752528a234ujn  hhttps://api.github.com/repos/prometheus/client_java/git/commits/957cfccf21a74821273a2333e43c822883bacb51
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujn  dhttps://api.github.com/repos/prometheus/client_java/commits/957cfccf21a74821273a2333e43c822883bacb51html_urlYhttps://github.com/prometheus/client_java/commit/957cfccf21a74821273a2333e43c822883bacb51comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/957cfccf21a74821273a2333e43c822883bacb51/commentsj\  }(loginfstabidJ' jX  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jn  "https://api.github.com/users/fstabjz  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujd  }(j  fstabj  J' jX  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jn  "https://api.github.com/users/fstabjz  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jV  (ce949f76b8e921e32ab24ebb645ec1940d9334c8jn  dhttps://api.github.com/repos/prometheus/client_java/commits/ce949f76b8e921e32ab24ebb645ec1940d9334c8jz  Yhttps://github.com/prometheus/client_java/commit/ce949f76b8e921e32ab24ebb645ec1940d9334c8uastats}(totalK	additionsK	deletionsK	ufiles](}(jV  (2e73ec1b178517ded13dbb36ef19d4a8be271f75filenameyprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmCompilationMetrics.javastatusmodifiedj  Kj  K	changesKblob_urlhttps://github.com/prometheus/client_java/blob/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.javaraw_urlhttps://github.com/prometheus/client_java/raw/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.java?ref=957cfccf21a74821273a2333e43c822883bacb51patchX  @@ -11,17 +11,19 @@
 import static io.prometheus.metrics.model.snapshots.Unit.millisToSeconds;
 
 /**
- * Exports metrics about JVM compilation.
- * <p>
- * Example usage:
- * <pre>
- * {@code
- *   new CompilationExports().register();
- * }
- * </pre>
+ * JVM Compilation metrics. The {@link JvmCompilationMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.newBuilder().register();
+ * }</pre>
+ * However, if you want only the {@link JvmCompilationMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmCompilationMetrics.newBuilder().register();
+ * }</pre>
  * Example metrics being exported:
  * <pre>
- *   jvm_compilation_time_ms_total{} 123432
+ * # HELP jvm_compilation_time_seconds_total The total time in seconds taken for HotSpot class compilation
+ * # TYPE jvm_compilation_time_seconds_total counter
+ * jvm_compilation_time_seconds_total 0.152
  * </pre>
  */
 public class JvmCompilationMetrics {u}(jV  (87b423987bb879491dd9a07a05c3ef87fb514dfaj  ~prometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmGarbageCollectorMetrics.javaj  addedj  K`j  K j  K`j  https://github.com/prometheus/client_java/blob/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetrics.javaj  https://github.com/prometheus/client_java/raw/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetrics.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetrics.java?ref=957cfccf21a74821273a2333e43c822883bacb51j  X  @@ -0,0 +1,96 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.SummaryWithCallback;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.lang.management.GarbageCollectorMXBean;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+
+/**
+ * JVM Garbage Collector metrics. The {@link JvmGarbageCollectorMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.newBuilder().register();
+ * }</pre>
+ * However, if you want only the {@link JvmGarbageCollectorMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmGarbageCollectorMetrics.newBuilder().register();
+ * }</pre>
+ * Example metrics being exported:
+ * <pre>
+ * # HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds.
+ * # TYPE jvm_gc_collection_seconds summary
+ * jvm_gc_collection_seconds_count{gc="PS MarkSweep"} 0
+ * jvm_gc_collection_seconds_sum{gc="PS MarkSweep"} 0.0
+ * jvm_gc_collection_seconds_count{gc="PS Scavenge"} 0
+ * jvm_gc_collection_seconds_sum{gc="PS Scavenge"} 0.0
+ * </pre>
+ */
+public class JvmGarbageCollectorMetrics {
+
+    private static final String JVM_GC_COLLECTION_SECONDS = "jvm_gc_collection_seconds";
+
+    private final PrometheusProperties config;
+    private final List<GarbageCollectorMXBean> garbageCollectorBeans;
+
+    private JvmGarbageCollectorMetrics(List<GarbageCollectorMXBean> garbageCollectorBeans, PrometheusProperties config) {
+        this.config = config;
+        this.garbageCollectorBeans = garbageCollectorBeans;
+    }
+
+    private void register(PrometheusRegistry registry) {
+
+        SummaryWithCallback.newBuilder(config)
+                .withName(JVM_GC_COLLECTION_SECONDS)
+                .withHelp("Time spent in a given JVM garbage collector in seconds.")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("gc")
+                .withCallback(callback -> {
+                    for (GarbageCollectorMXBean gc : garbageCollectorBeans) {
+                        callback.call(gc.getCollectionCount(), Unit.millisToSeconds(gc.getCollectionTime()), Quantiles.EMPTY, gc.getName());
+                    }
+                })
+                .register(registry);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private List<GarbageCollectorMXBean> garbageCollectorBeans;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withGarbageCollectorBeans(List<GarbageCollectorMXBean> garbageCollectorBeans) {
+            this.garbageCollectorBeans = garbageCollectorBeans;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            List<GarbageCollectorMXBean> garbageCollectorBeans = this.garbageCollectorBeans;
+            if (garbageCollectorBeans == null) {
+                garbageCollectorBeans = ManagementFactory.getGarbageCollectorMXBeans();
+            }
+            new JvmGarbageCollectorMetrics(garbageCollectorBeans, config).register(registry);
+        }
+    }
+}u}(jV  (3e5ee4a71e0d328b35d48db0a6ba7535b055352fj  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj  https://github.com/prometheus/client_java/raw/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=957cfccf21a74821273a2333e43c822883bacb51j  X  @@ -34,6 +34,7 @@ public void register(PrometheusRegistry registry) {
             JvmBufferPoolMetrics.newBuilder(config).register(registry);
             JvmClassLoadingMetrics.newBuilder(config).register(registry);
             JvmCompilationMetrics.newBuilder(config).register(registry);
+            JvmGarbageCollectorMetrics.newBuilder(config).register(registry);
         }
     }
 }u}(jV  (5b00e61b37d69dd8038634149046b38f124803b7j  prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmGarbageCollectorMetricsTest.javaj  addedj  KJj  K j  KJj  https://github.com/prometheus/client_java/blob/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetricsTest.javaj  https://github.com/prometheus/client_java/raw/957cfccf21a74821273a2333e43c822883bacb51/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmGarbageCollectorMetricsTest.java?ref=957cfccf21a74821273a2333e43c822883bacb51j  X  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.io.IOException;
+import java.lang.management.GarbageCollectorMXBean;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+
+public class JvmGarbageCollectorMetricsTest {
+
+    private GarbageCollectorMXBean mockGcBean1 = Mockito.mock(GarbageCollectorMXBean.class);
+    private GarbageCollectorMXBean mockGcBean2 = Mockito.mock(GarbageCollectorMXBean.class);
+
+    @Before
+    public void setUp() {
+        when(mockGcBean1.getName()).thenReturn("MyGC1");
+        when(mockGcBean1.getCollectionCount()).thenReturn(100L);
+        when(mockGcBean1.getCollectionTime()).thenReturn(TimeUnit.SECONDS.toMillis(10));
+        when(mockGcBean2.getName()).thenReturn("MyGC2");
+        when(mockGcBean2.getCollectionCount()).thenReturn(200L);
+        when(mockGcBean2.getCollectionTime()).thenReturn(TimeUnit.SECONDS.toMillis(20));
+    }
+
+    @Test
+    public void testGoodCase() throws IOException {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmGarbageCollectorMetrics.newBuilder()
+                .withGarbageCollectorBeans(Arrays.asList(mockGcBean1, mockGcBean2))
+                .register(registry);
+        MetricSnapshots snapshots = registry.scrape();
+
+        String expected = "" +
+                "# TYPE jvm_gc_collection_seconds summary\n" +
+                "# UNIT jvm_gc_collection_seconds seconds\n" +
+                "# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds.\n" +
+                "jvm_gc_collection_seconds_count{gc=\"MyGC1\"} 100\n" +
+                "jvm_gc_collection_seconds_sum{gc=\"MyGC1\"} 10.0\n" +
+                "jvm_gc_collection_seconds_count{gc=\"MyGC2\"} 200\n" +
+                "jvm_gc_collection_seconds_sum{gc=\"MyGC2\"} 20.0\n" +
+                "# EOF\n";
+
+        Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
+    }
+
+    @Test
+    public void testIgnoredMetricNotScraped() {
+        MetricNameFilter filter = MetricNameFilter.newBuilder()
+                .nameMustNotBeEqualTo("jvm_gc_collection_seconds")
+                .build();
+
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmGarbageCollectorMetrics.newBuilder()
+                .withGarbageCollectorBeans(Arrays.asList(mockGcBean1, mockGcBean2))
+                .register(registry);
+        MetricSnapshots snapshots = registry.scrape(filter);
+
+        verify(mockGcBean1, times(0)).getCollectionTime();
+        verify(mockGcBean1, times(0)).getCollectionCount();
+        Assert.assertEquals(0, snapshots.size());
+    }
+}ueu(01740cd3e7dfc5e0a147c89961eea6b6177514c9}(sha(01740cd3e7dfc5e0a147c89961eea6b6177514c9node_idEC_kwDOAHoJt9oAKDAxNzQwY2QzZTdkZmM1ZTBhMTQ3Yzg5OTYxZWVhNmI2MTc3NTE0Yzkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-22T21:10:18Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-22T21:10:18ZumessageUse Java 17 in CircleCI buildtree}(j  (26fd0495bb37e3bf0e1fdd61594373e0c7a1185curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/26fd0495bb37e3bf0e1fdd61594373e0c7a1185cuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/01740cd3e7dfc5e0a147c89961eea6b6177514c9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/01740cd3e7dfc5e0a147c89961eea6b6177514c9html_urlYhttps://github.com/prometheus/client_java/commit/01740cd3e7dfc5e0a147c89961eea6b6177514c9comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/01740cd3e7dfc5e0a147c89961eea6b6177514c9/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj!  (https://api.github.com/users/fstab/reposj#  3https://api.github.com/users/fstab/events{/privacy}j%  2https://api.github.com/users/fstab/received_eventsj'  Userj)  uparents]}(j  (c904d9bd3049389bd49b7630b74fb5d5834272bbj  dhttps://api.github.com/repos/prometheus/client_java/commits/c904d9bd3049389bd49b7630b74fb5d5834272bbj  Yhttps://github.com/prometheus/client_java/commit/c904d9bd3049389bd49b7630b74fb5d5834272bbuastats}(totalK
	additionsK	deletionsKufiles]}(j  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedjC  KjD  KchangesK
blob_urlnhttps://github.com/prometheus/client_java/blob/01740cd3e7dfc5e0a147c89961eea6b6177514c9/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/01740cd3e7dfc5e0a147c89961eea6b6177514c9/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=01740cd3e7dfc5e0a147c89961eea6b6177514c9patchX  @@ -3,15 +3,15 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:uau(6c2f5cda00dd0bc51d6e70f994a546f1d7005d09}(sha(6c2f5cda00dd0bc51d6e70f994a546f1d7005d09node_idEC_kwDOAHoJt9oAKDZjMmY1Y2RhMDBkZDBiYzUxZDZlNzBmOTk0YTU0NmYxZDcwMDVkMDkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(j`  Fabian Stäberjb  fabian@fstab.dejd  2023-08-29T20:22:34ZumessageKAdd OpenTelemetry exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jX  (46e3f2a5658e2169651c029ceabebf62d0587addurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/46e3f2a5658e2169651c029ceabebf62d0587addujp  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujp  dhttps://api.github.com/repos/prometheus/client_java/commits/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09html_urlYhttps://github.com/prometheus/client_java/commit/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/commentsj^  }(loginfstabidJ' jZ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jp  "https://api.github.com/users/fstabj|  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujf  }(j  fstabj  J' jZ  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jp  "https://api.github.com/users/fstabj|  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jX  (732a6c14edd2ce6a29a3ebf230ff058cbe867006jp  dhttps://api.github.com/repos/prometheus/client_java/commits/732a6c14edd2ce6a29a3ebf230ff058cbe867006j|  Yhttps://github.com/prometheus/client_java/commit/732a6c14edd2ce6a29a3ebf230ff058cbe867006uastats}(totalMX	additionsM	deletionsM`ufiles](}(jX  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedj  Kj  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09patchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(jX  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953j  2examples/example-exemplars-tail-sampling/README.mdj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(jX  (ed293444607ffb9985c6670a77cc6042b9f84eddj  <examples/example-exemplars-tail-sampling/docker-compose.yamlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(jX  (81c6d573c5f3130cacfdc28c011a18a260bcd288j  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(jX  (e91ade6aceaf818d176460321559b0b310dcab3dj  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(jX  (8bdf213ec9a35830a610393c3496be82b3232d26j  .examples/example-exporter-httpserver/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).     previous_filename%examples/example-httpserver/README.mdu}(jX  (a425c326850318d40de104ce142b72d365af6c29j  ,examples/example-exporter-httpserver/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  #examples/example-httpserver/pom.xmlu}(jX  (0563d583a93f32d63b484dd0d677f75db81927caj  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(jX  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j  1examples/example-exporter-opentelemetry/README.mdj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(jX  (923840e0c85a643976792d88e8dff7c10d446ceej  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(jX  (9f559dae84e3c48a4906a74606ac401cada2f6b9j  >examples/example-exporter-opentelemetry/config/prometheus.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(jX  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j  ;examples/example-exporter-opentelemetry/docker-compose.yamlj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(jX  (842faa1a34c19b3c29f56a5a83792306681906b6j  /examples/example-exporter-opentelemetry/pom.xmlj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jX  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63j  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jX  (dbab42931bb04f5e4327f34f7e74fceed37cb828j  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,143 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(jX  (8d50c0c80603d5469a7144bac6387c8bff45e75bj  2examples/example-exporter-servlet-tomcat/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.j  )examples/example-tomcat-servlet/README.mdu}(jX  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j  0examples/example-exporter-servlet-tomcat/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  'examples/example-tomcat-servlet/pom.xmlu}(jX  (7a95e36da299e8ce780ea5f0d2f2751765754afcj  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(jX  (571e55a2b5d259f0401a881e9631fa0acce8e791j  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(jX  (6535b05e1474660627803d1962e85282e910cf9dj  examples/pom.xmlj  modifiedj  Kj  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(jX  (9cd27a42c58845389736906bc49d2160af05792fj  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jX  (b46c112af431ec1a41165983f476978e4d0a654ej  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X
  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jX  (9a44b01535c57c14d4ace04dd1c4e716316c7c32j  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jX  (ba5d97577739137181a6d15e70170bba6923ecc0j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/pom.xmlj  ^https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(jX  (6d06746f76a09f4d3be70c7bf19de87731cf51a5j  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(jX  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4j  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(jX  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcj  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(jX  (c4a09be7b8ca24e342cd99173c0a8674e703cb60j  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(jX  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3j  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(jX  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770j  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(jX  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99j  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj  modifiedj  K&j  Kj  K4j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(jX  (d324a2700c70b915e444403f75a9c17c96e70bbfj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(jX  (a1c1769d98559841ca83eb49e1ca2977e32e6114j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(jX  (035f2133482078e18c05d544d2633b8ade9d8bebj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(jX  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(jX  (c6d5b7719d02f25c2a8635bcc774374e4f552b97j  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj  modifiedj  KRj  Kj  KTj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }uQ
     }(jX  (6b5266962f80db0e582089efb438621100a5ce92j  1prometheus-metrics-exporter-opentelemetry/pom.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(jX  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u}(jX  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj  addedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(jX  (762060efcf3f5edfa5be3d9edc50d9e8c4350081j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj  addedj  K|j  K j  K|j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(jX  (c4319b7fc6bb838489686542d8817d5c53daad94j  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(jX  (053c2b53ab0a361d01905748b8e4445d725b3e63j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(jX  (093b3b44dc76bd71ffb168b5a87b471c2699ef06j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javaj  addedj  K<j  K j  K<j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(jX  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(jX  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(jX  (d365c26fb4969d38448d8e1bd702b7e55e061b2ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javaj  addedj  K.j  K j  K.j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(jX  (86d56d2d79c660d5d01c2802f73e94787343c22ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javaj  addedj  KUj  K j  KUj  X  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X   https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(jX  (7908bee2ba3c186de26199f194bdde88245a9b3fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(jX  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  addedj  K=j  K j  K=j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u@      }(jX  (a0b4aed8397b8eac69d32d28215f110df28b893bj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(jX  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(jX  (883b06e08475fcbe0e3464b61fa883d3db0a28d1j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jX  (353a1623c7ae3932afa295452af773fa7d9aecdbj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj  addedj  K:j  K j  K:j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(jX  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javaj  addedj  K&j  K j  K&j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jX  (0dce35fa640fb1e114f86e0bfc229347a8d616dej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(jX  (ddf2160d04ae48dbdec91f99d371475820c13180j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(jX  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(jX  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javaj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(jX  (9b2f53c1255abbda709af7892125aa70ba69f819j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(jX  (930715492a4380a13a088d728e21b7460031bb2cj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javaj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jX  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javaj  addedj  K)j  K j  K)j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(jX  (fafc2be77024fc40abd2d2e78abe8864b891c438j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(jX  (f5d86ba1f71fd7393035dff48f730aca3caea09ej  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(jX  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -0,0 +1 @@
+*.jaru}(jX  (24a9f8dffef1509961ecdc2e2deee91f7072c264j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(jX  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(jX  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  modifiedj  Mj  Mzj  Mj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09u}(jX  (eea5f929a0b4ea14792d7806f6306662879017f8j  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(jX  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(jX  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  modifiedj  K	j  K j  K	j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(jX  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(jX  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbej  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(jX  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj  .prometheus-metrics-shaded-dependencies/pom.xmlj  addedj  K(j  K j  K(j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(jX  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068j  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj  addedj  K~j  K j  K~j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jX  (7b0019461389b754822ed106979b1e5c461f8032j  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj  addedj  K	j  K j  K	j  X   https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(jX  (b856ef185427b3939f8b4292d464b4b9f1de817cj  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj  addedj  K\j  K j  K\j  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml{      j  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jX  (3f63392a763257f697e79251d10d442a341fa7eaj  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj  addedj  K	j  K j  K	j  X  https://github.com/prometheus/client_java/blob/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X  https://github.com/prometheus/client_java/raw/6c2f5cda00dd0bc51d6e70f994a546f1d7005d09/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=6c2f5cda00dd0bc51d6e70f994a546f1d7005d09j  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(jX  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj  protobuf-shaded/.gitignorej  removedj  K j  Kj  Kj  thttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2F.gitignorej  shttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  @@ -1 +0,0 @@
-src/main/javau}(jX  (5db4149b724982e6ff8f55ae96f4f8a07804d590j  protobuf-shaded/README.mdj  removedj  K j  Kj  Kj  shttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2FREADME.mdj  rhttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(jX  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34j  protobuf-shaded/pom.xmlj  removedj  K j  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(2879e247ed5c7078288a74883041a7f7bbc5284f}(sha(2879e247ed5c7078288a74883041a7f7bbc5284fnode_idEC_kwDOAHoJt9oAKDI4NzllMjQ3ZWQ1YzcwNzgyODhhNzQ4ODMwNDFhN2Y3YmJjNTI4NGYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:30:55Zu	committer}(jQ  Fabian StäberjS  fabian@fstab.dejU  2023-06-12T20:30:55Zumessage#Move core expositionformats packagetree}(jI  (927c4df67198b609ee2e1384a039d1ab0d534baeurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/927c4df67198b609ee2e1384a039d1ab0d534baeuja  hhttps://api.github.com/repos/prometheus/client_java/git/commits/2879e247ed5c7078288a74883041a7f7bbc5284f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuja  dhttps://api.github.com/repos/prometheus/client_java/commits/2879e247ed5c7078288a74883041a7f7bbc5284fhtml_urlYhttps://github.com/prometheus/client_java/commit/2879e247ed5c7078288a74883041a7f7bbc5284fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/2879e247ed5c7078288a74883041a7f7bbc5284f/commentsjO  }(loginfstabidJ' jK  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ja  "https://api.github.com/users/fstabjm  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujW  }(jr  fstabjt  J' jK  MDQ6VXNlcjMzMDUzNQ==jv  2https://avatars.githubusercontent.com/u/330535?v=4jx  h3ja  "https://api.github.com/users/fstabjm  https://github.com/fstabj{  ,https://api.github.com/users/fstab/followersj}  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jI  (9a924ca905fb4ba10b028f3d8dae9d9e161f8824ja  dhttps://api.github.com/repos/prometheus/client_java/commits/9a924ca905fb4ba10b028f3d8dae9d9e161f8824jm  Yhttps://github.com/prometheus/client_java/commit/9a924ca905fb4ba10b028f3d8dae9d9e161f8824uastats}(totalM	additionsMa	deletionsMaufiles](}(jI  (df3cc09bcaeff604e07a3c2909ff4a65d144d73efilenameYprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=2879e247ed5c7078288a74883041a7f7bbc5284fpatchX3  @@ -2,7 +2,7 @@
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
-import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;u}(jI  (5efffc09bb347d930e07ab3b851abbf2b4513d62j  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=2879e247ed5c7078288a74883041a7f7bbc5284fj  X3  @@ -2,7 +2,7 @@
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
-import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;u}(jI  (e61d58055ffd21473320045871e6c8b4bfe02e84j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=2879e247ed5c7078288a74883041a7f7bbc5284fj  X  @@ -10,7 +10,7 @@ export PROTOBUF_VERSION_STRING="3_21_7"
 
 rm -rf src/main/protobuf/*
 curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/prometheus/client/metrics.proto -o src/main/protobuf/metrics.proto
-sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
+sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/expositionformat/protobuf/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(jI  (e882bfe5ca1f43960f850d0cce8af7126954b361j  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  renamedj  MZj  MZj  Mj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=2879e247ed5c7078288a74883041a7f7bbc5284fprevious_filenameprometheus-metrics-exposition-formats/src/main/generated/io/prometheus/expositionformat/protobuf/generated/com_google_protobuf_3_21_7/Metrics.javau}(jI  (271b107e25bcdd63ade072b4fd8e3605e15bb8e0j  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=2879e247ed5c7078288a74883041a7f7bbc5284fj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.CounterSnapshot.CounterData;u}(jI  (b351b6d5a74d51e4487d4c5661a9d6c1d723d2c5j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=2879e247ed5c7078288a74883041a7f7bbc5284fj  X  @@ -14,7 +14,7 @@
 syntax = "proto2";
 
 package io.prometheus.client;
-option java_package = "io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7";
+option java_package = "io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7";
 option go_package = "github.com/prometheus/client_model/go;io_prometheus_client";
 
 import "google/protobuf/timestamp.proto";u}(jI  (e6ae6cbf0329213e31bcbba11454b262c91685b8j  rprometheus-metrics-exposition-formats/src/test/java/io/prometheus/expositionformat/text/ExpositionFormatsTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/2879e247ed5c7078288a74883041a7f7bbc5284f/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.java?ref=2879e247ed5c7078288a74883041a7f7bbc5284fj  XR  @@ -4,7 +4,7 @@
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;
-import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.CounterSnapshot.CounterData;
 import io.prometheus.metrics.model.Exemplar;ueu(950cedb9c5d67de39347c96e92971cd424f3832b}(sha(950cedb9c5d67de39347c96e92971cd424f3832bnode_idEC_kwDOAHoJt9oAKDk1MGNlZGI5YzVkNjdkZTM5MzQ3Yzk2ZTkyOTcxY2Q0MjRmMzgzMmIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T21:02:10Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-29T21:02:10Zumessage=[maven-release-plugin] prepare for next development iterationtree}(j  (f9f45074f3c34dc9f35dac94f42dfa1bccdd90e2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f9f45074f3c34dc9f35dac94f42dfa1bccdd90e2uj	  hhttps://api.github.com/repos/prometheus/client_java/git/commits/950cedb9c5d67de39347c96e92971cd424f3832b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj	  dhttps://api.github.com/repos/prometheus/client_java/commits/950cedb9c5d67de39347c96e92971cd424f3832bhtml_urlYhttps://github.com/prometheus/client_java/commit/950cedb9c5d67de39347c96e92971cd424f3832bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/950cedb9c5d67de39347c96e92971cd424f3832b/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j	  "https://api.github.com/users/fstabj	  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j	  fstabj	  J' j  MDQ6VXNlcjMzMDUzNQ==j	  2https://avatars.githubusercontent.com/u/330535?v=4j	  h3j	  "https://api.github.com/users/fstabj	  https://github.com/fstabj!	  ,https://api.github.com/users/fstab/followersj#	  9https://api.github.com/users/fstab/following{/other_user}j%	  2https://api.github.com/users/fstab/gists{/gist_id}j'	  9https://api.github.com/users/fstab/starred{/owner}{/repo}j)	  0https://api.github.com/users/fstab/subscriptionsj+	  'https://api.github.com/users/fstab/orgsj-	  (https://api.github.com/users/fstab/reposj/	  3https://api.github.com/users/fstab/events{/privacy}j1	  2https://api.github.com/users/fstab/received_eventsj3	  Userj5	  uparents]}(j  (810cdcb4a916e669645eb585f0aced4e6db70bf9j	  dhttps://api.github.com/repos/prometheus/client_java/commits/810cdcb4a916e669645eb585f0aced4e6db70bf9j	  Yhttps://github.com/prometheus/client_java/commit/810cdcb4a916e669645eb585f0aced4e6db70bf9uastats}(totalK	additionsKD	deletionsKDufiles](}(j  (783ee55eb2c96eb61f59895c54b1e4bd5d544adbfilenamebenchmarks/pom.xmlstatusmodifiedjO	  KjP	  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j  (f6ab3646b8e12fd8097bc402db63941ec49e5752jU	  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(j  (c37ab141835d956ff3dd2139ece0642511d68832jU	  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(j  (4f34ee5ab9eefd4a3fe060c6f3a14a5e1571af97jU	  0examples/example-exemplars-tail-sampling/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(j  (907e7f44e94aafa6c16db9e18752f96aa16f6cb7jU	  ,examples/example-exporter-httpserver/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-httpserver%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-httpserver%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-httpserver</artifactId>u}(j  (076cdd24e791cdc7a2ab31650ceed7379de0116cjU	  /examples/example-exporter-opentelemetry/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-opentelemetry</artifactId>u}(j  (345a4328f5202cb8b2c04ae96a8d5c14b976e05fjU	  0examples/example-exporter-servlet-tomcat/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-servlet-tomcat</artifactId>u}(j  (bbbe729f6082374c936fc9b817596379aec8337bjU	  examples/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  jhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fpom.xmlj\	  ihttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/examples%2Fpom.xmlj^	  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j  (0e3b099c6cb763f2ab18cd36835a97e050531c4bjU	  #integration-tests/it-common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-common%2Fpom.xmlj\	  ~https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-common</artifactId>u}(j  (d4f83ac829ea27125cfb640f7b69c63c170e0ce0jU	  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-httpserver-sample</artifactId>u}(j  (104666b07b9ae5fee4a62ada4310a79dbe1cba8bjU	  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-servlet-jetty-sample</artifactId>u}(j  (ccfbcdc12cddf53c14e3ae3d5a38382a9b1496dcjU	  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X#  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>u}(j  (59110421de426807bd67a6cbbb70013d861c61d7jU	  6integration-tests/it-exporter/it-exporter-test/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-test</artifactId>u}(j  (b14c5bca60ddc22f2d80ba26573290498ba74495jU	  %integration-tests/it-exporter/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fit-exporter%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  Xy  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter</artifactId>
@@ -29,7 +29,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>v1.0.0-alpha-3</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(j  (223de113f52192f0ab3ebb1854ffce44a927e735jU	  integration-tests/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  shttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fpom.xmlj\	  rhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration-tests%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration-tests</artifactId>u}(j  (5a36f448938bb6617e0b9ee8d13004b8fbf83527jU	  #integration_tests/it_common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_common%2Fpom.xmlj\	  ~https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j  (625d2c9b91d1f7475acf9ab3ed0ba981f31a47c7jU	  1integration_tests/it_exemplars_otel_agent/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j  (b9cd61ca1094aa5e9cbbbeab353901b7a84f9eefjU	  /integration_tests/it_exemplars_otel_sdk/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j  (dd303f86e73dadd4c9167b4e8c8f3b2e8a767d4bjU	  *integration_tests/it_java_versions/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_java_versions%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_java_versions%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j  (38bfa4fb337efdc43dc194c7721c27277a3e9769jU	  #integration_tests/it_log4j2/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_log4j2%2Fpom.xmlj\	  ~https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_log4j2%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j  (9d3cab3a28516205dbe280fa2c45aa447ff92225jU	  (integration_tests/it_pushgateway/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_pushgateway%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_pushgateway%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j  (195f5ae460dc1121d5e20f65508b94594ca86fbdjU	  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j  (942b912ab4dc872fa670670eca66da557da9344cjU	  integration_tests/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  shttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fpom.xmlj\	  rhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/integration_tests%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j  (c6f25cd14838f1d8fde03590dc75fd94c7573a70jU	  pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  _https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/pom.xmlj\	  ^https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/pom.xmlj^	  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>v1.0.0-alpha-3</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(j  (071cf4a28f4fe5f25c5940fc71d797fa62a52ec3jU	  !prometheus-metrics-config/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  {https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-config%2Fpom.xmlj\	  zhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-config%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j  (2151549bd5a2174518d6641d446e78be83961e54jU	  prometheus-metrics-core/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  yhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-core%2Fpom.xmlj\	  xhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-core%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j  (309674dbdf12371b4ce22a627974a031045b43b5jU	  *prometheus-metrics-exporter-common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-common%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X$  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-common</artifactId>u}(j  (8675e80474630798070836d821a71a821111ff05jU	  .prometheus-metrics-exporter-httpserver/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-httpserver%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-httpserver%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-httpserver</artifactId>u}(j  (a331de61925b063eb895f68cf438bcf67e933dfejU	  1prometheus-metrics-exporter-opentelemetry/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X+  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>u}(j  (9a369f7995a6cdf0b4e6b0b0a63b0dba15c4505bjU	  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j  (62f6a806bda3a37a718661e1a17b8b707cc6d88ejU	  -prometheus-metrics-exposition-formats/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exposition-formats%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-exposition-formats%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j  (8a8c20631764c1c6d06376884e2f7aaf2df18fc0jU	   prometheus-metrics-model/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  zhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-model%2Fpom.xmlj\	  yhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-model%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j  (0e0f4f26604228397aa8b894218a8a6438ef9049jU	  .prometheus-metrics-shaded-dependencies/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-dependencies</artifactId>u}(j  (fd69c1689f6ea80820978737585517d5ca3f00fcjU	  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  XD  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>u}(j  (47746ea4074501952b65ba25021a9d3e2a399738jU	  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X?  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>u}(j  (d000e3ea615fd5156e1d7a396e68718b259d015ejU	  !prometheus-metrics-tracer/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  {https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fpom.xmlj\	  zhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j  (0e01fd462ad3e2be04611f4fdec4f093cc462ccfjU	  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j  (4a15f11895a5106081c0b0ce8cdfaffc43b8ecd5jU	  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml     j^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j  (e5bab6fc526f85757b63bc992d13f298fbcfdeb3jU	  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j  (e3c01697f6b1ac31f3ee7788f9fbf3beb946d709jU	  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j  (f5f030552b7add38d05a6e9175832219e50ee1d9jU	  simpleclient/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  nhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient%2Fpom.xmlj\	  mhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j  (f78c01c6ded110701810479f9d7730a0351fdc94jU	  simpleclient_bom/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  rhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_bom%2Fpom.xmlj\	  qhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_bom%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j  (4a820d18c87726b28ff35de32c93761dad928168jU	  simpleclient_caffeine/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  whttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_caffeine%2Fpom.xmlj\	  vhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_caffeine%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j  (a3facdc4f41384a24ec2b83c3011dbae1e2db96fjU	  simpleclient_common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  uhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_common%2Fpom.xmlj\	  thttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j  (deede1590f368688e763d8a0a67a468dcdd4a96fjU	  simpleclient_dropwizard/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  yhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_dropwizard%2Fpom.xmlj\	  xhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_dropwizard%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j  (67e48acd2442e4252e539e875f6d438f9d1a732cjU	  $simpleclient_graphite_bridge/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  ~https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_graphite_bridge%2Fpom.xmlj\	  }https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_graphite_bridge%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j  (50b704b75d5d93001fa0a1f164c5b3f7fe2cb737jU	  simpleclient_guava/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  thttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_guava%2Fpom.xmlj\	  shttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_guava%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j  (df45693846aa3d75eb0128322363aac182be9d33jU	  simpleclient_hibernate/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  xhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_hibernate%2Fpom.xmlj\	  whttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_hibernate%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j  (4dc25a5f50d4ab68a8dcf6dfa6d82edcc6d2c5a9jU	  simpleclient_hotspot/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  vhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_hotspot%2Fpom.xmlj\	  uhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_hotspot%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j  (c8bcaee09de0c50851657ae4118bc5c5da65f045jU	  simpleclient_httpserver/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  yhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_httpserver%2Fpom.xmlj\	  xhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_httpserver%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j  (91d9ca76377cc2a37a07a32f3336bf9490bd74a2jU	  simpleclient_jetty/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  thttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_jetty%2Fpom.xmlj\	  shttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_jetty%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j  (26c601a776e588a248d9a728a97c85a53767afb6jU	  simpleclient_jetty_jdk8/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  yhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_jetty_jdk8%2Fpom.xmlj\	  xhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_jetty_jdk8%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j  (1d804e9c9e34bed3d9a8c1631e719cb222e83931jU	  simpleclient_log4j/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  thttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_log4j%2Fpom.xmlj\	  shttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_log4j%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j  (31805d97d031d22bb22876f638b3b7e11d9da8bfjU	  simpleclient_log4j2/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  uhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_log4j2%2Fpom.xmlj\	  thttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_log4j2%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j  (39e6acabb08bb9058974f78abc9eacaeffee6440jU	  simpleclient_logback/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  vhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_logback%2Fpom.xmlj\	  uhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_logback%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j  (4fb7ab4b811d8d26fef6511874b9be4f5d87a90bjU	   simpleclient_pushgateway/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  zhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_pushgateway%2Fpom.xmlj\	  yhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_pushgateway%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j  (4c7e4d4fae4c56874f0a7c757c5afdef1ed77acbjU	  simpleclient_servlet/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  vhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet%2Fpom.xmlj\	  uhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j  (ad3ce2f57f4947d3aa656e6746a940a82f5e3d45jU	  #simpleclient_servlet_common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  }https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet_common%2Fpom.xmlj\	  |https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet_common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j  (d223bc04e8fadc1b8429fb2ea139be3a5f3cbd58jU	  $simpleclient_servlet_jakarta/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  ~https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet_jakarta%2Fpom.xmlj\	  }https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_servlet_jakarta%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j  (3c36741f6b38825c8e99f764dc28322af6a2796fjU	  simpleclient_spring_web/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  yhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_spring_web%2Fpom.xmlj\	  xhttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_spring_web%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j  (74ca017daa1a778fd83f476920fcec09c8aebcf6jU	  simpleclient_tracer/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  uhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fpom.xmlj\	  thttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j  (996ccb70da4c061e26b54d6f401b361351e53218jU	  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j  (c86e7c1f578dd32eda89df64350e8392f653f806jU	  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j  (71299100b5e2c95de034f3d84b177136dfd5ed7ejU	  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  https://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj\	  https://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j  (c2d5b0ee15eb5c5eb4d8613c4f7b4260b35e5673jU	  simpleclient_vertx/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  thttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_vertx%2Fpom.xmlj\	  shttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_vertx%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j  (50d3bdeeae5004a5c080e4f022ab130f27e268a7jU	  simpleclient_vertx4/pom.xmljW	  modifiedjO	  KjP	  KjY	  KjZ	  uhttps://github.com/prometheus/client_java/blob/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_vertx4%2Fpom.xmlj\	  thttps://github.com/prometheus/client_java/raw/950cedb9c5d67de39347c96e92971cd424f3832b/simpleclient_vertx4%2Fpom.xmlj^	  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=950cedb9c5d67de39347c96e92971cd424f3832bj`	  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(f31439d29e5b1f42e998e0ef3c068ada621debd5}(sha(f31439d29e5b1f42e998e0ef3c068ada621debd5node_idEC_kwDOAHoJt9oAKGYzMTQzOWQyOWU1YjFmNDJlOTk4ZTBlZjNjMDY4YWRhNjIxZGViZDUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(jt  Fabian Stäberjv  fabian@fstab.dejx  2023-08-29T20:25:34ZumessageKAdd OpenTelemetry exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jl  (46e3f2a5658e2169651c029ceabebf62d0587addurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/46e3f2a5658e2169651c029ceabebf62d0587adduj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f31439d29e5b1f42e998e0ef3c068ada621debd5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/f31439d29e5b1f42e998e0ef3c068ada621debd5html_urlYhttps://github.com/prometheus/client_java/commit/f31439d29e5b1f42e998e0ef3c068ada621debd5comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f31439d29e5b1f42e998e0ef3c068ada621debd5/commentsjr  }(loginfstabidJ' jn  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujz  }(j  fstabj  J' jn  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jl  (c208b817c60035bcc07ea9008e6c1d6a066ddc40j  dhttps://api.github.com/repos/prometheus/client_java/commits/c208b817c60035bcc07ea9008e6c1d6a066ddc40j  Yhttps://github.com/prometheus/client_java/commit/c208b817c60035bcc07ea9008e6c1d6a066ddc40uastats}(totalMX	additionsM	deletionsM`ufiles](}(jl  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedj  Kj  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5patchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(jl  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953j  2examples/example-exemplars-tail-sampling/README.mdj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(jl  (ed293444607ffb9985c6670a77cc6042b9f84eddj  <examples/example-exemplars-tail-sampling/docker-compose.yamlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(jl  (81c6d573c5f3130cacfdc28c011a18a260bcd288j  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(jl  (e91ade6aceaf818d176460321559b0b310dcab3dj  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(jl  (8bdf213ec9a35830a610393c3496be82b3232d26j  .examples/example-exporter-httpserver/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(jl  (a425c326850318d40de104ce142b72d365af6c29j  ,examples/example-exporter-httpserver/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  #examples/example-httpserver/pom.xmlu}(jl  (0563d583a93f32d63b484dd0d677f75db81927caj  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(jl  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j  1examples/example-exporter-opentelemetry/README.mdj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(jl  (923840e0c85a643976792d88e8dff7c10d446ceej  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(jl  (9f559dae84e3c48a4906a74606ac401cada2f6b9j  >examples/example-exporter-opentelemetry/config/prometheus.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(jl  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j  ;examples/example-exporter-opentelemetry/docker-compose.yamlj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(jl  (842faa1a34c19b3c29f56a5a83792306681906b6j  /examples/example-exporter-opentelemetry/pom.xmlj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63j  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jl  (dbab42931bb04f5e4327f34f7e74fceed37cb828j  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,143 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(jl  (8d50c0c80603d5469a7144bac6387c8bff45e75bj  2examples/example-exporter-servlet-tomcat/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.j  )examples/example-tomcat-servlet/README.mdu}(jl  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j  0examples/example-exporter-servlet-tomcat/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  'examples/example-tomcat-servlet/pom.xmlu}(jl  (7a95e36da299e8ce780ea5f0d2f2751765754afcj  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(jl  (571e55a2b5d259f0401a881e9631fa0acce8e791j  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(jl  (6535b05e1474660627803d1962e85282e910cf9dj  examples/pom.xmlj  modifiedj  Kj  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(jl  (9cd27a42c58845389736906bc49d2160af05792fj  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jl  (b46c112af431ec1a41165983f476978e4d0a654ej  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X
  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jl  (9a44b01535c57c14d4ace04dd1c4e716316c7c32j  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jl  (ba5d97577739137181a6d15e70170bba6923ecc0j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/pom.xmlj  ^https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u     }(jl  (6d06746f76a09f4d3be70c7bf19de87731cf51a5j  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(jl  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4j  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(jl  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcj  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(jl  (c4a09be7b8ca24e342cd99173c0a8674e703cb60j  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(jl  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3j  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(jl  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770j  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(jl  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99j  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj  modifiedj  K&j  Kj  K4j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(jl  (d324a2700c70b915e444403f75a9c17c96e70bbfj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(jl  (a1c1769d98559841ca83eb49e1ca2977e32e6114j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(jl  (035f2133482078e18c05d544d2633b8ade9d8bebj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(jl  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(jl  (c6d5b7719d02f25c2a8635bcc774374e4f552b97j  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj  modifiedj  KRj  Kj  KTj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(jl  (6b5266962f80db0e582089efb438621100a5ce92j  1prometheus-metrics-exporter-opentelemetry/pom.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(jl  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u     }(jl  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj  addedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(jl  (762060efcf3f5edfa5be3d9edc50d9e8c4350081j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj  addedj  K|j  K j  K|j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(jl  (c4319b7fc6bb838489686542d8817d5c53daad94j  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(jl  (053c2b53ab0a361d01905748b8e4445d725b3e63j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(jl  (093b3b44dc76bd71ffb168b5a87b471c2699ef06j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javaj  addedj  K<j  K j  K<j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(jl  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(jl  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(jl  (d365c26fb4969d38448d8e1bd702b7e55e061b2ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javaj  addedj  K.j  K j  K.j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(jl  (86d56d2d79c660d5d01c2802f73e94787343c22ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javaj  addedj  KUj  K j  KUj  X  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X   https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(jl  (7908bee2ba3c186de26199f194bdde88245a9b3fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(jl  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  addedj  K=j  K j  K=j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(jl  (a0b4aed8397b8eac69d32d28215f110df28b893bj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(jl  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(jl  (883b06e08475fcbe0e3464b61fa883d3db0a28d1j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jl  (353a1623c7ae3932afa295452af773fa7d9aecdbj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj  addedj  K:j  K j  K:j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(jl  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javaj  addedj  K&j  K j  K&j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jl  (0dce35fa640fb1e114f86e0bfc229347a8d616dej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(jl  (ddf2160d04ae48dbdec91f99d371475820c13180j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(jl  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u     }(jl  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javaj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(jl  (9b2f53c1255abbda709af7892125aa70ba69f819j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(jl  (930715492a4380a13a088d728e21b7460031bb2cj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javaj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jl  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javaj  addedj  K)j  K j  K)j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(jl  (fafc2be77024fc40abd2d2e78abe8864b891c438j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(jl  (f5d86ba1f71fd7393035dff48f730aca3caea09ej  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(jl  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -0,0 +1 @@
+*.jaru}(jl  (24a9f8dffef1509961ecdc2e2deee91f7072c264j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(jl  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(jl  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  modifiedj  Mj  Mzj  Mj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5u}(jl  (eea5f929a0b4ea14792d7806f6306662879017f8j  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(jl  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(jl  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  modifiedj  K	j  K j  K	j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(jl  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(jl  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbej  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(jl  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj  .prometheus-metrics-shaded-dependencies/pom.xmlj  addedj  K(j  K j  K(j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(jl  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068j  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj  addedj  K~j  K j  K~j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (7b0019461389b754822ed106979b1e5c461f8032j  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj  addedj  K	j  K j  K	j  X   https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(jl  (b856ef185427b3939f8b4292d464b4b9f1de817cj  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj  addedj  K\j  K j  K\j  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (3f63392a763257f697e79251d10d442a341fa7eaj  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj  addedj  K	j  K j  K	j  X  https://github.com/prometheus/client_java/blob/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X  https://github.com/prometheus/client_java/raw/f31439d29e5b1f42e998e0ef3c068ada621debd5/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=f31439d29e5b1f42e998e0ef3c068ada621debd5j  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(jl  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj  protobuf-shaded/.gitignorej  removedj  K j  Kj  Kj  thttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2F.gitignorej  shttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40j  @@ -1 +0,0 @@
-src/main/javau}(jl  (5db4149b724982e6ff8f55ae96f4f8a07804d590j  protobuf-shaded/README.mdj  removedj  K j  Kj  Kj  shttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2FREADME.mdj  rhttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40j  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(jl  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34j  protobuf-shaded/pom.xmlj  removedj  K j  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40j  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c}(sha(493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cnode_idEC_kwDOAHoJt9oAKDQ5M2ZmZGJhZjAwOWFkNDJmMmNmNDI2ZjVmN2I2ZDJiNDZkOGYyMmMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(je  Fabian Stäberjg  fabian@fstab.deji  2023-08-29T20:18:31ZumessageHAdd HTTPServer exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j]  (f50a6d7830685cdb641ded74a93bc471fa9fb3a3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f50a6d7830685cdb641ded74a93bc471fa9fb3a3uju  hhttps://api.github.com/repos/prometheus/client_java/git/commits/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuju  dhttps://api.github.com/repos/prometheus/client_java/commits/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22chtml_urlYhttps://github.com/prometheus/client_java/commit/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/commentsjc  }(loginfstabidJ' j_  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ju  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujk  }(j  fstabj  J' j_  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3ju  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j]  (5dcb807a7673ec160109405778ee2cbb5989076cju  dhttps://api.github.com/repos/prometheus/client_java/commits/5dcb807a7673ec160109405778ee2cbb5989076cj  Yhttps://github.com/prometheus/client_java/commit/5dcb807a7673ec160109405778ee2cbb5989076cuastats}(totalM		additionsM		deletionsK@ufiles](}(j]  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedj  K%j  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cpatchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(j]  (fd1f204d1d1ed425f184838aea568a893c9ae334j  #examples/example-httpserver/pom.xmlj  addedj  KFj  K j  KFj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j]  (0563d583a93f32d63b484dd0d677f75db81927caj  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj  addedj  K!j  K j  K!j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X=  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j]  (571e55a2b5d259f0401a881e9631fa0acce8e791j  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(j]  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cj  examples/pom.xmlj  modifiedj  Kj  K j  Kj  jhttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(j]  (aa81b08e8189c21bee10839e7605abd4b2c49b12j  #integration-tests/it-common/pom.xmlj  addedj  K8j  K j  K8j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u      }(j]  (d60e5397941da631e78c1289365208a3becd4641j  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javaj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(j]  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javaj  addedj  Kej  K j  Kej  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(j]  (4eafa72596ce3619761aa5c3681eeabb90322228j  Iintegration-tests/it-common/src/test/resources/project_version.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(j]  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  -integration-tests/it-common/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-common%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j]  (8767c971d0f813a8af5a6dee7d7276f15ae79be6j  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj  addedj  KIj  K j  KIj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j]  (474db7804aabba78dee5e810f3952924b2853255j  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj  addedj  Kbj  K j  Kbj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j]  (a470df5c021d465c51388b5a740ba88a49d40858j  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj  addedj  KSj  K j  KSj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j]  (efa119c4e2292afc04d79a6f1b049bca20e923bej  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj  addedj  Kqj  K j  Kqj  X  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X
  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j]  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj  addedj  KNj  K j  KNj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j]  (21956ae78f5aca3a25abb6b5bb32a80999930390j  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj  addedj  Kqj  K j  Kqj  X  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j]  (8d7404585288239abecdd5265b2984d493cb0628j  6integration-tests/it-exporter/it-exporter-test/pom.xmlj  addedj  KBj  K j  KBj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j]  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj  addedj  MVj  K j  MVj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(j]  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j  %integration-tests/it-exporter/pom.xmlj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fit-exporter%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u}(j]  (cce89906f28eebfb57aa16a5ab222f52117f4794j  integration-tests/pom.xmlj  addedj  K@j  K j  K@j  shttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fpom.xmlj  rhttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/integration-tests%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(j]  (fc8359e560a3e05c90838b2ece08e0853d823358j  pom.xmlj  modifiedj  Kj  K j  Kj  _https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/pom.xmlj  ^https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(j]  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcj  *prometheus-metrics-exporter-common/pom.xmlj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(j]  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4j  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(j]  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javaj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java      j  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(j]  (4e3db6955fe7fbf010877f9faef50315ac489eedj  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(j]  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fj  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(j]  (318e865f55bdd893d762a5f4e759a502e8bbc983j  4prometheus-metrics-exporter-common/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-common%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j]  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160j  .prometheus-metrics-exporter-httpserver/pom.xmlj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(j]  (e8a54e0cf687d16358a139f83d42f5960106395aj  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javaj  addedj  KCj  K j  KCj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(j]  (7c0275fc3624f8dff2d802b37671eb91fca4b48cj  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .buildAndStart();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server. Same as {@link #close()}.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer. Same as {@link #stop()}.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     * This is useful if you did not specify a port and the server picked a free port automatically.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build and start the HTTPServer.
+         */
+        public HTTPServer buildAndStart() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(j]  (03b647d99ed2bc1d67a3c66a11c33d900b53d501j  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(j]  (4f1b4f63a7e59feb619963afc5d901560bc83e08j  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javaj  addedj  Kwj  K j  Kwj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u}(j]  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bj  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj  addedj  K-j  K j  K-j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(j]  (378ac6ddc334fbe20d07b3510cf6434894770c6bj  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(j]  (318e865f55bdd893d762a5f4e759a502e8bbc983j  8prometheus-metrics-exporter-httpserver/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j]  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79j  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  modifiedj  Kj  Kj  K	j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(j]  (656d661ebddd423ba12fc58b1dbd136062e5a282j  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javaj  addedj  K^j  K j  K^j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(j]  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ej  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javaj  modifiedj  Kj  K4j  K8j  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(j]  (3db354c56f52afb4c46e0a080ef010b492c401d6j  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(j]  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfej  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(j]  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72j  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(j]  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfj  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj  https://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(cd51942a1db1ef3884f16e656a33da7fa74c05fd}(sha(cd51942a1db1ef3884f16e656a33da7fa74c05fdnode_idEC_kwDOAHoJt9oAKGNkNTE5NDJhMWRiMWVmMzg4NGYxNmU2NTZhMzNkYTdmYTc0YzA1ZmQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(j"  Fabian Stäberj$  fabian@fstab.dej&  2023-08-29T20:18:31ZumessageAdd OpenTelemetry Exportertree}(j  (46e3f2a5658e2169651c029ceabebf62d0587addurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/46e3f2a5658e2169651c029ceabebf62d0587adduj2  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cd51942a1db1ef3884f16e656a33da7fa74c05fd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj2  dhttps://api.github.com/repos/prometheus/client_java/commits/cd51942a1db1ef3884f16e656a33da7fa74c05fdhtml_urlYhttps://github.com/prometheus/client_java/commit/cd51942a1db1ef3884f16e656a33da7fa74c05fdcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cd51942a1db1ef3884f16e656a33da7fa74c05fd/commentsj   }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j2  "https://api.github.com/users/fstabj>  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj(  }(jC  fstabjE  J' j  MDQ6VXNlcjMzMDUzNQ==jG  2https://avatars.githubusercontent.com/u/330535?v=4jI  h3j2  "https://api.github.com/users/fstabj>  https://github.com/fstabjL  ,https://api.github.com/users/fstab/followersjN  9https://api.github.com/users/fstab/following{/other_user}jP  2https://api.github.com/users/fstab/gists{/gist_id}jR  9https://api.github.com/users/fstab/starred{/owner}{/repo}jT  0https://api.github.com/users/fstab/subscriptionsjV  'https://api.github.com/users/fstab/orgsjX  (https://api.github.com/users/fstab/reposjZ  3https://api.github.com/users/fstab/events{/privacy}j\  2https://api.github.com/users/fstab/received_eventsj^  Userj`  uparents]}(j  (493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj2  dhttps://api.github.com/repos/prometheus/client_java/commits/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj>  Yhttps://github.com/prometheus/client_java/commit/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cuastats}(totalMX	additionsM	deletionsM`ufiles](}(j  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedjz  Kj{  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdpatchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u      }(j  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953j  2examples/example-exemplars-tail-sampling/README.mdj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(j  (ed293444607ffb9985c6670a77cc6042b9f84eddj  <examples/example-exemplars-tail-sampling/docker-compose.yamlj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(j  (81c6d573c5f3130cacfdc28c011a18a260bcd288j  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j  (e91ade6aceaf818d176460321559b0b310dcab3dj  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j  (8bdf213ec9a35830a610393c3496be82b3232d26j  .examples/example-exporter-httpserver/README.mdj  renamedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(j  (a425c326850318d40de104ce142b72d365af6c29j  ,examples/example-exporter-httpserver/pom.xmlj  renamedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  #examples/example-httpserver/pom.xmlu}(j  (0563d583a93f32d63b484dd0d677f75db81927caj  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj  renamedjz  K j{  K j  K j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(j  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j  1examples/example-exporter-opentelemetry/README.mdj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(j  (923840e0c85a643976792d88e8dff7c10d446ceej  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamlj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(j  (9f559dae84e3c48a4906a74606ac401cada2f6b9j  >examples/example-exporter-opentelemetry/config/prometheus.yamlj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(j  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j  ;examples/example-exporter-opentelemetry/docker-compose.yamlj  addedjz  K$j{  K j  K$j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(j  (842faa1a34c19b3c29f56a5a83792306681906b6j  /examples/example-exporter-opentelemetry/pom.xmlj  addedjz  KGj{  K j  KGj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63j  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j  (dbab42931bb04f5e4327f34f7e74fceed37cb828j  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,143 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(j  (8d50c0c80603d5469a7144bac6387c8bff45e75bj  2examples/example-exporter-servlet-tomcat/README.mdj  renamedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.j  )examples/example-tomcat-servlet/README.mdu}(j  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j  0examples/example-exporter-servlet-tomcat/pom.xmlj  renamedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  'examples/example-tomcat-servlet/pom.xmlu}(j  (7a95e36da299e8ce780ea5f0d2f2751765754afcj  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  renamedjz  K j{  K j  K j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(j  (571e55a2b5d259f0401a881e9631fa0acce8e791j  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  renamedjz  K j{  K j  K j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(j  (6535b05e1474660627803d1962e85282e910cf9dj  examples/pom.xmlj  modifiedjz  Kj{  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(j  (9cd27a42c58845389736906bc49d2160af05792fj  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (b46c112af431ec1a41165983f476978e4d0a654ej  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj  modifiedjz  Kj{  Kj  Kj  X  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X
  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (9a44b01535c57c14d4ace04dd1c4e716316c7c32j  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj  modifiedjz  Kj{  Kj  Kj  X  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (ba5d97577739137181a6d15e70170bba6923ecc0j  pom.xmlj  modifiedjz  Kj{  Kj  Kj  _https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/pom.xmlj  ^https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(j  (6d06746f76a09f4d3be70c7bf19de87731cf51a5j  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(j  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4j  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(j  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcj  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(j  (c4a09be7b8ca24e342cd99173c0a8674e703cb60j  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(j  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3j  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(j  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770j  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99j  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj  modifiedjz  K&j{  Kj  K4j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(j  (d324a2700c70b915e444403f75a9c17c96e70bbfj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(j  (a1c1769d98559841ca83eb49e1ca2977e32e6114j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj  modifiedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(j  (035f2133482078e18c05d544d2633b8ade9d8bebj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fd       j  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(j  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(j  (c6d5b7719d02f25c2a8635bcc774374e4f552b97j  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj  modifiedjz  KRj{  Kj  KTj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(j  (6b5266962f80db0e582089efb438621100a5ce92j  1prometheus-metrics-exporter-opentelemetry/pom.xmlj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(j  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  addedjz  Mj{  K j  Mj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u}(j  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj  addedjz  K j{  K j  K j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(j  (762060efcf3f5edfa5be3d9edc50d9e8c4350081j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj  addedjz  K|j{  K j  K|j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(j  (c4319b7fc6bb838489686542d8817d5c53daad94j  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj  addedjz  K"j{  K j  K"j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(j  (053c2b53ab0a361d01905748b8e4445d725b3e63j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javaj  addedjz  K
j{  K j  K
j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(j  (093b3b44dc76bd71ffb168b5a87b471c2699ef06j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javaj  addedjz  K<j{  K j  K<j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(j  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javaj  addedjz  KWj{  K j  KWj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(j  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j  (d365c26fb4969d38448d8e1bd702b7e55e061b2ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javaj  addedjz  K.j{  K j  K.j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(j  (86d56d2d79c660d5d01c2802f73e94787343c22ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javaj        addedjz  KUj{  K j  KUj  X  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X   https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(j  (7908bee2ba3c186de26199f194bdde88245a9b3fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj  addedjz  KDj{  K j  KDj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(j  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  addedjz  K=j{  K j  K=j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(j  (a0b4aed8397b8eac69d32d28215f110df28b893bj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javaj  addedjz  K+j{  K j  K+j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(j  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  addedjz  KPj{  K j  KPj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(j  (883b06e08475fcbe0e3464b61fa883d3db0a28d1j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj  addedjz  K1j{  K j  K1j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (353a1623c7ae3932afa295452af773fa7d9aecdbj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj  addedjz  K:j{  K j  K:j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(j  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javaj  addedjz  K&j{  K j  K&j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (0dce35fa640fb1e114f86e0bfc229347a8d616dej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj  addedjz  K1j{  K j  K1j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(j  (ddf2160d04ae48dbdec91f99d371475820c13180j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(j  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj  addedjz  KWj{  K j  KWj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(j  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javaj  addedjz  K5j{  K j  K5j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(j  (9b2f53c1255abbda709af7892125aa70ba69f819j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javaj  addedjz  K+j{  K j  K+j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(j  (930715492a4380a13a088d728e21b7460031bb2cj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javaj  addedjz  K%j{  K j  K%j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javaj  addedjz  K)j{  K j  K)j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(j  (fafc2be77024fc40abd2d2e78abe8864b891c438j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javaj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j  (f5d86ba1f71fd7393035dff48f730aca3caea09ej  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(j  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej  addedjz  Kj{  K j  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -0,0 +1 @@
+*.jaru}(j  (24a9f8dffef1509961ecdc2e2deee91f7072c264j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(j  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  modifiedjz  Mj{  Mzj  Mj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdu}(j  (eea5f929a0b4ea14792d7806f6306662879017f8j  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  modifiedjz  K	j{  K j  K	j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(j  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(j  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbej  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj  modifiedjz  Kj{  Kj  Kj  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u     }(j  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj  .prometheus-metrics-shaded-dependencies/pom.xmlj  addedjz  K(j{  K j  K(j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(j  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068j  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj  addedjz  K~j{  K j  K~j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (7b0019461389b754822ed106979b1e5c461f8032j  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj  addedjz  K	j{  K j  K	j  X   https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(j  (b856ef185427b3939f8b4292d464b4b9f1de817cj  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj  addedjz  K\j{  K j  K\j  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (3f63392a763257f697e79251d10d442a341fa7eaj  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj  addedjz  K	j{  K j  K	j  X  https://github.com/prometheus/client_java/blob/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X  https://github.com/prometheus/client_java/raw/cd51942a1db1ef3884f16e656a33da7fa74c05fd/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=cd51942a1db1ef3884f16e656a33da7fa74c05fdj  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(j  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj  protobuf-shaded/.gitignorej  removedjz  K j{  Kj  Kj  thttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2F.gitignorej  shttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  @@ -1 +0,0 @@
-src/main/javau}(j  (5db4149b724982e6ff8f55ae96f4f8a07804d590j  protobuf-shaded/README.mdj  removedjz  K j{  Kj  Kj  shttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2FREADME.mdj  rhttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34j  protobuf-shaded/pom.xmlj  removedjz  K j{  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22c/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=493ffdbaf009ad42f2cf426f5f7b6d2b46d8f22cj  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(e2ac68f27995ce415043a646b6713f2701bae23a}(sha(e2ac68f27995ce415043a646b6713f2701bae23anode_idEC_kwDOAHoJt9oAKGUyYWM2OGYyNzk5NWNlNDE1MDQzYTY0NmI2NzEzZjI3MDFiYWUyM2Ecommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-14T13:43:53Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-14T13:43:53Zumessageconfig javadoctree}(j  (8d95a6c208fb5333f67b34e782e27b3146fba11curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/8d95a6c208fb5333f67b34e782e27b3146fba11cuj#  hhttps://api.github.com/repos/prometheus/client_java/git/commits/e2ac68f27995ce415043a646b6713f2701bae23a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj#  dhttps://api.github.com/repos/prometheus/client_java/commits/e2ac68f27995ce415043a646b6713f2701bae23ahtml_urlYhttps://github.com/prometheus/client_java/commit/e2ac68f27995ce415043a646b6713f2701bae23acomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/e2ac68f27995ce415043a646b6713f2701bae23a/commentsj  }(loginfstabidJ' j
  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j#  "https://api.github.com/users/fstabj/  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j4  fstabj6  J' j
  MDQ6VXNlcjMzMDUzNQ==j8  2https://avatars.githubusercontent.com/u/330535?v=4j:  h3j#  "https://api.github.com/users/fstabj/  https://github.com/fstabj=  ,https://api.github.com/users/fstab/followersj?  9https://api.github.com/users/fstab/following{/other_user}jA  2https://api.github.com/users/fstab/gists{/gist_id}jC  9https://api.github.com/users/fstab/starred{/owner}{/repo}jE  0https://api.github.com/users/fstab/subscriptionsjG  'https://api.github.com/users/fstab/orgsjI  (https://api.github.com/users/fstab/reposjK  3https://api.github.com/users/fstab/events{/privacy}jM  2https://api.github.com/users/fstab/received_eventsjO  UserjQ  uparents]}(j  (8b1e56b323c821cea43d85b52ed04f6cf24a39d8j#  dhttps://api.github.com/repos/prometheus/client_java/commits/8b1e56b323c821cea43d85b52ed04f6cf24a39d8j/  Yhttps://github.com/prometheus/client_java/commit/8b1e56b323c821cea43d85b52ed04f6cf24a39d8uastats}(totalK	additionsK	deletionsKufiles](}(j  (7d996f6a560211062ec448f454682020914a5295filename]prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarsProperties.javastatusmodifiedjk  K&jl  KchangesK'blob_urlhttps://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23apatchX-	  @@ -15,7 +15,7 @@ public class ExemplarsProperties {
     private final Integer maxRetentionPeriodSeconds;
     private final Integer sampleIntervalMilliseconds;
 
-    public ExemplarsProperties(
+    private ExemplarsProperties(
             Integer minRetentionPeriodSeconds,
             Integer maxRetentionPeriodSeconds,
             Integer sampleIntervalMilliseconds) {
@@ -53,6 +53,10 @@ public Integer getSampleIntervalMilliseconds() {
         return sampleIntervalMilliseconds;
     }
 
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
     static ExemplarsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
         Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
@@ -74,4 +78,37 @@ static ExemplarsProperties load(String prefix, Map<Object, Object> properties) t
                 sampleIntervalMilliseconds
         );
     }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer minRetentionPeriodSeconds;
+        private Integer maxRetentionPeriodSeconds;
+        private Integer sampleIntervalMilliseconds;
+
+        private Builder() {
+        }
+
+        public Builder withMinRetentionPeriodSeconds(int minRetentionPeriodSeconds) {
+            this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withMaxRetentionPeriodSeconds(int maxRetentionPeriodSeconds) {
+            this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withSampleIntervalMilliseconds(int sampleIntervalMilliseconds) {
+            this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
+            return this;
+        }
+
+        public ExemplarsProperties builder() {
+            return new ExemplarsProperties(minRetentionPeriodSeconds, maxRetentionPeriodSeconds, sampleIntervalMilliseconds);
+        }
+    }
 }u}(j  (2509853293246174435bd8a8fc49bb074363eeb8jq  bprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterFilterProperties.javajs  modifiedjk  Kjl  K	ju  K"jv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  X  @@ -21,7 +21,7 @@ public class ExporterFilterProperties {
     private final List<String> allowedPrefixes;
     private final List<String> excludedPrefixes;
 
-    public ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes) {
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes) {
         this(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, "");
     }
 
@@ -52,6 +52,18 @@ public List<String> getExcludedPrefixes() {
     private void validate(String prefix) throws PrometheusPropertiesException {
     }
 
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterFilterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        List<String> allowedNames = Util.loadStringList(prefix + "." + NAME_MUST_BE_EQUAL_TO, properties);
+        List<String> excludedNames = Util.loadStringList(prefix + "." + NAME_MUST_NOT_BE_EQUAL_TO, properties);
+        List<String> allowedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_START_WITH, properties);
+        List<String> excludedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_NOT_START_WITH, properties);
+        return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, prefix);
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -66,21 +78,33 @@ public static class Builder {
         private Builder() {
         }
 
+        /**
+         * Only allowed metric names will be exposed.
+         */
         public Builder withAllowedNames(String... allowedNames) {
             this.allowedNames = Arrays.asList(allowedNames);
             return this;
         }
 
+        /**
+         * Excluded metric names will not be exposed.
+         */
         public Builder withExcludedNames(String... excludedNames) {
             this.excludedNames = Arrays.asList(excludedNames);
             return this;
         }
 
+        /**
+         * Only metrics with a name starting with an allowed prefix will be exposed.
+         */
         public Builder withAllowedPrefixes(String... allowedPrefixes) {
             this.allowedPrefixes = Arrays.asList(allowedPrefixes);
             return this;
         }
 
+        /**
+         * Metrics with a name starting with an excluded prefix will not be exposed.
+         */
         public Builder withExcludedPrefixes(String... excludedPrefixes) {
             this.excludedPrefixes = Arrays.asList(excludedPrefixes);
             return this;
@@ -90,12 +114,4 @@ public ExporterFilterProperties build() {
             return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes);
         }
     }
-
-    static ExporterFilterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
-        List<String> allowedNames = Util.loadStringList(prefix + "." + NAME_MUST_BE_EQUAL_TO, properties);
-        List<String> excludedNames = Util.loadStringList(prefix + "." + NAME_MUST_NOT_BE_EQUAL_TO, properties);
-        List<String> allowedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_START_WITH, properties);
-        List<String> excludedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_NOT_START_WITH, properties);
-        return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, prefix);
-    }
 }u}(j  (8c9d7aa3913d66d7b5a2140f5d49acd93d1eff7fjq  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javajs  modifiedjk  Kjl  Kju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  X+  @@ -12,17 +12,39 @@ public class ExporterHttpServerProperties {
     private static final String PORT = "port";
     private final Integer port;
 
-    public ExporterHttpServerProperties(Integer port) {
+    private ExporterHttpServerProperties(Integer port) {
         this.port = port;
     }
 
     public Integer getPort() {
         return port;
     }
 
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
     static ExporterHttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer port = Util.loadInteger(prefix + "." + PORT, properties);
         Util.assertValue(port, t -> t > 0, "Expecting value > 0", prefix, PORT);
         return new ExporterHttpServerProperties(port);
     }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer port;
+
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        public ExporterHttpServerProperties build() {
+            return new ExporterHttpServerProperties(port);
+        }
+    }
 }u}(j  (016d399f044544938a5a34bee32e3d429e9dd35fjq  \prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterProperties.javajs  modifiedjk  K&jl  Kju  K'jv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  X	  @@ -13,7 +13,7 @@ public class ExporterProperties {
     private final Boolean includeCreatedTimestamps;
     private final Boolean exemplarsOnAllMetricTypes;
 
-    public ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
+    private ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
         this.includeCreatedTimestamps = includeCreatedTimestamps;
         this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
     }
@@ -33,9 +33,46 @@ public boolean getExemplarsOnAllMetricTypes() {
         return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
     }
 
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
     static ExporterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
         Boolean exemplarsOnAllMetricTypes = Util.loadBoolean(prefix + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
         return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
     }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Boolean includeCreatedTimestamps;
+        private Boolean exemplarsOnAllMetricTypes;
+
+        private Builder() {
+        }
+
+        /**
+         * See {@link #getIncludeCreatedTimestamps()}
+         */
+        public Builder withIncludeCreatedTimestamps(boolean includeCreatedTimestamps) {
+            this.includeCreatedTimestamps = includeCreatedTimestamps;
+            return this;
+        }
+
+        /**
+         * See {@link #getExemplarsOnAllMetricTypes()}.
+         */
+        public Builder withExemplarsOnAllMetricTypes(boolean exemplarsOnAllMetricTypes) {
+            this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
+            return this;
+        }
+
+        public ExporterProperties build() {
+            return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+        }
+    }
 }u}(j  (10966b3c8215159c783db7b3476d360bde26b707jq  [prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsProperties.javajs  modifiedjk  Kjl  Kju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  XF  @@ -266,8 +266,8 @@ public Integer getSummaryNumberOfAgeBuckets() {
     }
 
     /**
-     * Properties that are loaded will be removed from {@code properties}.
-     * The remaining entries in {@code properties} are unused.
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
      */
     static MetricsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         return new MetricsProperties(u}(j  (9341c5988aa532d3de9b2288cae7de65b5916514jq  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajs  modifiedjk  Kjl  Kju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  X  @@ -4,11 +4,13 @@
 import java.util.Map;
 
 /**
- * Allow overriding configuration like histogram bucket boundaries at application startup time.
+ * The Prometheus Java client library can be configured at runtime (e.g. using a properties file).
+ * <p>
+ * This class represents the runtime configuration.
  */
 public class PrometheusProperties {
 
-    private static final PrometheusProperties defaultInstance = PrometheusPropertiesLoader.load();
+    private static final PrometheusProperties instance = PrometheusPropertiesLoader.load();
 
     private final MetricsProperties defaultMetricsProperties;
     private final Map<String, MetricsProperties> metricProperties = new HashMap<>();
@@ -17,8 +19,16 @@ public class PrometheusProperties {
     private final ExporterFilterProperties exporterFilterProperties;
     private final ExporterHttpServerProperties httpServerConfig;
 
+    /**
+     * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
+     * <ul>
+     *     <li>{@code prometheus.properties} file found in the classpath.</li>
+     *     <li>Properties file specified in the {@code PROMETHEUS_CONFIG} environment variable or the {@code prometheus.config} system property.</li>
+     *     <li>Individual properties from system properties.</li>
+     * </ul>
+     */
     public static PrometheusProperties get() throws PrometheusPropertiesException {
-        return defaultInstance;
+        return instance;
     }
 
     public PrometheusProperties(
@@ -36,10 +46,17 @@ public PrometheusProperties(
         this.httpServerConfig = httpServerConfig;
     }
 
+    /**
+     * The default metric properties apply for metrics where {@link #getMetricProperties(String)} is {@code null}.
+     */
     public MetricsProperties getDefaultMetricProperties() {
         return defaultMetricsProperties;
     }
 
+    /**
+     * Properties specific for one metric. Should be merged with {@link #getDefaultMetricProperties()}.
+     * May return {@code null} if no metric-specific properties are configured for a metric name.
+     */
     public MetricsProperties getMetricProperties(String metricName) {
         return metricProperties.get(metricName);
     }u}(j  (ba52372e5010e517d9e84b39236bdc5c067724c6jq  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajs  modifiedjk  Kjl  K ju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  Xp  @@ -21,6 +21,9 @@
  */
 public class PrometheusPropertiesLoader {
 
+    /**
+     * See {@link PrometheusProperties#get()}.
+     */
     public static PrometheusProperties load() throws PrometheusPropertiesException {
         Map<Object, Object> properties = loadProperties();
         Map<String, MetricsProperties> metricsConfigs = loadMetricsConfigs(properties);u}(j  (8f1357134814268c8bef6fd212d0c5bb46140126jq  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javajs  modifiedjk  K	jl  K	ju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  Xo  @@ -6,7 +6,7 @@
 import java.util.Map;
 import java.util.function.Predicate;
 
-public class Util {
+class Util {
 
     private static String getProperty(String name, Map<Object, Object> properties) {
         Object object = properties.remove(name);
@@ -16,7 +16,7 @@ private static String getProperty(String name, Map<Object, Object> properties) {
         return null;
     }
 
-    public static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             if (!"true".equalsIgnoreCase(property) && !"false".equalsIgnoreCase(property)) {
@@ -27,7 +27,7 @@ public static Boolean loadBoolean(String name, Map<Object, Object> properties) t
         return null;
     }
 
-    public static List<Double> toList(double... values) {
+    static List<Double> toList(double... values) {
         if (values == null) {
             return null;
         }
@@ -38,15 +38,15 @@ public static List<Double> toList(double... values) {
         return result;
     }
 
-    public static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             return Arrays.asList(property.split("\\s*,\\s*"));
         }
         return null;
     }
 
-    public static List<Double> loadDoubleList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static List<Double> loadDoubleList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             String[] numbers = property.split("\\s*,\\s*");
@@ -67,7 +67,7 @@ public static List<Double> loadDoubleList(String name, Map<Object, Object> prope
         return null;
     }
 
-    public static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
@@ -79,7 +79,7 @@ public static Integer loadInteger(String name, Map<Object, Object> properties) t
         return null;
     }
 
-    public static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
@@ -91,7 +91,7 @@ public static Double loadDouble(String name, Map<Object, Object> properties) thr
         return null;
     }
 
-    public static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
@@ -103,7 +103,7 @@ public static Long loadLong(String name, Map<Object, Object> properties) throws
         return null;
     }
 
-    public static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusPropertiesException {
+    static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusPropertiesException {
         if (number != null && !predicate.test(number)) {
             String fullMessage = prefix == null ? name + ": " + message : prefix + "." + name + ": " + message;
             throw new PrometheusPropertiesException(fullMessage);u}(j  (b789e809c567a46ce3105496d4ce072af3057489jq  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.javajs  modifiedjk  Kjl  Kju  Kjv  https://github.com/prometheus/client_java/blob/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javajx  https://github.com/prometheus/client_java/raw/e2ac68f27995ce415043a646b6713f2701bae23a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.java?ref=e2ac68f27995ce415043a646b6713f2701bae23aj|  X  @@ -11,6 +11,8 @@
  * This is used to maintain a sliding window of {@link CKMSQuantiles} for {@link Summary} metrics.
  * <p>
  * It is implemented in a generic way so that 3rd party libraries can use it for implementing sliding windows.
+ * <p>
+ * TODO: The current implementation is {@code synchronized}. There is likely room for optimization.
  */
 public class SlidingWindow<T> {
 
@@ -26,9 +28,9 @@ public class SlidingWindow<T> {
      * are maintained and the sliding window moves to the next instance of T every 20 seconds.
      *
      * @param clazz type of T
-     * @param constructor create a new instance of T as the old one gets evicted
-     * @param observeFunction make T observe a value
-     * @param maxAgeSeconds after this amount of seconds an instance of T gets evicted.
+     * @param constructor for creating a new instance of T as the old one gets evicted
+     * @param observeFunction for observing a value (e.g. calling {@code t.observe(value)}
+     * @param maxAgeSeconds after this amount of time an instance of T gets evicted.
      * @param ageBuckets number of age buckets.
      */
     public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<T> observeFunction, long maxAgeSeconds, int ageBuckets) {ueu(71f4fc80eebeba98104e29590ef16a8186bb36c2}(sha(71f4fc80eebeba98104e29590ef16a8186bb36c2node_idEC_kwDOAHoJt9oAKDcxZjRmYzgwZWViZWJhOTgxMDRlMjk1OTBlZjE2YTgxODZiYjM2YzIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:38:30Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-12T20:38:30ZumessageMove core tracer packagestree}(j  (7cb026b72512f14924ae062d3371bae94aa35127urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/7cb026b72512f14924ae062d3371bae94aa35127uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/71f4fc80eebeba98104e29590ef16a8186bb36c2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/71f4fc80eebeba98104e29590ef16a8186bb36c2html_urlYhttps://github.com/prometheus/client_java/commit/71f4fc80eebeba98104e29590ef16a8186bb36c2comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/71f4fc80eebeba98104e29590ef16a8186bb36c2/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj   3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (f3657401b0732204c613be640f2d9caed84b4cfej  dhttps://api.github.com/repos/prometheus/client_java/commits/f3657401b0732204c613be640f2d9caed84b4cfej  Yhttps://github.com/prometheus/client_java/commit/f3657401b0732204c613be640f2d9caed84b4cfeuastats}(totalK*	additionsK	deletionsKufiles](}(j  (51765cc0e79b26657e7eed4c7e5b14c42ed0a920filename_prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javastatusmodifiedj   Kj!  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaraw_urlhttps://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2patchX  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.core.exemplars;
 
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
-import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Labels;u}(j  (97c1b713b1a5aa1901c792e97904a39ac4393710j&  cprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerTest.javaj(  modifiedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javaj/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X|  @@ -1,8 +1,6 @@
 package io.prometheus.metrics.core.exemplars;
 
-import io.prometheus.metrics.core.exemplars.ExemplarSampler;
-import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
-import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Label;
@@ -30,7 +28,7 @@ private ExemplarSamplerConfig makeConfig(double... buckets) {
     }
 
 
-    private static class SpanContext implements io.prometheus.metrics.exemplars.tracer.common.SpanContext {
+    private static class SpanContext implements io.prometheus.metrics.tracer.common.SpanContext {
 
         int callCount = 0;
         boolean isSampled = true;
@@ -62,7 +60,7 @@ public void testCustomExemplarsBuckets() throws Exception {
         // TODO
     }
 
-    private io.prometheus.metrics.exemplars.tracer.common.SpanContext origContext;
+    private io.prometheus.metrics.tracer.common.SpanContext origContext;
 
     @Before
     public void setUp() {u}(j  (61343166aef38532de4efb8e7b3497682ce36742j&  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj(  modifiedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X  @@ -4,8 +4,8 @@
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
-import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Labels;u}(j  (4391c8e2e62f85a14004d5e90390f9b621b4e314j&  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javaj(  modifiedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X)  @@ -1,8 +1,8 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
-import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;u}(j  (570db563af21ed90f085eb6c2916ee2efde0ec81j&  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj(  modifiedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X  @@ -4,8 +4,8 @@
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
-import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.ClassicHistogramBucket;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;u     }(j  (b53fe4d20100ea67179ff52a5d7df8ba607641a0j&  }prometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/tracer/common/SpanContext.javaj(  renamedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javaj/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.exemplars.tracer.common;
+package io.prometheus.metrics.tracer.common;
 
 public interface SpanContext {
 previous_filenameprometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/exemplars/tracer/common/SpanContext.javau}(j  (caecb60552207ed6ec9e37445fde04b60dfd0cddj&  prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/src/main/java/io/prometheus/metrics/tracer/initializer/SpanContextSupplier.javaj(  renamedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj/  X
  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  Xp  @@ -1,8 +1,8 @@
-package io.prometheus.metrics.exemplars.tracer.initializer;
+package io.prometheus.metrics.tracer.initializer;
 
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
-import io.prometheus.metrics.exemplars.tracer.otel.OpenTelemetrySpanContext;
-import io.prometheus.metrics.exemplars.tracer.otel_agent.OpenTelemetryAgentSpanContext;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.otel.OpenTelemetrySpanContext;
+import io.prometheus.metrics.tracer.otel_agent.OpenTelemetryAgentSpanContext;
 
 import java.util.concurrent.atomic.AtomicReference;
 j[  prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/src/main/java/io/prometheus/metrics/exemplars/tracer/initializer/SpanContextSupplier.javau}(j  (36cba7076b092af8770b5f56e2f172571c67f9cfj&  prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/src/main/java/io/prometheus/metrics/tracer/otel_agent/OpenTelemetryAgentSpanContext.javaj(  renamedj   Kj!  Kj*  Kj+  X  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj-  X  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj/  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X  @@ -1,9 +1,9 @@
-package io.prometheus.metrics.exemplars.tracer.otel_agent;
+package io.prometheus.metrics.tracer.otel_agent;
 
 import io.opentelemetry.api.trace.Span;
 import io.opentelemetry.api.trace.SpanId;
 import io.opentelemetry.api.trace.TraceId;
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.common.SpanContext;
 
 /**
  * This is exactly the same as the {@code OpenTelemetrySpanContextSupplier}.j[  prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/src/main/java/io/prometheus/metrics/exemplars/tracer/otel_agent/OpenTelemetryAgentSpanContext.javau}(j  (dd338cea292518a3692b778903027da876b61ad6j&  prometheus-metrics-tracer/prometheus-metrics-tracer-otel/src/main/java/io/prometheus/metrics/tracer/otel/OpenTelemetrySpanContext.javaj(  renamedj   Kj!  Kj*  Kj+  https://github.com/prometheus/client_java/blob/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj-  https://github.com/prometheus/client_java/raw/71f4fc80eebeba98104e29590ef16a8186bb36c2/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj/  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.java?ref=71f4fc80eebeba98104e29590ef16a8186bb36c2j1  X  @@ -1,9 +1,9 @@
-package io.prometheus.metrics.exemplars.tracer.otel;
+package io.prometheus.metrics.tracer.otel;
 
 import io.opentelemetry.api.trace.Span;
 import io.opentelemetry.api.trace.SpanId;
 import io.opentelemetry.api.trace.TraceId;
-import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.common.SpanContext;
 
 public class OpenTelemetrySpanContext implements SpanContext {
 j[  prometheus-metrics-tracer/prometheus-metrics-tracer-otel/src/main/java/io/prometheus/metrics/exemplars/tracer/otel/OpenTelemetrySpanContext.javaueu(8b1e56b323c821cea43d85b52ed04f6cf24a39d8}(sha(8b1e56b323c821cea43d85b52ed04f6cf24a39d8node_idEC_kwDOAHoJt9oAKDhiMWU1NmIzMjNjODIxY2VhNDNkODViNTJlZDA0ZjZjZjI0YTM5ZDgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-13T20:27:27Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-13T20:27:27Zumessage Make TimeWindowQuantiles generictree}(jz  (e03253dfe3ad6fe8ec4b5e623e9c31b26afc2fafurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/e03253dfe3ad6fe8ec4b5e623e9c31b26afc2fafuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/8b1e56b323c821cea43d85b52ed04f6cf24a39d8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/8b1e56b323c821cea43d85b52ed04f6cf24a39d8html_urlYhttps://github.com/prometheus/client_java/commit/8b1e56b323c821cea43d85b52ed04f6cf24a39d8comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/8b1e56b323c821cea43d85b52ed04f6cf24a39d8/commentsj  }(loginfstabidJ' j|  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j|  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jz  (2845c2d1042a5c4e418ce3f2b45d139739422c64j  dhttps://api.github.com/repos/prometheus/client_java/commits/2845c2d1042a5c4e418ce3f2b45d139739422c64j  Yhttps://github.com/prometheus/client_java/commit/2845c2d1042a5c4e418ce3f2b45d139739422c64uastats}(totalK	additionsK	deletionsKufiles]}(jz  (0654f033ef059b6ffb3ab080c43bc97045cfb637filename[prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/8b1e56b323c821cea43d85b52ed04f6cf24a39d8/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javaraw_urlhttps://github.com/prometheus/client_java/raw/8b1e56b323c821cea43d85b52ed04f6cf24a39d8/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.java?ref=8b1e56b323c821cea43d85b52ed04f6cf24a39d8patchX-  @@ -6,11 +6,13 @@
 import java.util.function.Supplier;
 
 /**
- * Wrapper around {@link CKMSQuantiles}.
+ * Maintains a ring buffer of T to implement a sliding time window.
  * <p>
- * Maintains a ring buffer of CKMSQuantiles to provide quantiles over a sliding windows of time.
+ * This is used to maintain a sliding window of {@link CKMSQuantiles} for {@link Summary} metrics.
+ * <p>
+ * It is implemented in a generic way so that 3rd party libraries can use it for implementing sliding windows.
  */
-class SlidingWindow<T> {
+public class SlidingWindow<T> {
 
     private final Supplier<T> constructor;
     private final ObjDoubleConsumer<T> observeFunction;
@@ -19,6 +21,16 @@ class SlidingWindow<T> {
     private long lastRotateTimestampMillis;
     private final long durationBetweenRotatesMillis;
 
+    /**
+     * Example: If the {@code maxAgeSeconds} is 60 and {@code ageBuckets} is 3, then 3 instances of {@code T}
+     * are maintained and the sliding window moves to the next instance of T every 20 seconds.
+     *
+     * @param clazz type of T
+     * @param constructor create a new instance of T as the old one gets evicted
+     * @param observeFunction make T observe a value
+     * @param maxAgeSeconds after this amount of seconds an instance of T gets evicted.
+     * @param ageBuckets number of age buckets.
+     */
     public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<T> observeFunction, long maxAgeSeconds, int ageBuckets) {
         this.constructor = constructor;
         this.observeFunction = observeFunction;
@@ -31,10 +43,16 @@ public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<
         this.durationBetweenRotatesMillis = TimeUnit.SECONDS.toMillis(maxAgeSeconds) / ageBuckets;
     }
 
+    /**
+     * Get the currently active instance of {@code T}.
+     */
     public synchronized T current() {
         return rotate();
     }
 
+    /**
+     * Observe a value.
+     */
     public synchronized void observe(double value) {
         observeFunction.accept(rotate(), value);
     }uau(261af881ab1f7170f25ded313311ad9dbdd33f2e}(sha(261af881ab1f7170f25ded313311ad9dbdd33f2enode_idEC_kwDOAHoJt9oAKDI2MWFmODgxYWIxZjcxNzBmMjVkZWQzMTMzMTFhZDlkYmRkMzNmMmUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-27T12:53:19Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-27T12:53:19ZumessageUpdate manual testtree}(j  (d5e8696bff5bea4dc3d70417518bf040de51be91urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d5e8696bff5bea4dc3d70417518bf040de51be91uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/261af881ab1f7170f25ded313311ad9dbdd33f2e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/261af881ab1f7170f25ded313311ad9dbdd33f2ehtml_urlYhttps://github.com/prometheus/client_java/commit/261af881ab1f7170f25ded313311ad9dbdd33f2ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/261af881ab1f7170f25ded313311ad9dbdd33f2e/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj!  ,https://api.github.com/users/fstab/followersj#  9https://api.github.com/users/fstab/following{/other_user}j%  2https://api.github.com/users/fstab/gists{/gist_id}j'  9https://api.github.com/users/fstab/starred{/owner}{/repo}j)  0https://api.github.com/users/fstab/subscriptionsj+  'https://api.github.com/users/fstab/orgsj-  (https://api.github.com/users/fstab/reposj/  3https://api.github.com/users/fstab/events{/privacy}j1  2https://api.github.com/users/fstab/received_eventsj3  Userj5  uparents]}(j  (1369fff6ac2d08137129cc5f5fa36b7260e54434j  dhttps://api.github.com/repos/prometheus/client_java/commits/1369fff6ac2d08137129cc5f5fa36b7260e54434j  Yhttps://github.com/prometheus/client_java/commit/1369fff6ac2d08137129cc5f5fa36b7260e54434uastats}(totalK	additionsK	deletionsK ufiles]}(j  (3a02a8b91cfc2d8d060779ec798d4106e492d97bfilenameItmp_example/src/main/java/com/example/ManualNativeHistogramBenchmark.javastatusmodifiedjO  KjP  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/261af881ab1f7170f25ded313311ad9dbdd33f2e/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javaraw_urlhttps://github.com/prometheus/client_java/raw/261af881ab1f7170f25ded313311ad9dbdd33f2e/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.java?ref=261af881ab1f7170f25ded313311ad9dbdd33f2epatchX  @@ -34,6 +34,9 @@ public static void main(String[] args) throws InterruptedException {
         ManualNativeHistogramBenchmark benchmark = new ManualNativeHistogramBenchmark();
         benchmark.setUp();
         for (int threads = 1; threads <= 48; threads++) {
+            System.out.println();
+            System.out.println("# " + threads + " Threads");
+            System.out.println();
             benchmark.run(threads);
         }
     }uau(2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06}(sha(2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06node_idEC_kwDOAHoJt9oAKDJiM2ViMThkMTljOThlOWMyN2I2ODg1Y2E4ZTcwNTcyZWM2YTZkMDYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(jl  Fabian Stäberjn  fabian@fstab.dejp  2023-08-11T20:44:35ZumessageAdd OpenTelemetry Exportertree}(jd  (069bd5181ec3d32008c230a91712de5cac5e2537urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/069bd5181ec3d32008c230a91712de5cac5e2537uj|  hhttps://api.github.com/repos/prometheus/client_java/git/commits/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj|  dhttps://api.github.com/repos/prometheus/client_java/commits/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06html_urlYhttps://github.com/prometheus/client_java/commit/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/commentsjj  }(loginfstabidJ' jf  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j|  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujr  }(j  fstabj  J' jf  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j|  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jd  (97cfe5accbf64cba792cdc32a524244f71a66086j|  dhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086j  Yhttps://github.com/prometheus/client_java/commit/97cfe5accbf64cba792cdc32a524244f71a66086uastats}(totalM	additionsM	deletionsKufiles](}(jd  (d18ecdfb29d1d2e8f8b720a1d7c77a1a3d79b4d4filename#examples/example-httpserver/pom.xmlstatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-httpserver%2Fpom.xmlraw_url~https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-httpserver%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06patchXJ  @@ -58,7 +58,7 @@
                         <configuration>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>u}(jd  (1913676345d30c927811eda0605a2999cb4f0bb0j  (examples/example-opentelemetry/README.mdj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2FREADME.mdj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jd  (3f4ef3995f855ba5cd63ba4e666601a402c2c241j  9examples/example-opentelemetry/config/otelcol-config.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X`  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: "http://localhost:9090/api/v1/push"
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging]u}(jd  (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391j  5examples/example-opentelemetry/config/prometheus.yamlj  addedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06u}(jd  (18fe52635228407f44434721757b66e8225fd072j  2examples/example-opentelemetry/docker-compose.yamlj  addedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fdocker-compose.yaml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,32 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    volumes:
+      - ./target/prometheus-opentelemetry-example-app.jar:/prometheus-opentelemetry-example-app.jar
+    command:
+      - java
+      - -jar
+      - /prometheus-opentelemetry-example-app.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --config.file=/prometheus.yamlu}(jd  (d04c33121a49d5418adcb903f8fcf257af833fb5j  &examples/example-opentelemetry/pom.xmlj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fpom.xml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>prometheus-opentelemetry-example-app</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jd  (ef5c5157172b0193dfe2e25898f835f0a7810d2dj  cexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,27 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+    public static void main(String[] args) throws InterruptedException {
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter openTelemetryExporter = new OpenTelemetryExporter();
+        openTelemetryExporter.start(PrometheusRegistry.defaultRegistry);
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jd  (78241ce64e491d4cd3ee77185a278c3ea7c1dfc6j  examples/pom.xmlj  modifiedj  Kj  K j  Kj  jhttps://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  @@ -36,6 +36,7 @@
         <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-opentelemetry</module>
     </modules>
 
 </project>u}(jd  (7889df125f300c512a1310ce5e1fe8eface6e618j  pom.xmlj  modifiedj  Kj  K j  Kj  _https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/pom.xmlj  ^https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  Xj  @@ -58,6 +58,7 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
         <module>examples</module>
         <module>integration-tests</module>
 u}(jd  (d9eddf5d1959653d954ffab6dc310f85fad3c698j  1prometheus-metrics-exporter-opentelemetry/pom.xmlj  addedj  K\j  K j  K\j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>1.28.0-alpha</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        -->
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+</project>u}(jd  (5376fefc2144e7586997bd1c561acf9885597738j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.opentelemetry.sdk.metrics.export.MetricExporter;
+import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.time.Duration;
+
+public class OpenTelemetryExporter {
+
+    public void start(PrometheusRegistry registry) {
+        PrometheusResourceAttributes resourceAttributes = new PrometheusResourceAttributes();
+        MetricExporter exporter = OtlpHttpMetricExporter.builder()
+                .setEndpoint("http://localhost:4318/v1/metrics")
+                .build();
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(5)) // TODO: this is only for debugging, way too busy for production.
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, resourceAttributes.getInstrumentationScopeInfo(), resourceAttributes.getResource());
+        reader.register(prometheusMetricProducer);
+    }
+}u}(jd  (b8c2da71beba02ff99da83c998dfa62c4d051908j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj  addedj  K)j  K j  K)j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.metrics.internal.export.MetricProducer;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        MetricSnapshots snapshots = registry.scrape(); // TODO: Filter
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                result.add(factory.create((CounterSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+}u}(jd  (6a9515026c6d40a66e739cddb9259e621f31c1b9j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusResourceAttributes.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X
  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.api.GlobalOpenTelemetry;
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
+import io.opentelemetry.sdk.resources.Resource;
+
+import java.lang.reflect.Field;
+import java.util.Properties;
+
+class PrometheusResourceAttributes {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusResourceAttributes() {
+        this.instrumentationScopeInfo = loadInstrumentationScopeInfo();
+        this.resource = loadExistingResource(GlobalOpenTelemetry.get());
+    }
+
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+        return instrumentationScopeInfo;
+    }
+
+    public Resource getResource() {
+        return resource;
+    }
+
+    private static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusResourceAttributes.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+
+    private static Resource loadExistingResource(OpenTelemetry openTelemetry) {
+        try {
+            MeterProvider meterProvider = openTelemetry.getMeterProvider();
+            if (meterProvider instanceof SdkMeterProvider) {
+                Field sharedStateField = SdkMeterProvider.class.getDeclaredField("sharedState");
+                sharedStateField.setAccessible(true);
+                MeterProviderSharedState sharedState = (MeterProviderSharedState) sharedStateField.get(meterProvider);
+                return sharedState.getResource();
+            }
+        } catch (Exception ignored) {}
+        return Resource.empty();
+    }
+}u}(jd  (2468702a1904c740460e98980e907474ab31e751j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  XM  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl implements DoublePointData {
+
+    private final double value;
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.value = value;
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(jd  (dbd69b2d45f75e70160b07bd111df064359682c2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(jd  (4ea1586db7d3b7ac853334b924b3a6852539555ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  y@@ -0,0 +1,4 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+class PrometheusClassicHistogram {
+}u}(jd  (0a45904d7a58f70efa94c130f372eb1fe1f4dc43j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj  addedj  K3j  K j  K3j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X  @@ -0,0 +1,51 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                startEpochNanos,
+                epochNanos,
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jd  (31a6aaae7cfc712bc25569de7c696bb8c9730c06j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj  addedj  K*j  K j  K*j  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  Xi  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.common.AttributesBuilder;
+import io.opentelemetry.sdk.metrics.data.Data;
+import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return Collections.emptyList();
+    }
+}u}(jd  (00474905371b1ab53ce6d06fd76d93fc652d5741j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj  addedj  KJj  K j  KJj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  X	  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.SumData;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = metricMetadata.getName();
+        this.description = metricMetadata.getHelp();
+        this.unit = metricMetadata.getUnit() == null ? null : metricMetadata.getUnit().toString();
+        this.data = data;
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (getType() == MetricDataType.DOUBLE_SUM) {
+            return (PrometheusCounter) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(jd  (f5d86ba1f71fd7393035dff48f730aca3caea09ej  \prometheus-metrics-exporter-opentelemetry/src/main/resources/instrumentationScope.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.propertiesj  https://github.com/prometheus/client_java/raw/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.properties?ref=2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}ueu(f0864ad165e16141099c4cdff9bf64e41a01bf29}(sha(f0864ad165e16141099c4cdff9bf64e41a01bf29node_idEC_kwDOAHoJt9oAKGYwODY0YWQxNjVlMTYxNDEwOTljNGNkZmY5YmY2NGU0MWEwMWJmMjkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T19:01:43Zu	committer}(jx  Fabian Stäberjz  fabian@fstab.dej|  2023-08-27T19:01:43Zumessage;Add classic histogram support to the OpenTelemetry exportertree}(jp  (ecc02d09a8093e5565b8ab046477f32b6a47f149urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ecc02d09a8093e5565b8ab046477f32b6a47f149uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f0864ad165e16141099c4cdff9bf64e41a01bf29
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/f0864ad165e16141099c4cdff9bf64e41a01bf29html_urlYhttps://github.com/prometheus/client_java/commit/f0864ad165e16141099c4cdff9bf64e41a01bf29comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f0864ad165e16141099c4cdff9bf64e41a01bf29/commentsjv  }(loginfstabidJ' jr  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj~  }(j  fstabj  J' jr  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jp  (cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  dhttps://api.github.com/repos/prometheus/client_java/commits/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  Yhttps://github.com/prometheus/client_java/commit/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00euastats}(totalK	additionsK	deletionsKufiles](}(jp  (447fbc7bb57e4af73cc690f611d9ffd35b012f6afilenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/f0864ad165e16141099c4cdff9bf64e41a01bf29/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/f0864ad165e16141099c4cdff9bf64e41a01bf29/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=f0864ad165e16141099c4cdff9bf64e41a01bf29patchXG  @@ -32,6 +32,7 @@ public static void main(String[] args) throws Exception {
         gauge.withLabelValues("inside").set(23.4);
         gauge.withLabelValues("outside").set(9.3);
 
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
         Histogram histogram = Histogram.newBuilder()
                 .withName("request_latency_seconds")
                 .withHelp("Request duration in seconds")
@@ -44,6 +45,20 @@ public static void main(String[] args) throws Exception {
             histogram.withLabelValues("200").observe(random.nextGaussian());
         }
 
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i=0; i<15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u4      }(jp  (7908bee2ba3c186de26199f194bdde88245a9b3fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=f0864ad165e16141099c4cdff9bf64e41a01bf29j  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(jp  (f56b593934a4ed60d94cde39aafee23e36f2c14dj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=f0864ad165e16141099c4cdff9bf64e41a01bf29j  X  @@ -33,7 +33,7 @@ public MetricData create(HistogramSnapshot snapshot) {
             if (firstDataPoint.hasNativeHistogramData()) {
                 return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
             } else if (firstDataPoint.hasClassicHistogramData()) {
-                return null;//new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
             }
         }
         return null;u}(jp  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  modifiedj  KMj  Kj  KNj  https://github.com/prometheus/client_java/blob/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=f0864ad165e16141099c4cdff9bf64e41a01bf29j  X  @@ -1,4 +1,80 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-class PrometheusClassicHistogram {
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
 }u}(jp  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  https://github.com/prometheus/client_java/raw/f0864ad165e16141099c4cdff9bf64e41a01bf29/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=f0864ad165e16141099c4cdff9bf64e41a01bf29j  X  @@ -17,7 +17,7 @@ class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPoint
 
     private final List<ExponentialHistogramPointData> points;
 
-    public PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
         super(MetricDataType.EXPONENTIAL_HISTOGRAM);
         this.points = snapshot.getData().stream()
                 .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))ueu(810cdcb4a916e669645eb585f0aced4e6db70bf9}(sha(810cdcb4a916e669645eb585f0aced4e6db70bf9node_idEC_kwDOAHoJt9oAKDgxMGNkY2I0YTkxNmU2Njk2NDVlYjU4NWYwYWNlZDRlNmRiNzBiZjkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T21:02:06Zu	committer}(j
  Fabian Stäberj  fabian@fstab.dej  2023-08-29T21:02:06Zumessage5[maven-release-plugin] prepare release v1.0.0-alpha-3tree}(j  (54ca4b50e18571020e09b68cc975bb780e97dd33urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/54ca4b50e18571020e09b68cc975bb780e97dd33uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/810cdcb4a916e669645eb585f0aced4e6db70bf9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/810cdcb4a916e669645eb585f0aced4e6db70bf9html_urlYhttps://github.com/prometheus/client_java/commit/810cdcb4a916e669645eb585f0aced4e6db70bf9comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/810cdcb4a916e669645eb585f0aced4e6db70bf9/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj)  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j.  fstabj0  J' j  MDQ6VXNlcjMzMDUzNQ==j2  2https://avatars.githubusercontent.com/u/330535?v=4j4  h3j  "https://api.github.com/users/fstabj)  https://github.com/fstabj7  ,https://api.github.com/users/fstab/followersj9  9https://api.github.com/users/fstab/following{/other_user}j;  2https://api.github.com/users/fstab/gists{/gist_id}j=  9https://api.github.com/users/fstab/starred{/owner}{/repo}j?  0https://api.github.com/users/fstab/subscriptionsjA  'https://api.github.com/users/fstab/orgsjC  (https://api.github.com/users/fstab/reposjE  3https://api.github.com/users/fstab/events{/privacy}jG  2https://api.github.com/users/fstab/received_eventsjI  UserjK  uparents]}(j  (de20057419d811cc00b1b70476c7f0cc2253c2eej  dhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2eej)  Yhttps://github.com/prometheus/client_java/commit/de20057419d811cc00b1b70476c7f0cc2253c2eeuastats}(totalK	additionsKS	deletionsK^ufiles](}(j  (1aa6fad17f8448b4813133428045ea68c6ed65b7filenamebenchmarks/pom.xmlstatusmodifiedje  Kjf  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j  (a8eeb5d4899c6e6dc613e80cf502fd8fd3f3297ajk  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(j  (c431418ed65338d41f9b1faac6b53f8004f437c1jk  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(j  (65484d6e1a964c16071cb9d2c5104c8e07518e43jk  0examples/example-exemplars-tail-sampling/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(j  (467fb348d3540f7f12fd2280e78f7c5e2666e1c0jk  ,examples/example-exporter-httpserver/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-httpserver%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-httpserver%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,12 +5,12 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>>Example - HTTPServer Exporter</name>
+    <name>&gt;Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>u}(j  (a90000162976d67cffbf4c60adc1df18b8061945jk  /examples/example-exporter-opentelemetry/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-opentelemetry</artifactId>u}(j  (fc2cfb93084d8ea116fcdfcc9704281a42167ff9jk  0examples/example-exporter-servlet-tomcat/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-servlet-tomcat</artifactId>u}(j  (df80b2dc93e1886d75231276c6887c3b6c5ae5c3jk  examples/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  jhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fpom.xmljr  ihttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/examples%2Fpom.xmljt  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j  (3b1f6e7bf6f480163b55858fa7b9c5b61743b7b9jk  #integration-tests/it-common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-common%2Fpom.xmljr  ~https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-common</artifactId>u}(j  (e4c82f5d72aa2f8536ab7f877eb5e1f4be2c814djk  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-httpserver-sample</artifactId>
@@ -59,8 +58,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (d540031c377c2d883381a847189618fdd76ed5f2jk  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-jetty-sample</artifactId>
@@ -69,8 +68,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (14dc2264170775b2622597530fc42a07fc136e62jk  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
@@ -64,8 +63,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (46210fb410338d1e258af347f3f4fde0e3c346bajk  6integration-tests/it-exporter/it-exporter-test/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-test</artifactId>u}(j  (6cfe693920f8e46354ffb01d64e598afcd272578jk  %integration-tests/it-exporter/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fit-exporter%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  Xy  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter</artifactId>
@@ -29,7 +29,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j  (606f76c19ed294e2c332c4a2fbd85311de0cd1b1jk  integration-tests/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  shttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fpom.xmljr  rhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration-tests%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X
  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration-tests</artifactId>u}(j  (4ca25a7cb88835a42732dce722982167d627406fjk  #integration_tests/it_common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_common%2Fpom.xmljr  ~https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j  (b9273570915bf76bb9a52e590da4929148f866ddjk  1integration_tests/it_exemplars_otel_agent/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j  (9fb9b25466d0534e21016a36fded5f00accc97a5jk  /integration_tests/it_exemplars_otel_sdk/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j  (d64cb5d18c6caf1458c3c63a21c5a965978376aejk  *integration_tests/it_java_versions/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_java_versions%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_java_versions%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j  (30ad7acff60ea1dc2bc2a7ac1ef45ee9152f74d9jk  #integration_tests/it_log4j2/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_log4j2%2Fpom.xmljr  ~https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_log4j2%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j  (b5ad62158281fc7bf60981f2d5440a07535b33f3jk  (integration_tests/it_pushgateway/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_pushgateway%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_pushgateway%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j  (d5778e6f8f81735ec093db9732f530e04b2c602ejk  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j  (2daf4dfacef43eb4557b60356fdea520c9724bf5jk  integration_tests/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  shttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fpom.xmljr  rhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/integration_tests%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j  (97dcd97cc7f92303f2511635b9008ca4b35ac4a5jk  pom.xmljm  modifiedje  Kjf  Kjo  Kjp  _https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/pom.xmljr  ^https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/pom.xmljt  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j  (8e1b23b441b35318db3678458aac791cb88836ecjk  !prometheus-metrics-config/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  {https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-config%2Fpom.xmljr  zhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-config%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j  (29006bdf7c2df80aeb863facdea6ab8ba151e742jk  prometheus-metrics-core/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  yhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-core%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-core%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j  (390439f708c64cce40b7221a67c0610565455480jk  *prometheus-metrics-exporter-common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-common%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X$  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-common</artifactId>u}(j  (3b14f9dc5951b00250a865dfc60b0b40a6ebb987jk  .prometheus-metrics-exporter-httpserver/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-httpserver%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-httpserver%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-httpserver</artifactId>u}(j  (0a2cd8150ec347d082ce4093dcbb53e3f00bae3fjk  1prometheus-metrics-exporter-opentelemetry/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  XI  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
@@ -163,7 +162,7 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j  (8bfdfc26181d5cc1dabb07cc6e6fddca5a46a561jk  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j  (fd3e07332d06c402d4511cad6bbfb1eb82029349jk  -prometheus-metrics-exposition-formats/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exposition-formats%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-exposition-formats%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j  (5e5624b09aaa5e795f56e4d58a3d3034ba34b7bcjk   prometheus-metrics-model/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  zhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-model%2Fpom.xmljr  yhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-model%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j  (fabe5129d2da4978e1d3db7360108d3938f74815jk  .prometheus-metrics-shaded-dependencies/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-dependencies</artifactId>u}(j  (5c1794ba45988c0c8fa5d39c218725621dd26e22jk  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmljm  modifiedje  Kjf  Kjo  K	jp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  Xl  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
@@ -100,8 +99,8 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j  (4f6338bd6f169c41d181612c37dc5b140bdafb54jk  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X9  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>u}(j  (d0273c9a85bf9c97e875c17c6655d875e4e80dc1jk  !prometheus-metrics-tracer/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  {https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fpom.xmljr  zhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j  (c9ec1c6a92f489d1f086c2df29a2e02251383e93jk  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j  (d20c307b3afa65db5e3507af4aaca53b0e7ee694jk  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j  (0c2f2fac8b597ad8b242a75fd51e846ddab9f013jk  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j  (d78f16b88328e3e8d4199ee7b3ac6d5f05c0cda7jk  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j  (2818fd55874acf3f2141ef5ad4f9c6f2cbed209cjk  simpleclient/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  nhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient%2Fpom.xmljr  mhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j  (756e119ae0748be0770f53e6db1a7a01395b192ejk  simpleclient_bom/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  rhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_bom%2Fpom.xmljr  qhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_bom%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j  (20569d35101deaf371c3d81ee1ccbf644299f400jk  simpleclient_caffeine/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  whttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_caffeine%2Fpom.xmljr  vhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_caffeine%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j  (aa51669f15fe134a3f1983e0d4d7a6a0018fb0c2jk  simpleclient_common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  uhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_common%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j  (9620fb10b6d15feaf8372dcb98ed30da19bf92afjk  simpleclient_dropwizard/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  yhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_dropwizard%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_dropwizard%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j  (84c8754d7e530ac8e87ea4e3405e3b7c855e3b26jk  $simpleclient_graphite_bridge/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  ~https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_graphite_bridge%2Fpom.xmljr  }https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_graphite_bridge%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j  (daa0976c8d643772d10c3412052659362604a07ajk  simpleclient_guava/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  thttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_guava%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_guava%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j  (29d10e14a5406aed92740e3c5d46249f41acd05djk  simpleclient_hibernate/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  xhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_hibernate%2Fpom.xmljr  whttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_hibernate%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j  (2919ee0558297f6a69055b7d5ce2e3b7859a0c8cjk  simpleclient_hotspot/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  vhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_hotspot%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_hotspot%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j  (b2e14542758826a5f683ceb407f245c672ffdbdfjk  simpleclient_httpserver/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  yhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_httpserver%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_httpserver%2Fpom.xml	     jt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j  (e6c9be70ef22d10c0619820508ded24f09aa27a0jk  simpleclient_jetty/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  thttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_jetty%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_jetty%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j  (0c90d94b7e8ca4be49c04418fa8b81f26542810bjk  simpleclient_jetty_jdk8/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  yhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_jetty_jdk8%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_jetty_jdk8%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j  (601b78883a48e92d3fc3db6eea861c2b7a4816fajk  simpleclient_log4j/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  thttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_log4j%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_log4j%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j  (278d3927a32539e72e24f0ffa7878ba4d6024bf6jk  simpleclient_log4j2/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  uhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_log4j2%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_log4j2%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j  (68c5cf33186f1830cc79f9d40c2ff0eb92509a9ajk  simpleclient_logback/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  vhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_logback%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_logback%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j  (14e1db742a2265a61a5f526ed9d6780f0047cbb8jk   simpleclient_pushgateway/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  zhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_pushgateway%2Fpom.xmljr  yhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_pushgateway%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j  (9e50abf59e089ac5b84d244757d2df6f27e9947ejk  simpleclient_servlet/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  vhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j  (e3e087827f08325ea527919aea26207e4cf5c0ccjk  #simpleclient_servlet_common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  }https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet_common%2Fpom.xmljr  |https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet_common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j  (f714b6fae44739fb5ea7b935561d8284cbe8225ajk  $simpleclient_servlet_jakarta/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  ~https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet_jakarta%2Fpom.xmljr  }https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_servlet_jakarta%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j  (8b5543dd4b501c4fb38e8f142ab16426b5e410b3jk  simpleclient_spring_web/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  yhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_spring_web%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_spring_web%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j  (c98b788ead7ca38ec60ea0d92b8400ec5c849707jk  simpleclient_tracer/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  uhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j  (1b1381afc0dd5b1f10860cf4324fa4be44d062a0jk  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j  (01558b9ee33ade44a07978646f82d0a2354382acjk  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j  (15120bf103fe3eb6f1d82fbc8a0fadf8ce3cb1d3jk  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  https://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j  (dadab7e3e7f8f4fd0bc0aad027a3451180d8a93ajk  simpleclient_vertx/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  thttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_vertx%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_vertx%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j  (75dd831a8eb955671c27f558b6e0beef6aacf787jk  simpleclient_vertx4/pom.xmljm  modifiedje  Kjf  Kjo  Kjp  uhttps://github.com/prometheus/client_java/blob/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_vertx4%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/810cdcb4a916e669645eb585f0aced4e6db70bf9/simpleclient_vertx4%2Fpom.xmljt  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=810cdcb4a916e669645eb585f0aced4e6db70bf9jv  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(56306fa5cf932c0ee7902380c51f44c72aa4202b}(sha(56306fa5cf932c0ee7902380c51f44c72aa4202bnode_idEC_kwDOAHoJt9oAKDU2MzA2ZmE1Y2Y5MzJjMGVlNzkwMjM4MGM1MWY0NGM3MmFhNDIwMmIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T11:29:42Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-17T11:29:42Zumessage5[maven-release-plugin] prepare release v1.0.0-alpha-1tree}(j  (399a605e244463baa76e7f1d73015dda5a0a036durlfhttps://api.github.com/repos/prometheus/client_java/git/trees/399a605e244463baa76e7f1d73015dda5a0a036duj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/56306fa5cf932c0ee7902380c51f44c72aa4202b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/56306fa5cf932c0ee7902380c51f44c72aa4202bhtml_urlYhttps://github.com/prometheus/client_java/commit/56306fa5cf932c0ee7902380c51f44c72aa4202bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/56306fa5cf932c0ee7902380c51f44c72aa4202b/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (38e92cc17eb7e72c26f238804fb049939e1c6f55j  dhttps://api.github.com/repos/prometheus/client_java/commits/38e92cc17eb7e72c26f238804fb049939e1c6f55j  Yhttps://github.com/prometheus/client_java/commit/38e92cc17eb7e72c26f238804fb049939e1c6f55uastats}(totalKv	additionsK8	deletionsK>ufiles](}(j  (8c3fe0d433e43a8ee869b9d6fb490d727ce5d326filenamebenchmarks/pom.xmlstatusmodifiedj  Kj  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j  (180db27c8beb75c55e1ad27357ea14636d103bb0j  examples/pom.xmlj  modifiedj  Kj  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j  (00e9c7303620aa434cfd3c21a97bd264a524ded1j  'examples/tomcat-servlet-example/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(j  (467ae1dc0526f17004539e3e414a3fcc3371c330j  #integration_tests/it_common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_common%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j  (bdb7a36349a3a9403d9fd225a5dca6e47824aee6j  1integration_tests/it_exemplars_otel_agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j  (23a3b2458e6b097acbff64a00488ce81617534cdj  /integration_tests/it_exemplars_otel_sdk/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j  (101fb04b4f8ac90a3a2f97f6e9864af048df5355j  *integration_tests/it_java_versions/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j  (79019eb3ee8c365ee28eefc05bacdd964934afaej  #integration_tests/it_log4j2/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_log4j2%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j  (4c8190bf867a5b19065632c89ec2860939e5f34dj  (integration_tests/it_pushgateway/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j  (dce018335dd45dd2e31e72aafb5603069a50dc1ej  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j  (dd8a9666abb8d37acd349dbebc2c6d4fbd0fb020j  integration_tests/pom.xmlj  modifiedj  Kj  Kj  Kj  shttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fpom.xmlj  rhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/integration_tests%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j  (fd0842a2b928f2aa37bb4866cd15588b958463b5j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/pom.xmlj  ^https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-1</tag>
     </scm>
 
     <developers>u}(j  (5b6a16a1802f0ff8c90a433c6be69f7e17e11e5ej  !prometheus-metrics-config/pom.xmlj  modifiedj  Kj  Kj  Kj  {https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-config%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-config%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j  (0c64d204426a6070fe6136887d6fe93b25aab78fj  prometheus-metrics-core/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j  (e7829efad62c1cab88d5eb67b69b7a79a926100ej  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j  (364c081fac426c63a8cffb2c7420d78a776cce56j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X!  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j  (8815b15d2fe9752c0273af42507c118312a05f24j   prometheus-metrics-model/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-model%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-model%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j  (0c11768347ac58814bb550c48ad50bda939f6226j  !prometheus-metrics-tracer/pom.xmlj  modifiedj  Kj  Kj  Kj  {https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j  (40e4e6dd6e4a4657e4169edeaaeb2a62387d1cb2j  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j  (9a4cfda2e19fb4e342b45c7972046cd09c2beb42j  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j  (d7163b2d9951a06d15f584c534d61b9e414cfcd6j  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j  (ad3900400eee996fab4b372362ea7ca7b8328b7cj  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j  (fa9d90e852deaa61c131d3f42d4d09f2436e90d5j  protobuf-shaded/pom.xmlj  modifiedj  Kj  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(j  (a94a98560359e7587c1ddb6ffd82f98f0d67c71cj  simpleclient/pom.xmlj  modifiedj  Kj  Kj  Kj  nhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient%2Fpom.xmlj  mhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j  (47fff77bd4eb3648b69db213d755e3c3266700d0j  simpleclient_bom/pom.xmlj  modifiedj  Kj  Kj  Kj  rhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_bom%2Fpom.xmlj  qhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_bom%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j  (c020a91e4b01cbef3ce7194dcb9fb13c31586f96j  simpleclient_caffeine/pom.xmlj  modifiedj  Kj  Kj  Kj  whttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_caffeine%2Fpom.xmlj  vhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_caffeine%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j  (2dbe544515e9662086977112d331b98172460bacj  simpleclient_common/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_common%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j  (3be5f95827586539e282f2b6f8495d533ab6d06ej  simpleclient_dropwizard/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_dropwizard%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_dropwizard%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j  (30f5436f13d500c236fedcbdf5431305d41d7873j  $simpleclient_graphite_bridge/pom.xmlj  modifiedj  Kj  Kj  Kj  ~https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_graphite_bridge%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_graphite_bridge%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j  (53f8ebcdfd16fb461e5ca7965a09bc5d762ef675j  simpleclient_guava/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_guava%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_guava%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j  (acc2f9638a1917550ca157ca5b35cd5fcfd65d11j  simpleclient_hibernate/pom.xmlj  modifiedj  Kj  Kj  Kj  xhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_hibernate%2Fpom.xmlj  whttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_hibernate%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j  (2c01371a30e9a325492521c0e30b7c53077846f1j  simpleclient_hotspot/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_hotspot%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_hotspot%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j  (a336c0995776a227a83ef953e10ee7929cf792aaj  simpleclient_httpserver/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_httpserver%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j  (57563ce625f4d84f17241bde1627e87b5bed8ab0j  simpleclient_jetty/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_jetty%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_jetty%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j  (0b6d8b4ba0a540e74c02b80bcf5ddead0e432324j  simpleclient_jetty_jdk8/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_jetty_jdk8%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_jetty_jdk8%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j  (6f9b8f65572fb49fdde098f06c6706b8f9bc13ddj  simpleclient_log4j/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_log4j%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_log4j%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j  (ad85625aa843f97e3e2334b677ed99c01603e124j  simpleclient_log4j2/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_log4j2%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j  (e78ef0b106a19912201ea06c1dda79450ee40748j  simpleclient_logback/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_logback%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_logback%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j  (df6f86248d8896d3874bfb07da087826df9a0e77j   simpleclient_pushgateway/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_pushgateway%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j  (ddedfc18de610e39a9a3ce45467f1a057870e8f4j  simpleclient_servlet/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j  (5e71a629d32a125ecff3ebd46f5747afe8c6c5d2j  #simpleclient_servlet_common/pom.xmlj  modifiedj  Kj  Kj  Kj  }https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet_common%2Fpom.xmlj  |https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j  (94b821104c33682d5229f397324f0bab21dd0d24j  $simpleclient_servlet_jakarta/pom.xmlj  modifiedj  Kj  Kj  Kj  ~https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet_jakarta%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_servlet_jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j  (4ccbcee9a02a44b8a8d6de45a4e7644e79b4ba3fj  simpleclient_spring_web/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_spring_web%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_spring_web%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j  (8efaae5108c151dfd1dcbd3c3bb5961d76dec4f6j  simpleclient_tracer/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j  (fcdd572fcdafd05a57480a754b16b0727e6dd784j  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j  (56be6b1a244a2b4d1e6e60a07efe5fceacd5a829j  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j  (19c8edc4d016d831fc80dd3f46b0dcab30dab25dj  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j  (cf0649de1aad505b197841d2a8c782fe136fcf59j  simpleclient_vertx/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_vertx%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_vertx%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j  (155425d2fcf0dfd7c630c5ba17e0b1ef020b1d28j  simpleclient_vertx4/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_vertx4%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/56306fa5cf932c0ee7902380c51f44c72aa4202b/simpleclient_vertx4%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=56306fa5cf932c0ee7902380c51f44c72aa4202bj  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(ce949f76b8e921e32ab24ebb645ec1940d9334c8}(sha(ce949f76b8e921e32ab24ebb645ec1940d9334c8node_idEC_kwDOAHoJt9oAKGNlOTQ5Zjc2YjhlOTIxZTMyYWIyNGViYjY0NWVjMTk0MGQ5MzM0Yzgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-31T20:24:36Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-31T20:24:36ZumessageAdd JVM compilation metricstree}(jw  (7d0f218a34544bee432f648fa64e905dfe1db19furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/7d0f218a34544bee432f648fa64e905dfe1db19fuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/ce949f76b8e921e32ab24ebb645ec1940d9334c8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/ce949f76b8e921e32ab24ebb645ec1940d9334c8html_urlYhttps://github.com/prometheus/client_java/commit/ce949f76b8e921e32ab24ebb645ec1940d9334c8comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/ce949f76b8e921e32ab24ebb645ec1940d9334c8/commentsj}  }(loginfstabidJ' jy  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' jy  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jw  (8ab8e7256075cd5242bbb84ce697c7925df6ee61j  dhttps://api.github.com/repos/prometheus/client_java/commits/8ab8e7256075cd5242bbb84ce697c7925df6ee61j  Yhttps://github.com/prometheus/client_java/commit/8ab8e7256075cd5242bbb84ce697c7925df6ee61uastats}(totalK	additionsK	deletionsK ufiles](}(jw  (266d5e650f32fd9c71cb1f24af32fe7b4517a9e4filenameyprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmCompilationMetrics.javastatusaddedj  KWj  K changesKWblob_urlhttps://github.com/prometheus/client_java/blob/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.javaraw_urlhttps://github.com/prometheus/client_java/raw/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetrics.java?ref=ce949f76b8e921e32ab24ebb645ec1940d9334c8patchXj  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.CounterWithCallback;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.lang.management.CompilationMXBean;
+import java.lang.management.ManagementFactory;
+
+import static io.prometheus.metrics.model.snapshots.Unit.millisToSeconds;
+
+/**
+ * Exports metrics about JVM compilation.
+ * <p>
+ * Example usage:
+ * <pre>
+ * {@code
+ *   new CompilationExports().register();
+ * }
+ * </pre>
+ * Example metrics being exported:
+ * <pre>
+ *   jvm_compilation_time_ms_total{} 123432
+ * </pre>
+ */
+public class JvmCompilationMetrics {
+
+    private static final String JVM_COMPILATION_TIME_SECONDS_TOTAL = "jvm_compilation_time_seconds_total";
+
+    private final PrometheusProperties config;
+    private final CompilationMXBean compilationBean;
+
+    private JvmCompilationMetrics(CompilationMXBean compilationBean, PrometheusProperties config) {
+        this.compilationBean = compilationBean;
+        this.config = config;
+    }
+
+    private void register(PrometheusRegistry registry) {
+
+        if (compilationBean == null || !compilationBean.isCompilationTimeMonitoringSupported()) {
+            return;
+        }
+
+        CounterWithCallback.newBuilder(config)
+                .withName(JVM_COMPILATION_TIME_SECONDS_TOTAL)
+                .withHelp("The total time in seconds taken for HotSpot class compilation")
+                .withUnit(Unit.SECONDS)
+                .withCallback(callback -> callback.call(millisToSeconds(compilationBean.getTotalCompilationTime())))
+                .register(registry);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private CompilationMXBean compilationBean;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withCompilationBean(CompilationMXBean compilationBean) {
+            this.compilationBean = compilationBean;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            CompilationMXBean compilationBean = this.compilationBean != null ? this.compilationBean : ManagementFactory.getCompilationMXBean();
+            new JvmCompilationMetrics(compilationBean, config).register(registry);
+        }
+    }
+}u      }(jw  (0e35a112bb1b17aab5df371a064e921105205b5fj  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj  https://github.com/prometheus/client_java/raw/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=ce949f76b8e921e32ab24ebb645ec1940d9334c8j  X~  @@ -33,6 +33,7 @@ public void register(PrometheusRegistry registry) {
             JvmThreadsMetrics.newBuilder(config).register(registry);
             JvmBufferPoolMetrics.newBuilder(config).register(registry);
             JvmClassLoadingMetrics.newBuilder(config).register(registry);
+            JvmCompilationMetrics.newBuilder(config).register(registry);
         }
     }
 }u}(jw  (1bde4873de5da56dbbdae2471e45f0b3160bc8dfj  }prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmCompilationMetricsTest.javaj  addedj  K>j  K j  K>j  https://github.com/prometheus/client_java/blob/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetricsTest.javaj  https://github.com/prometheus/client_java/raw/ce949f76b8e921e32ab24ebb645ec1940d9334c8/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmCompilationMetricsTest.java?ref=ce949f76b8e921e32ab24ebb645ec1940d9334c8j  X	  @@ -0,0 +1,62 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.io.IOException;
+import java.lang.management.CompilationMXBean;
+
+import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.internal.verification.VerificationModeFactory.times;
+
+public class JvmCompilationMetricsTest {
+
+    private CompilationMXBean mockCompilationBean = Mockito.mock(CompilationMXBean.class);
+
+    @Before
+    public void setUp() {
+        when(mockCompilationBean.getTotalCompilationTime()).thenReturn(10000l);
+        when(mockCompilationBean.isCompilationTimeMonitoringSupported()).thenReturn(true);
+    }
+
+    @Test
+    public void testGoodCase() throws IOException {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmCompilationMetrics.newBuilder()
+                .withCompilationBean(mockCompilationBean)
+                .register(registry);
+        MetricSnapshots snapshots = registry.scrape();
+
+        String expected = "" +
+                "# TYPE jvm_compilation_time_seconds counter\n" +
+                "# UNIT jvm_compilation_time_seconds seconds\n" +
+                "# HELP jvm_compilation_time_seconds The total time in seconds taken for HotSpot class compilation\n" +
+                "jvm_compilation_time_seconds_total 10.0\n" +
+                "# EOF\n";
+
+        Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
+    }
+
+    @Test
+    public void testIgnoredMetricNotScraped() {
+        MetricNameFilter filter = MetricNameFilter.newBuilder()
+                .nameMustNotBeEqualTo("jvm_compilation_time_seconds_total")
+                .build();
+
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmCompilationMetrics.newBuilder()
+                .withCompilationBean(mockCompilationBean)
+                .register(registry);
+        MetricSnapshots snapshots = registry.scrape(filter);
+
+        verify(mockCompilationBean, times(0)).getTotalCompilationTime();
+        Assert.assertEquals(0, snapshots.size());
+    }
+}ueu(ff25014b2a6a875723c6f640b73591daedadb9ba}(sha(ff25014b2a6a875723c6f640b73591daedadb9banode_idEC_kwDOAHoJt9oAKGZmMjUwMTRiMmE2YTg3NTcyM2M2ZjY0MGI3MzU5MWRhZWRhZGI5YmEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-22T21:04:07Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-22T21:04:07ZumessageFix opentelemetry shadedtree}(j  (3d11207eedd608a03b16e5ee0ee483238ed8c324urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/3d11207eedd608a03b16e5ee0ee483238ed8c324uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/ff25014b2a6a875723c6f640b73591daedadb9ba
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/ff25014b2a6a875723c6f640b73591daedadb9bahtml_urlYhttps://github.com/prometheus/client_java/commit/ff25014b2a6a875723c6f640b73591daedadb9bacomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/ff25014b2a6a875723c6f640b73591daedadb9ba/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj   https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj
  }(j%  fstabj'  J' j  MDQ6VXNlcjMzMDUzNQ==j)  2https://avatars.githubusercontent.com/u/330535?v=4j+  h3j  "https://api.github.com/users/fstabj   https://github.com/fstabj.  ,https://api.github.com/users/fstab/followersj0  9https://api.github.com/users/fstab/following{/other_user}j2  2https://api.github.com/users/fstab/gists{/gist_id}j4  9https://api.github.com/users/fstab/starred{/owner}{/repo}j6  0https://api.github.com/users/fstab/subscriptionsj8  'https://api.github.com/users/fstab/orgsj:  (https://api.github.com/users/fstab/reposj<  3https://api.github.com/users/fstab/events{/privacy}j>  2https://api.github.com/users/fstab/received_eventsj@  UserjB  uparents]}(j  (5ffc1e4bad21be8459a1dde4010993fcb2570f57j  dhttps://api.github.com/repos/prometheus/client_java/commits/5ffc1e4bad21be8459a1dde4010993fcb2570f57j   Yhttps://github.com/prometheus/client_java/commit/5ffc1e4bad21be8459a1dde4010993fcb2570f57uastats}(totalK	additionsK 	deletionsKufiles]}(j  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068filenameVprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlstatusmodifiedj\  K j]  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/ff25014b2a6a875723c6f640b73591daedadb9ba/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/ff25014b2a6a875723c6f640b73591daedadb9ba/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=ff25014b2a6a875723c6f640b73591daedadb9bapatchX]  @@ -111,7 +111,6 @@
                                         <exclude>META-INF/maven/org.jetbrains/**</exclude>
                                         <exclude>META-INF/versions/**</exclude>
                                         <exclude>META-INF/native-image/**</exclude>
-                                        <exclude>META-INF/services/**</exclude>
                                         <exclude>META-INF/proguard/**</exclude>
                                         <exclude>META-INF/*.kotlin_module</exclude>
                                         <exclude>META-INF/MANIFEST.MF</exclude>uau(e43f92a3c6895c1b2cf44aedcef881126689db85}(sha(e43f92a3c6895c1b2cf44aedcef881126689db85node_idEC_kwDOAHoJt9oAKGU0M2Y5MmEzYzY4OTVjMWIyY2Y0NGFlZGNlZjg4MTEyNjY4OWRiODUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T15:11:58Zu	committer}(jy  Fabian Stäberj{  fabian@fstab.dej}  2023-07-27T15:11:58Zumessage5[maven-release-plugin] prepare release v1.0.0-alpha-2tree}(jq  (d95573e42c62acdd80fea1f560c3d0313f52ac3aurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d95573e42c62acdd80fea1f560c3d0313f52ac3auj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/e43f92a3c6895c1b2cf44aedcef881126689db85
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/e43f92a3c6895c1b2cf44aedcef881126689db85html_urlYhttps://github.com/prometheus/client_java/commit/e43f92a3c6895c1b2cf44aedcef881126689db85comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/e43f92a3c6895c1b2cf44aedcef881126689db85/commentsjw  }(loginfstabidJ' js  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' js  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jq  (0179958f2dd63ad4ac302a0b1617e0a66ef68099j  dhttps://api.github.com/repos/prometheus/client_java/commits/0179958f2dd63ad4ac302a0b1617e0a66ef68099j  Yhttps://github.com/prometheus/client_java/commit/0179958f2dd63ad4ac302a0b1617e0a66ef68099uastats}(totalKh	additionsK4	deletionsK4ufiles](}(jq  (238f892f4ee659d94b38cba0c60967d62b0e8874filenamebenchmarks/pom.xmlstatusmodifiedj  Kj  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jq  (4fef86e0ccf705a6e2347972a3e34f2154902e5dj  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(jq  (26b132d5ce745cd0eeb36baff86981e834875b9bj  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(jq  (32ae90fe6c7d4c882c2c014fbf69884722e77c8aj  0examples/example-exemplars-tail-sampling/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(jq  (9bd0783e56f201dc21eb0b5e63336ff43df57899j  'examples/example-tomcat-servlet/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-tomcat-servlet%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fexample-tomcat-servlet%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>example-tomcat-servlet</artifactId>u}(jq  (de07f002334ce3a55a2506052bcf8d9fa0a89b3cj  examples/pom.xmlj  modifiedj  Kj  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jq  (ff8ed9edac7146712e1630a27f549269026d0016j  #integration_tests/it_common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_common%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jq  (5a7b0eb5badca5e4c95d6cc2b60b056da4d6d427j  1integration_tests/it_exemplars_otel_agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jq  (591084722508c710cd9ff24552ad5743892f7ce0j  /integration_tests/it_exemplars_otel_sdk/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jq  (dbad1fdd37eb5c180bdf3805d86e9147c36e0959j  *integration_tests/it_java_versions/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jq  (4c86479c857d378f522d7d9dc98909777c71334fj  #integration_tests/it_log4j2/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_log4j2%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jq  (7eaf242df31e5876ab127fc8133db17ff87e3829j  (integration_tests/it_pushgateway/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jq  (96b435a48968cce106b007d2e94a8ad3d34394e1j  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jq  (8529b6b10e619524badb05a72de5a1ba9123e8b8j  integration_tests/pom.xmlj  modifiedj  Kj  Kj  Kj  shttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fpom.xmlj  rhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/integration_tests%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jq  (4d219b6bfeac23ff4ee3070308a7f93b4c3dee00j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/pom.xmlj  ^https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-2</tag>
     </scm>
 
     <developers>u}(jq  (73ecc89e5435e8c9016e74d2abe9186088cfd6d2j  !prometheus-metrics-config/pom.xmlj  modifiedj  Kj  Kj  Kj  {https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-config%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-config%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jq  (d14a020647545c10cbb18b840a575a95fe75162bj  prometheus-metrics-core/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jq  (a8052d3a40a0368c82aeba06f3b9d8bf3b9c5c9fj  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jq  (961bc9f09c684627c83820f3d7f6009a09e8e9e3j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jq  (6e72b41803bb394e760be031227c0e3cd6915d78j   prometheus-metrics-model/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-model%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-model%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jq  (bbdf1208cba97cfb2015d89d214b4478fd1988bbj  !prometheus-metrics-tracer/pom.xmlj  modifiedj  Kj  Kj  Kj  {https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jq  (a129fd5dc290dea8b0501f640bb2eb03c4c9dd94j  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jq  (0346800030bb8962d4dabcdfee11a66e61caea78j  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jq  (ec539c878d8bc689120ddfeaa394905a5dfe9bd2j  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jq  (b54f5aeb9aedf3590d2504e92d773df5c8fa2a0aj  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jq  (d434be46b90f81211c824aa1eb8d597ce8b81bf3j  simpleclient/pom.xmlj  modifiedj  Kj  Kj  Kj  nhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient%2Fpom.xmlj  mhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jq  (482c6e2bebdc1e5a31b306ba99fe59537260a78aj  simpleclient_bom/pom.xmlj  modifiedj  Kj  Kj  Kj  rhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_bom%2Fpom.xmlj  qhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_bom%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jq  (6f017b5df5fa87d111343a97796ef1d0633394f3j  simpleclient_caffeine/pom.xmlj  modifiedj  Kj  Kj  Kj  whttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_caffeine%2Fpom.xmlj  vhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_caffeine%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jq  (322ddd0230a1a43d8e910b15199ad8d593990541j  simpleclient_common/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_common%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jq  (48828b9ca4aa94e885ed95f4ab5ecbe3d8b52c0bj  simpleclient_dropwizard/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_dropwizard%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_dropwizard%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jq  (763b615b2cd176df586d3b39c6bd43ef76858b89j  $simpleclient_graphite_bridge/pom.xmlj  modifiedj  Kj  Kj  Kj  ~https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_graphite_bridge%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_graphite_bridge%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jq  (9be4b20eaf9af05cf9d744d18d7bcc3c4b83e77dj  simpleclient_guava/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_guava%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_guava%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jq  (311b6b46a818ea01c8a8c839a116159b77c99be7j  simpleclient_hibernate/pom.xmlj  modifiedj  Kj  Kj  Kj  xhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_hibernate%2Fpom.xmlj  whttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_hibernate%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jq  (a3a029a0d05fc2c9c84ef8b70fa242ce56349f47j  simpleclient_hotspot/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_hotspot%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_hotspot%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jq  (46655297ae21c8513843149cc7b73172b12fd7a8j  simpleclient_httpserver/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_httpserver%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jq  (fdbda16e850ab1d184581cb09de06f519a88f3c0j  simpleclient_jetty/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_jetty%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_jetty%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jq  (a56b26329b20a37f0449a0fc26c62bd3cfd657fbj  simpleclient_jetty_jdk8/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_jetty_jdk8%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_jetty_jdk8%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jq  (74a51207a16a6dedbb4c52613c1a1cbe4451031fj  simpleclient_log4j/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_log4j%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_log4j%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jq  (d57d971a12c42aa38f8640458ddab692a2843ae6j  simpleclient_log4j2/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_log4j2%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jq  (6d17d162b7fa7913d6a3e0d7b9c19573a51373bdj  simpleclient_logback/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_logback%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_logback%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jq  (2bde0b99ed8a5542c9403277250967813c464515j   simpleclient_pushgateway/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_pushgateway%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jq  (af143348225822a9306c64ab159538cadbf2f80bj  simpleclient_servlet/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jq  (1e9d8e41cd6e9932c0e8b05a087eff5290a857ffj  #simpleclient_servlet_common/pom.xmlj  modifiedj  Kj  Kj  Kj  }https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet_common%2Fpom.xmlj  |https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jq  (4af8b73057cd850d91b39372946f11116b6145b7j  $simpleclient_servlet_jakarta/pom.xmlj  modifiedj  Kj  Kj  Kj  ~https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet_jakarta%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_servlet_jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jq  (f157ea4b26bd4a111063d302e7cfa81e94071e2ej  simpleclient_spring_web/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_spring_web%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_spring_web%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jq  (eb32711775ca0870dcda8a7ffa959bc7dd4b305cj  simpleclient_tracer/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jq  (d8c0f67eef08a49d6b0d430de751c4d21d9f0e01j  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jq  (dfbd113dfabe9dc58a8478c0592f3834a1bbe2baj  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jq  (b549d0a2813f42e995f62a38f4870c8041d057f5j  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2-SNAPSHOT</version>
+    <version>1.0.0-alpha-2</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jq  (8a4baf25d7236efb0c8f96d2a30c0576d92a238aj  simpleclient_vertx/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_vertx%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_vertx%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jq  (404a39845b37ef341f51ec93730c5a5cab640576j  simpleclient_vertx4/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_vertx4%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/e43f92a3c6895c1b2cf44aedcef881126689db85/simpleclient_vertx4%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=e43f92a3c6895c1b2cf44aedcef881126689db85j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
+        <version>1.0.0-alpha-2</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(d938485d89feb1c233f68d6f9e30cd2e33aacd8c}(sha(d938485d89feb1c233f68d6f9e30cd2e33aacd8cnode_idEC_kwDOAHoJt9oAKGQ5Mzg0ODVkODlmZWIxYzIzM2Y2OGQ2ZjllMzBjZDJlMzNhYWNkOGMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:36:44Zu	committer}(j~  Fabian Stäberj  fabian@fstab.dej  2023-07-16T21:36:44ZumessageClean up pom.xmltree}(jv  (4024ad2321c539eaf844c05688d7f0de9bfd1b31urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/4024ad2321c539eaf844c05688d7f0de9bfd1b31uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d938485d89feb1c233f68d6f9e30cd2e33aacd8c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/d938485d89feb1c233f68d6f9e30cd2e33aacd8chtml_urlYhttps://github.com/prometheus/client_java/commit/d938485d89feb1c233f68d6f9e30cd2e33aacd8ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/commentsj|  }(loginfstabidJ' jx  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' jx  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jv  (3f00b29731b8059395a247ab631e729a5bfc49cej  dhttps://api.github.com/repos/prometheus/client_java/commits/3f00b29731b8059395a247ab631e729a5bfc49cej  Yhttps://github.com/prometheus/client_java/commit/3f00b29731b8059395a247ab631e729a5bfc49ceuastats}(totalM 	additionsK	deletionsKhufiles](}(jv  (fb53876ed4e255583338681850c3fe83632258e6filenameexamples/pom.xmlstatusmodifiedj  K
j  KchangesK#blob_urljhttps://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Fpom.xmlraw_urlihttps://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Fpom.xmlcontents_url|https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cpatchX  @@ -11,7 +11,10 @@
     <artifactId>examples</artifactId>
     <packaging>pom</packaging>
 
-    <name>Prometheus Java Client - Examples</name>
+    <name>Prometheus Metrics Examples</name>
+    <description>
+        Example projects for the Prometheus Metrics Library.
+    </description>
 
     <licenses>
         <license>
@@ -21,28 +24,16 @@
         </license>
     </licenses>
 
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
     <modules>
-        <module>tomcat-servlet</module>
+        <module>tomcat-servlet-example</module>
     </modules>
 
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-failsafe-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>integration-test</id>
-                            <phase>integration-test</phase>
-                            <goals>
-                                <goal>integration-test</goal>
-                                <goal>verify</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>u}(jv  (0688b6045eb0b65a1275f54dcfa287b780ba7c24j  'examples/tomcat-servlet-example/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X  @@ -9,9 +9,28 @@
         <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>tomcat-servlet</artifactId>
+    <artifactId>tomcat-servlet-example</artifactId>
 
-    <name>Example with Embedded Tomcat and the Exporter Servlet</name>
+    <name>Tomcat Servlet Example</name>
+    <description>
+        Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
 
     <dependencies>
         <dependency>previous_filenameexamples/tomcat-servlet/pom.xmlu}(jv  (97d4161ef49a383d7bf918acb98fcbd6eea26ee6j  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  jexamples/tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(jv  (759b88cb9bc8fadf1b0140bad4f789f6af8baee3j  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  ]examples/tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(jv  (5810c19b79e0ad001fbcb0acc455f4e7f7e0d629j  !prometheus-metrics-config/pom.xmlj  modifiedj  Kj  Kj  Kj  {https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-config%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-config%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X  @@ -29,11 +29,12 @@
         <developer>
             <id>fstab</id>
             <name>Fabian Stäber</name>
-            <email>fabian@prometheus.io</email>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
     <dependencies>
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>u}(jv  {     (06d350b699a7b853db61b0b39dc12a2b086f5f87j  prometheus-metrics-core/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X  @@ -12,9 +12,9 @@
     <artifactId>prometheus-metrics-core</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient</name>
+    <name>Prometheus Metrics Core</name>
     <description>
-        Core instrumentation library for the simpleclient.
+        Core Prometheus metric types
     </description>
 
     <licenses>
@@ -29,15 +29,11 @@
         <developer>
             <id>fstab</id>
             <name>Fabian Stäber</name>
-            <email>fabian@prometheus.io</email>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
-
     <dependencies>
-        <!-- The simpleclient has no required 3rd party runtime dependencies by design, so that
-             it can be included into any other project without having to worry about conflicts.
-             All transitive dependencies of tracer libraries are scoped as provided and optional at runtime. -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
@@ -60,18 +56,12 @@
             <scope>test</scope>
         </dependency>
 
-        <!-- Test Dependencies Follow -->
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.13.2</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.6.1</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>u}(jv  (a6038dd91dba826120715c7e078e7ce43c97945aj  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  modifiedj  K	j  Kj  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  XG  @@ -11,9 +11,9 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient Servlet - Jakarta</name>
+    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
     <description>
-        HTTP servlet exporter for the simpleclient.
+        Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
 
     <licenses>
@@ -24,9 +24,13 @@
         </license>
     </licenses>
 
-    <properties>
-      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
 
     <dependencies>
         <dependency>u}(jv  (9de57e88c1af8a760a686bc89243e55a89a2457aj  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X  @@ -12,9 +12,9 @@
     <artifactId>prometheus-metrics-exposition-formats</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient</name>
+    <name>Prometheus Metrics Exposition Formats</name>
     <description>
-        Core instrumentation library for the simpleclient.
+        Prometheus exposition formats.
     </description>
 
     <licenses>
@@ -27,17 +27,13 @@
 
     <developers>
         <developer>
-            <id>brian-brazil</id>
-            <name>Brian Brazil</name>
-            <email>brian.brazil@boxever.com</email>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
-
     <dependencies>
-        <!-- The simpleclient has no required 3rd party runtime dependencies by design, so that
-             it can be included into any other project without having to worry about conflicts.
-             All transitive dependencies of tracer libraries are scoped as provided and optional at runtime. -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
@@ -54,24 +50,17 @@
             <version>${project.version}</version>
         </dependency>
 
-        <!-- Test Dependencies Follow -->
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.13.2</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.6.1</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
         <plugins>
-
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>u}(jv  (b1f06cc23e5501051fb14030bbfe6061380605b6j   prometheus-metrics-model/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-model%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-model%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X7  @@ -13,7 +13,9 @@
     <packaging>bundle</packaging>
 
     <name>Prometheus Metrics Model</name>
-    <description>Data model for read-only immutable Prometheus metrics snapshots.</description>
+    <description>
+        Data model for read-only immutable Prometheus metrics snapshots.
+    </description>
 
     <licenses>
         <license>
@@ -31,8 +33,8 @@
         </developer>
     </developers>
 
-
     <dependencies>
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>u}(jv  (f8e9ed1d30b72e989873e68fcb3e47947738c37ej  !prometheus-metrics-tracer/pom.xmlj  modifiedj  Kj  K
j  Kj  {https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  Xb  @@ -11,26 +11,37 @@
   <artifactId>prometheus-metrics-tracer</artifactId>
   <packaging>pom</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Parent</name>
+  <name>Prometheus Metrics Tracer</name>
+  <description>
+    Parent for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencyManagement>
     <dependencies>
       <dependency>
         <groupId>io.opentelemetry</groupId>
         <artifactId>opentelemetry-api</artifactId>
-        <version>1.15.0</version>
+        <version>1.28.0</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
 
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-
   <modules>
     <module>prometheus-metrics-tracer-common</module>
     <module>prometheus-metrics-tracer-initializer</module>u}(jv  (2bd042af919c6581d56c682462cc70f7087728f4j  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X  @@ -11,10 +11,10 @@
   <artifactId>prometheus-metrics-tracer-common</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Common</name>
-
-  <dependencies>
-  </dependencies>
+  <name>Prometheus Metrics Tracer Common</name>
+  <description>
+    Common Module for Prometheus integrations with distributed tracing libraries.
+  </description>
 
   <licenses>
     <license>
@@ -23,4 +23,12 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 </project>u}(jv  (ec939e20e9255d37cbc7560f38c7c70357b256bdj  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  modifiedj  Kj  K	j  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  Xb  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Common</name>
+  <name>Prometheus Metrics Tracer Initializer</name>
+  <description>
+    Initialize Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -30,12 +49,4 @@
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>u}(jv  (e24405186b4bca359cf017f6674d9d49a7219d42j  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  modifiedj  Kj  K	j  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X[  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - OpenTelemetry Agent</name>
+  <name>Prometheus Metrics Tracer OpenTelemetry Agent</name>
+  <description>
+    Prometheus integration with the OpenTelemetry Java agent for distributed tracing.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -56,12 +75,4 @@
       </plugin>
     </plugins>
   </build>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>u}(jv  (6ee789fdf7f61da9eedc33f7d650ebffe5e733e3j  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  modifiedj  Kj  K	j  Kj  https://github.com/prometheus/client_java/blob/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d938485d89feb1c233f68d6f9e30cd2e33aacd8c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=d938485d89feb1c233f68d6f9e30cd2e33aacd8cj  X\  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-otel</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - OpenTelemetry</name>
+  <name>Prometheus Metrics Tracer OpenTelemetry</name>
+  <description>
+    Prometheus integration with the OpenTelemetry distributed tracing library.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -26,12 +45,4 @@
       <optional>true</optional>
     </dependency>
   </dependencies>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>ueu(7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1}(sha(7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1node_idEC_kwDOAHoJt9oAKDdjYTRlNDFlOTg3N2QxMTBjZTFhNjZmNGNiODFmOWMyYjZhMjg1YTEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T16:00:12Zu	committer}(j]  Fabian Stäberj_  fabian@fstab.deja  2023-06-29T16:00:12ZumessageStart documenting Countertree}(jU  (0551276fdf6263c6af8373b8613278ac2a7cbe8burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/0551276fdf6263c6af8373b8613278ac2a7cbe8bujm  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujm  dhttps://api.github.com/repos/prometheus/client_java/commits/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1html_urlYhttps://github.com/prometheus/client_java/commit/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/commentsj[  }(loginfstabidJ' jW  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jm  "https://api.github.com/users/fstabjy  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujc  }(j~  fstabj  J' jW  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jm  "https://api.github.com/users/fstabjy  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jU  (97add1a3faa5e10c3f1c8c2ea06cf765b692f045jm  dhttps://api.github.com/repos/prometheus/client_java/commits/97add1a3faa5e10c3f1c8c2ea06cf765b692f045jy  Yhttps://github.com/prometheus/client_java/commit/97add1a3faa5e10c3f1c8c2ea06cf765b692f045uastats}(totalKy	additionsKa	deletionsKufiles](}(jU  (86f64fd353c1bc3000972969509daeadce282fe8filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedj  KHj  KchangesKZblob_urlhttps://github.com/prometheus/client_java/blob/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1patchXk  @@ -17,6 +17,19 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
+/**
+ * Counter metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter requestCount = Counter.newBuilder()
+ *     .withName("requests_total")
+ *     .withLabelNames("path", "status")
+ *     .register();
+ * requestCount.withLabelValues("/hello-world", "200").inc();
+ * requestCount.withLabelValues("/hello-world", "500").inc();
+ * }</pre>
+ */
 public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
 
     private final boolean exemplarsEnabled;
@@ -33,31 +46,50 @@ private Counter(Builder builder, PrometheusProperties prometheusProperties) {
         }
     }
 
-    @Override
-    protected boolean isExemplarsEnabled() {
-        return exemplarsEnabled;
-    }
-
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void inc(long amount) {
         getNoLabels().inc(amount);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void inc(double amount) {
         getNoLabels().inc(amount);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void incWithExemplar(long amount, Labels labels) {
         getNoLabels().incWithExemplar(amount, labels);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void incWithExemplar(double amount, Labels labels) {
         getNoLabels().incWithExemplar(amount, labels);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public CounterSnapshot collect() {
+        return (CounterSnapshot) super.collect();
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
 
     @Override
     protected DataPoint newDataPoint() {
@@ -77,11 +109,6 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
         return new CounterSnapshot(getMetadata(), data);
     }
 
-    @Override
-    public CounterSnapshot collect() {
-        return (CounterSnapshot) super.collect();
-    }
-
     public static Builder newBuilder() {
         return new Builder(PrometheusProperties.getInstance());
     }
@@ -102,7 +129,7 @@ class DataPoint implements CounterDataPoint {
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
         // and DoubleAdder for double observations. If the user doesn't observe any double at all,
-        // we will just use the LongAdder and get the best performance.
+        // we will be using the LongAdder and get the best performance.
         private final LongAdder longValue = new LongAdder();
         private final long createdTimeMillis = System.currentTimeMillis();
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
@@ -111,6 +138,9 @@ private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void inc(long amount) {
             validateAndAdd(amount);
@@ -119,6 +149,9 @@ public void inc(long amount) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void inc(double amount) {
             validateAndAdd(amount);
@@ -127,6 +160,9 @@ public void inc(double amount) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void incWithExemplar(long amount, Labels labels) {
             validateAndAdd(amount);
@@ -135,6 +171,9 @@ public void incWithExemplar(long amount, Labels labels) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void incWithExemplar(double amount, Labels labels) {
             validateAndAdd(amount);
@@ -159,18 +198,17 @@ private void validateAndAdd(double amount) {
 
         private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
-            // see an Exemplar for a value that's not represented in getValue() yet.
-            // If there are multiple Exemplars (by default it's just one), use the oldest
-            // so that we don't violate min age.
-            Exemplar oldest = null;
+            // see an Exemplar for a value that's not counted yet.
+            // If there are multiple Exemplars (by default it's just one), use the newest.
+            Exemplar latestExemplar = null;
             if (exemplarSampler != null) {
                 for (Exemplar exemplar : exemplarSampler.collect()) {
-                    if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
-                        oldest = exemplar;
+                    if (latestExemplar == null || exemplar.getTimestampMillis() > latestExemplar.getTimestampMillis()) {
+                        latestExemplar = exemplar;
                     }
                 }
             }
-            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, latestExemplar, createdTimeMillis);
         }
     }
 
@@ -180,6 +218,22 @@ private Builder(PrometheusProperties properties) {
             super(Collections.emptyList(), properties);
         }
 
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Counter c1 = Counter.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * Counter c2 = Counter.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
         @Override
         public Builder withName(String name) {
             return super.withName(normalizeName(name));u}(jU  (d56103f7fee5304cb27f6cdcf2371570e38a22d8j  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/CounterDataPoint.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.javaj  https://github.com/prometheus/client_java/raw/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.java?ref=7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1j  X  @@ -1,10 +1,9 @@
 package io.prometheus.metrics.core.observer;
 
-import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.model.snapshots.Labels;
 
 /**
- * Represents a single counter time series, i.e. a single line in the Prometheus text format.
+ * Represents a single counter data point, i.e. a single line for a counter metric in Prometheus text format.
  * <p>
  * Example usage:
  * <pre>{@code
@@ -47,22 +46,42 @@
  */
 public interface CounterDataPoint extends DataPoint {
 
+    /**
+     * Add one.
+     */
     default void inc() {
         inc(1L);
     }
 
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    default void inc(long amount) {
+        inc((double) amount);
+    }
+
+    /**
+     * Add one, but also create a custom exemplar with the given labels.
+     */
     default void incWithExemplar(Labels labels) {
         incWithExemplar(1.0, labels);
     }
 
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
     void inc(double amount);
 
-    default void inc(long amount) {
-        inc((double) amount);
-    }
-
+    /**
+     * Add {@code amount}, but also create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
     void incWithExemplar(double amount, Labels labels);
 
+    /**
+     * Add {@code amount}, but also create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
     default void incWithExemplar(long amount, Labels labels) {
         inc((double) amount);
     }ueu(6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac}(sha(6f4ff476b27ac96d84ab25f111b5b6f29c4b58acnode_idEC_kwDOAHoJt9oAKDZmNGZmNDc2YjI3YWM5NmQ4NGFiMjVmMTExYjViNmYyOWM0YjU4YWMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:45:34Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-12T20:45:34Zumessage!Move core shaded protobuf packagetree}(j  (74d8373755ff104094449de1cdac853600a83fffurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/74d8373755ff104094449de1cdac853600a83fffuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/6f4ff476b27ac96d84ab25f111b5b6f29c4b58achtml_urlYhttps://github.com/prometheus/client_java/commit/6f4ff476b27ac96d84ab25f111b5b6f29c4b58accomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j   h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj   ,https://api.github.com/users/fstab/followersj   9https://api.github.com/users/fstab/following{/other_user}j   2https://api.github.com/users/fstab/gists{/gist_id}j
   9https://api.github.com/users/fstab/starred{/owner}{/repo}j   0https://api.github.com/users/fstab/subscriptionsj   'https://api.github.com/users/fstab/orgsj   (https://api.github.com/users/fstab/reposj   3https://api.github.com/users/fstab/events{/privacy}j   2https://api.github.com/users/fstab/received_eventsj   Userj   uparents]}(j  (71f4fc80eebeba98104e29590ef16a8186bb36c2j  dhttps://api.github.com/repos/prometheus/client_java/commits/71f4fc80eebeba98104e29590ef16a8186bb36c2j  Yhttps://github.com/prometheus/client_java/commit/71f4fc80eebeba98104e29590ef16a8186bb36c2uastats}(totalMd	additionsM	deletionsMufiles](}(j  (f9077f88bc9eced86000aac670a2e3dbb232111cfilenameYprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javastatusmodifiedj2   Kj3   KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acpatchX  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;u}(j  (32d633619edb79d11ab7411e184e9698fea7f5d4j8   [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj:   modifiedj2   Kj3   Kj<   Kj=   https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj?   https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajA   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjC   X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;u}(j  (94e92a1f394b020fd8bad9690393661e0bb3ad4fj8   prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj:   modifiedj2   Mj3   Mj<   MZj=   https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj?   https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajA   X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acu}(j  (fe496df8cc566d382273276004503e749ef8c547j8   mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj:   modifiedj2   Kj3   Kj<   Kj=   https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj?   https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajA   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjC   @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j  (2e2fa5d3190c77dce4df4adec0ebafec725047faj8   vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj:   modifiedj2   Kj3   Kj<   Kj=   https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj?   https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajA   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjC   X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;u}(j  (182b67cd74c3a0a6da129fd34d9d9d951caf5ab5j8   protobuf-shaded/pom.xmlj:   modifiedj2   Kj3   Kj<   Kj=   qhttps://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/protobuf-shaded%2Fpom.xmlj?   phttps://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/protobuf-shaded%2Fpom.xmljA   https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjC   XG  @@ -136,7 +136,7 @@
                             <relocations>
                                 <relocation>
                                     <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>io.prometheus.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}</shadedPattern>
                                 </relocation>
                             </relocations>
                         </configuration>ueu(d6240b033f1c0df272b3b10a55e412430947d4cf}(sha(d6240b033f1c0df272b3b10a55e412430947d4cfnode_idEC_kwDOAHoJt9oAKGQ2MjQwYjAzM2YxYzBkZjI3MmIzYjEwYTU1ZTQxMjQzMDk0N2Q0Y2Ycommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T11:43:23Zu	committer}(jv   Fabian Stäberjx   fabian@fstab.dejz   2023-07-16T11:43:23ZumessageAllow _count suffixtree}(jn   (969c509ee2485e8855b60a2798c394ede597d726urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/969c509ee2485e8855b60a2798c394ede597d726uj   hhttps://api.github.com/repos/prometheus/client_java/git/commits/d6240b033f1c0df272b3b10a55e412430947d4cf
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj   dhttps://api.github.com/repos/prometheus/client_java/commits/d6240b033f1c0df272b3b10a55e412430947d4cfhtml_urlYhttps://github.com/prometheus/client_java/commit/d6240b033f1c0df272b3b10a55e412430947d4cfcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d6240b033f1c0df272b3b10a55e412430947d4cf/commentsjt   }(loginfstabidJ' jp   MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j   "https://api.github.com/users/fstabj   https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj|   }(j   fstabj   J' jp   MDQ6VXNlcjMzMDUzNQ==j   2https://avatars.githubusercontent.com/u/330535?v=4j   h3j   "https://api.github.com/users/fstabj   https://github.com/fstabj   ,https://api.github.com/users/fstab/followersj   9https://api.github.com/users/fstab/following{/other_user}j   2https://api.github.com/users/fstab/gists{/gist_id}j   9https://api.github.com/users/fstab/starred{/owner}{/repo}j   0https://api.github.com/users/fstab/subscriptionsj   'https://api.github.com/users/fstab/orgsj   (https://api.github.com/users/fstab/reposj   3https://api.github.com/users/fstab/events{/privacy}j   2https://api.github.com/users/fstab/received_eventsj   Userj   uparents]}(jn   (5178fb0abaf89ea6e92fea9129e5ec3196b3d21fj   dhttps://api.github.com/repos/prometheus/client_java/commits/5178fb0abaf89ea6e92fea9129e5ec3196b3d21fj   Yhttps://github.com/prometheus/client_java/commit/5178fb0abaf89ea6e92fea9129e5ec3196b3d21fuastats}(totalK	additionsK	deletionsKufiles]}(jn   (c8fd3e1b2a1e2b03c2ff0ae3d0aa128fd1cbe221filename`prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javastatusmodifiedj   Kj   KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/d6240b033f1c0df272b3b10a55e412430947d4cf/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaraw_urlhttps://github.com/prometheus/client_java/raw/d6240b033f1c0df272b3b10a55e412430947d4cf/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=d6240b033f1c0df272b3b10a55e412430947d4cfpatchX  @@ -7,7 +7,13 @@
  */
 public final class MetricMetadata {
     private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
-    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_count", "_sum", "_bucket", "_gcount", "gsum", "_info"};
+    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
+    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
+    // * Micrometer: jvm_buffer_count
+    // * OpenTelemetry: process_runtime_jvm_buffer_count
+    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
+    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
+    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
 
     /**
      * Name is the name without suffix.uau(8e6979cf1d51f06c5108180c53dbd83de26d2a58}(sha(8e6979cf1d51f06c5108180c53dbd83de26d2a58node_idEC_kwDOAHoJt9oAKDhlNjk3OWNmMWQ1MWYwNmM1MTA4MTgwYzUzZGJkODNkZTI2ZDJhNTgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(j   Fabian Stäberj   fabian@fstab.dej   2023-08-29T20:16:37ZumessageAdd OpenTelemetry Exportertree}(j   (599a0825609c6a6a753105c433a21f5549a2c296urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/599a0825609c6a6a753105c433a21f5549a2c296uj   hhttps://api.github.com/repos/prometheus/client_java/git/commits/8e6979cf1d51f06c5108180c53dbd83de26d2a58
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj   dhttps://api.github.com/repos/prometheus/client_java/commits/8e6979cf1d51f06c5108180c53dbd83de26d2a58html_urlYhttps://github.com/prometheus/client_java/commit/8e6979cf1d51f06c5108180c53dbd83de26d2a58comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/8e6979cf1d51f06c5108180c53dbd83de26d2a58/commentsj   }(loginfstabidJ' j   MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j   "https://api.github.com/users/fstabj!  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj   }(j!  fstabj!  J' j   MDQ6VXNlcjMzMDUzNQ==j!  2https://avatars.githubusercontent.com/u/330535?v=4j!  h3j   "https://api.github.com/users/fstabj!  https://github.com/fstabj!  ,https://api.github.com/users/fstab/followersj!  9https://api.github.com/users/fstab/following{/other_user}j!  2https://api.github.com/users/fstab/gists{/gist_id}j!  9https://api.github.com/users/fstab/starred{/owner}{/repo}j!  0https://api.github.com/users/fstab/subscriptionsj!  'https://api.github.com/users/fstab/orgsj!!  (https://api.github.com/users/fstab/reposj#!  3https://api.github.com/users/fstab/events{/privacy}j%!  2https://api.github.com/users/fstab/received_eventsj'!  Userj)!  uparents]}(j   (97cfe5accbf64cba792cdc32a524244f71a66086j   dhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086j!  Yhttps://github.com/prometheus/client_java/commit/97cfe5accbf64cba792cdc32a524244f71a66086uastats}(totalMX	additionsM	deletionsM`ufiles](}(j   (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedjC!  KjD!  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58patchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(j   (bbe7aab8ad67d7ecfec27072a34f33936d1c1953jI!  2examples/example-exemplars-tail-sampling/README.mdjK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdjR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(j   (ed293444607ffb9985c6670a77cc6042b9f84eddjI!  <examples/example-exemplars-tail-sampling/docker-compose.yamljK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(j   (81c6d573c5f3130cacfdc28c011a18a260bcd288jI!  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmljK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j   (e91ade6aceaf818d176460321559b0b310dcab3djI!  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmljK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j   (8bdf213ec9a35830a610393c3496be82b3232d26jI!  .examples/example-exporter-httpserver/README.mdjK!  renamedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2FREADME.mdjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2FREADME.mdjR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(j   (a425c326850318d40de104ce142b72d365af6c29jI!  ,examples/example-exporter-httpserver/pom.xmljK!  renamedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j~!  #examples/example-httpserver/pom.xmlu}(j   (0563d583a93f32d63b484dd0d677f75db81927cajI!  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javajK!  renamedjC!  K jD!  K jM!  K jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58j~!  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(j   (1b95eccc2632c79e6f0939feae3e6d938b8b4f45jI!  1examples/example-exporter-opentelemetry/README.mdjK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2FREADME.mdjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2FREADME.mdjR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(j   (923840e0c85a643976792d88e8dff7c10d446ceejI!  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamljK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(j   (9f559dae84e3c48a4906a74606ac401cada2f6b9jI!  >examples/example-exporter-opentelemetry/config/prometheus.yamljK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(j   (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5jI!  ;examples/example-exporter-opentelemetry/docker-compose.yamljK!  addedjC!  K$jD!  K jM!  K$jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(j   (842faa1a34c19b3c29f56a5a83792306681906b6jI!  /examples/example-exporter-opentelemetry/pom.xmljK!  addedjC!  KGjD!  K jM!  KGjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>uQ     }(j   (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63jI!  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j   (dbab42931bb04f5e4327f34f7e74fceed37cb828jI!  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javajR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,143 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(j   (8d50c0c80603d5469a7144bac6387c8bff45e75bjI!  2examples/example-exporter-servlet-tomcat/README.mdjK!  renamedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdjR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.j~!  )examples/example-tomcat-servlet/README.mdu}(j   (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97jI!  0examples/example-exporter-servlet-tomcat/pom.xmljK!  renamedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j~!  'examples/example-tomcat-servlet/pom.xmlu}(j   (7a95e36da299e8ce780ea5f0d2f2751765754afcjI!  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javajK!  renamedjC!  K jD!  K jM!  K jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58j~!  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(j   (571e55a2b5d259f0401a881e9631fa0acce8e791jI!  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajK!  renamedjC!  K jD!  K jM!  K jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajR!  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58j~!  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(j   (6535b05e1474660627803d1962e85282e910cf9djI!  examples/pom.xmljK!  modifiedjC!  KjD!  KjM!  KjN!  jhttps://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fpom.xmljP!  ihttps://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/examples%2Fpom.xmljR!  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(j   (9cd27a42c58845389736906bc49d2160af05792fjI!  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j   (b46c112af431ec1a41165983f476978e4d0a654ejI!  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javajK!  modifiedjC!  KjD!  KjM!  KjN!  X  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajP!  X
  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajR!  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j   (9a44b01535c57c14d4ace04dd1c4e716316c7c32jI!  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javajK!  modifiedjC!  KjD!  KjM!  KjN!  X  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajP!  X  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajR!  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j   (ba5d97577739137181a6d15e70170bba6923ecc0jI!  pom.xmljK!  modifiedjC!  KjD!  KjM!  KjN!  _https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/pom.xmljP!  ^https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/pom.xmljR!  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(j   (6d06746f76a09f4d3be70c7bf19de87731cf51a5jI!  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javajK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(j   (66ed3633b53aa109119a31abbd0e7ed1828a1eb4jI!  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(j   (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcjI!  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(j   (c4a09be7b8ca24e342cd99173c0a8674e703cb60jI!  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(j   (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3jI!  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javajK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(j   (ea32a6ccacc2f3a8b2040d1a91a98369337b4770jI!  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesjK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j   (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99jI!  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajK!  modifiedjC!  K&jD!  KjM!  K4jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(j   (d324a2700c70b915e444403f75a9c17c96e70bbfjI!  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(j   (a1c1769d98559841ca83eb49e1ca2977e32e6114jI!  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajK!  modifiedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(j   (035f2133482078e18c05d544d2633b8ade9d8bebjI!  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(j   (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980jI!  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(j   (c6d5b7719d02f25c2a8635bcc774374e4f552b97jI!  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajK!  modifiedjC!  KRjD!  KjM!  KTjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(j   (6b5266962f80db0e582089efb438621100a5ce92jI!  1prometheus-metrics-exporter-opentelemetry/pom.xmljK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(j   (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javajK!  addedjC!  MjD!  K jM!  MjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u     }(j   (1f38e66e229b1affd0ba181ec4ff285e3e71bcadjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javajK!  addedjC!  K jD!  K jM!  K jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(j   (762060efcf3f5edfa5be3d9edc50d9e8c4350081jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajK!  addedjC!  K|jD!  K jM!  K|jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(j   (c4319b7fc6bb838489686542d8817d5c53daad94jI!  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javajK!  addedjC!  K"jD!  K jM!  K"jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(j   (053c2b53ab0a361d01905748b8e4445d725b3e63jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javajK!  addedjC!  K
jD!  K jM!  K
jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajR!  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(j   (093b3b44dc76bd71ffb168b5a87b471c2699ef06jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javajK!  addedjC!  K<jD!  K jM!  K<jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(j   (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javajK!  addedjC!  KWjD!  K jM!  KWjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(j   (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j   (d365c26fb4969d38448d8e1bd702b7e55e061b2ejI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javajK!  addedjC!  K.jD!  K jM!  K.jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(j   (86d56d2d79c660d5d01c2802f73e94787343c22ejI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javajK!  addedjC!  KUjD!  K jM!  KUjN!  X  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajP!  X   https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(j   (7908bee2ba3c186de26199f194bdde88245a9b3fjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javajK!  addedjC!  KDjD!  K jM!  KDjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(j   (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3djI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajK!  addedjC!  K=jD!  K jM!  K=jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(j   (a0b4aed8397b8eac69d32d28215f110df28b893bjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javajK!  addedjC!  K+jD!  K jM!  K+jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(j   (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javajK!  addedjC!  KPjD!  K jM!  KPjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(j   (883b06e08475fcbe0e3464b61fa883d3db0a28d1jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javajK!  addedjC!  K1jD!  K jM!  K1jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j   (353a1623c7ae3932afa295452af773fa7d9aecdbjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javajK!  addedjC!  K:jD!  K jM!  K:jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajR!  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(j   (16c307059c9e17bbe682b5f0b35b72b6a2b69d77jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javajK!  addedjC!  K&jD!  K jM!  K&jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j   (0dce35fa640fb1e114f86e0bfc229347a8d616dejI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javajK!  addedjC!  K1jD!  K jM!  K1jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javajR!  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(j   (ddf2160d04ae48dbdec91f99d371475820c13180jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(j   (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javajK!  addedjC!  KWjD!  K jM!  KWjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u      }(j   (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ejI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javajK!  addedjC!  K5jD!  K jM!  K5jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(j   (9b2f53c1255abbda709af7892125aa70ba69f819jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javajK!  addedjC!  K+jD!  K jM!  K+jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(j   (930715492a4380a13a088d728e21b7460031bb2cjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javajK!  addedjC!  K%jD!  K jM!  K%jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j   (0e9c61c1f039218ae47e778f137078dcd1ed1cbdjI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javajK!  addedjC!  K)jD!  K jM!  K)jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(j   (fafc2be77024fc40abd2d2e78abe8864b891c438jI!  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javajK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j   (f5d86ba1f71fd7393035dff48f730aca3caea09ejI!  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesjK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesjR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(j   (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105jI!  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorejK!  addedjC!  KjD!  K jM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorejP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorejR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -0,0 +1 @@
+*.jaru}(j   (24a9f8dffef1509961ecdc2e2deee91f7072c264jI!  :prometheus-metrics-exposition-formats/generate-protobuf.shjK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j   (a8eef2c7a6358645e787ef96c3c16364ed5f2452jI!  -prometheus-metrics-exposition-formats/pom.xmljK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(j   (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7jI!  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javajK!  modifiedjC!  MjD!  MzjM!  MjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajR!  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58u}(j   (eea5f929a0b4ea14792d7806f6306662879017f8jI!  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j   (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936jI!  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j   (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9jI!  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protojK!  modifiedjC!  K	jD!  K jM!  K	jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(j   (cf6cb09a68200d8a7ee152c58204667a90c06ce1jI!  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(j   (6cad6a6a39a5d85d46c0c9ae08240896f2754bbejI!  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajK!  modifiedjC!  KjD!  KjM!  KjN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(j   (b872ee0cefa8765c12f85f4d0580453c1b4de6ccjI!  .prometheus-metrics-shaded-dependencies/pom.xmljK!  addedjC!  K(jD!  K jM!  K(jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(j   (d68cc1c041afdbe3b0e6b071317d9b9a2755e068jI!  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmljK!  addedjC!  K~jD!  K jM!  K~jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j   (7b0019461389b754822ed106979b1e5c461f8032jI!  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javajK!  addedjC!  K	jD!  K jM!  K	jN!  X   https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javajP!  X  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javajR!  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(j   (b856ef185427b3939f8b4292d464b4b9f1de817cjI!  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmljK!  addedjC!  K\jD!  K jM!  K\jN!  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljP!  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j   (3f63392a763257f697e79251d10d442a341fa7eajI!  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javajK!  addedjC!  K	jD!  K jM!  K	jN!  X  https://github.com/prometheus/client_java/blob/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javajP!  X  https://github.com/prometheus/client_java/raw/8e6979cf1d51f06c5108180c53dbd83de26d2a58/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javajR!  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=8e6979cf1d51f06c5108180c53dbd83de26d2a58jT!  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(j   (b929015f99f5db26a5d2aed1b1bd53518ed59b5cjI!  protobuf-shaded/.gitignorejK!  removedjC!  K jD!  KjM!  KjN!  thttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2F.gitignorejP!  shttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2F.gitignorejR!  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=97cfe5accbf64cba792cdc32a524244f71a66086jT!  @@ -1 +0,0 @@
-src/main/javau}(j   (5db4149b724982e6ff8f55ae96f4f8a07804d590jI!  protobuf-shaded/README.mdjK!  removedjC!  K jD!  KjM!  KjN!  shttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2FREADME.mdjP!  rhttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2FREADME.mdjR!  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=97cfe5accbf64cba792cdc32a524244f71a66086jT!  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j   (ddfe62d9884175f9b37ea50638f1dcd45dd63c34jI!  protobuf-shaded/pom.xmljK!  removedjC!  K jD!  KjM!  KjN!  qhttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2Fpom.xmljP!  phttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/protobuf-shaded%2Fpom.xmljR!  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086jT!  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(38e92cc17eb7e72c26f238804fb049939e1c6f55}(sha(38e92cc17eb7e72c26f238804fb049939e1c6f55node_idEC_kwDOAHoJt9oAKDM4ZTkyY2MxN2ViN2U3MmMyNmYyMzg4MDRmYjA0OTkzOWUxYzZmNTUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T11:27:45Zu	committer}(j#  Fabian Stäberj#  fabian@fstab.dej#  2023-07-17T11:27:45ZumessageFix JavaDoctree}(j#  (e0a81a7d5ba4c05ee1e3b273846a92283f75d112urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/e0a81a7d5ba4c05ee1e3b273846a92283f75d112uj#  hhttps://api.github.com/repos/prometheus/client_java/git/commits/38e92cc17eb7e72c26f238804fb049939e1c6f55
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj#  dhttps://api.github.com/repos/prometheus/client_java/commits/38e92cc17eb7e72c26f238804fb049939e1c6f55html_urlYhttps://github.com/prometheus/client_java/commit/38e92cc17eb7e72c26f238804fb049939e1c6f55comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/38e92cc17eb7e72c26f238804fb049939e1c6f55/commentsj#  }(loginfstabidJ' j#  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j#  "https://api.github.com/users/fstabj#  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj#  }(j#  fstabj#  J' j#  MDQ6VXNlcjMzMDUzNQ==j$  2https://avatars.githubusercontent.com/u/330535?v=4j$  h3j#  "https://api.github.com/users/fstabj#  https://github.com/fstabj$  ,https://api.github.com/users/fstab/followersj$  9https://api.github.com/users/fstab/following{/other_user}j
$  2https://api.github.com/users/fstab/gists{/gist_id}j$  9https://api.github.com/users/fstab/starred{/owner}{/repo}j$  0https://api.github.com/users/fstab/subscriptionsj$  'https://api.github.com/users/fstab/orgsj$  (https://api.github.com/users/fstab/reposj$  3https://api.github.com/users/fstab/events{/privacy}j$  2https://api.github.com/users/fstab/received_eventsj$  Userj$  uparents]}(j#  (32028c51520e28cd03077ef94445716e1c22ec9ej#  dhttps://api.github.com/repos/prometheus/client_java/commits/32028c51520e28cd03077ef94445716e1c22ec9ej#  Yhttps://github.com/prometheus/client_java/commit/32028c51520e28cd03077ef94445716e1c22ec9euastats}(totalK	additionsK	deletionsKufiles](}(j#  (cfe3f2944eab23a80e3a653a5f8a4a82a43fd9a9filenameWprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javastatusmodifiedj4$  Kj5$  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/38e92cc17eb7e72c26f238804fb049939e1c6f55/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaraw_urlhttps://github.com/prometheus/client_java/raw/38e92cc17eb7e72c26f238804fb049939e1c6f55/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=38e92cc17eb7e72c26f238804fb049939e1c6f55patchXQ  @@ -799,15 +799,16 @@ public Builder withClassicExponentialBuckets(double start, double factor, int co
          *     <li>factor: The growth factor for bucket boundaries, i.e. next bucket boundary = growth factor * previous bucket boundary.
          *     <li>max quantile error: The maximum error for quantiles calculated using the Prometheus histogram_quantile() function, relative to the observed value, assuming harmonic mean.
          * </ul>
-         * <table border>
+         * <table border="1">
+         *     <caption>max quantile errors for different growth factors</caption>
          *     <tr>
          *         <td>schema</td><td>factor</td><td>max quantile error</td>
          *     </tr>
          *     <tr>
-         *         <td>-4</td><td>65.536</td>99%<td></td>
+         *         <td>-4</td><td>65.536</td><td>99%</td>
          *     </tr>
          *     <tr>
-         *         <td>-3</td><td>256</td>99%<td></td>
+         *         <td>-3</td><td>256</td><td>99%</td>
          *     </tr>
          *     <tr>
          *         <td>-2</td><td>16</td><td>88%</td>u}(j#  (b6d85c8c2aa35131c1eb945f991ca7717042d298j:$  protobuf-shaded/pom.xmlj<$  modifiedj4$  Kj5$  K j>$  Kj?$  qhttps://github.com/prometheus/client_java/blob/38e92cc17eb7e72c26f238804fb049939e1c6f55/protobuf-shaded%2Fpom.xmljA$  phttps://github.com/prometheus/client_java/raw/38e92cc17eb7e72c26f238804fb049939e1c6f55/protobuf-shaded%2Fpom.xmljC$  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=38e92cc17eb7e72c26f238804fb049939e1c6f55jE$  X  @@ -155,6 +155,13 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
+                    <excludePackageNames>com.google.protobuf</excludePackageNames>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>ueu(4834536272b4926efd7ec5b493dd10b70c2abc48}(sha(4834536272b4926efd7ec5b493dd10b70c2abc48node_idEC_kwDOAHoJt9oAKDQ4MzQ1MzYyNzJiNDkyNmVmZDdlYzViNDkzZGQxMGI3MGMyYWJjNDgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-04T13:57:29Zu	committer}(jY$  Fabian Stäberj[$  fabian@fstab.dej]$  2023-07-04T13:57:29Zumessage#Add JavaDoc to PrometheusPropertiestree}(jQ$  (d83969d719a753b460f8db00cda5362ba5cad87eurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d83969d719a753b460f8db00cda5362ba5cad87euji$  hhttps://api.github.com/repos/prometheus/client_java/git/commits/4834536272b4926efd7ec5b493dd10b70c2abc48
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuji$  dhttps://api.github.com/repos/prometheus/client_java/commits/4834536272b4926efd7ec5b493dd10b70c2abc48html_urlYhttps://github.com/prometheus/client_java/commit/4834536272b4926efd7ec5b493dd10b70c2abc48comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/4834536272b4926efd7ec5b493dd10b70c2abc48/commentsjW$  }(loginfstabidJ' jS$  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ji$  "https://api.github.com/users/fstabju$  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj_$  }(jz$  fstabj|$  J' jS$  MDQ6VXNlcjMzMDUzNQ==j~$  2https://avatars.githubusercontent.com/u/330535?v=4j$  h3ji$  "https://api.github.com/users/fstabju$  https://github.com/fstabj$  ,https://api.github.com/users/fstab/followersj$  9https://api.github.com/users/fstab/following{/other_user}j$  2https://api.github.com/users/fstab/gists{/gist_id}j$  9https://api.github.com/users/fstab/starred{/owner}{/repo}j$  0https://api.github.com/users/fstab/subscriptionsj$  'https://api.github.com/users/fstab/orgsj$  (https://api.github.com/users/fstab/reposj$  3https://api.github.com/users/fstab/events{/privacy}j$  2https://api.github.com/users/fstab/received_eventsj$  Userj$  uparents]}(jQ$  (f6e6db3665c5d260eec41042c7fffc089c4f3d84ji$  dhttps://api.github.com/repos/prometheus/client_java/commits/f6e6db3665c5d260eec41042c7fffc089c4f3d84ju$  Yhttps://github.com/prometheus/client_java/commit/f6e6db3665c5d260eec41042c7fffc089c4f3d84uastats}(totalK	additionsK	deletionsKufiles](}(jQ$  (2a9527066bd13ea766604f4bfc775d91f9b15c4ffilename\prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarProperties.javastatusmodifiedj$  Kj$  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48patchX  @@ -24,14 +24,31 @@ public ExemplarProperties(
         this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
     }
 
+    /**
+     * Minimum time how long Exemplars are kept before they may be replaced by new Exemplars.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MIN_RETENTION_PERIOD_SECONDS}
+     */
     public Integer getMinRetentionPeriodSeconds() {
         return minRetentionPeriodSeconds;
     }
 
+    /**
+     * Maximum time how long Exemplars are kept before they are evicted.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MAX_RETENTION_PERIOD_SECONDS}
+     */
     public Integer getMaxRetentionPeriodSeconds() {
         return maxRetentionPeriodSeconds;
     }
 
+    /**
+     * Time between attempts to sample new Exemplars. This is a performance improvement for high-frequency
+     * applications, because with the sample interval we make sure that the exemplar sampler is not called
+     * for every single request.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_SAMPLE_INTERVAL_MILLISECONDS}
+     */
     public Integer getSampleIntervalMilliseconds() {
         return sampleIntervalMilliseconds;
     }u}(jQ$  (6b27f118456cbe1ab16afc636a8a0e6dda0c092ej$  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExpositionFormatProperties.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  XN  @@ -8,19 +8,34 @@
 public class ExpositionFormatProperties {
 
     private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
+    private static final String EXEMPLARS_ON_ALL_METRIC_TYPES = "exemplarsOnAllMetricTypes";
 
     private final Boolean includeCreatedTimestamps;
+    private final Boolean exemplarsOnAllMetricTypes;
 
-    public ExpositionFormatProperties(Boolean includeCreatedTimestamps) {
+    public ExpositionFormatProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
         this.includeCreatedTimestamps = includeCreatedTimestamps;
+        this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
     }
 
-    public Boolean getIncludeCreatedTimestamps() {
+    /**
+     * Include the {@code _created} timestamps in text format? Default is {@code false}.
+     */
+    public boolean getIncludeCreatedTimestamps() {
         return includeCreatedTimestamps != null && includeCreatedTimestamps;
     }
 
+    /**
+     * Allow Exemplars on all metric types in OpenMetrics format?
+     * Default is {@code false}, which means Exemplars will only be added for Counters and Histograms.
+     */
+    public boolean getExemplarsOnAllMetricTypes() {
+        return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
+    }
+
     static ExpositionFormatProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
-        return new ExpositionFormatProperties(includeCreatedTimestamps);
+        Boolean exemplarsOnAllMetricTypes = Util.loadBoolean(prefix + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
+        return new ExpositionFormatProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
     }
 }u;     }(jQ$  (26277aa13be19c8ae4d614be23297c280c79d193j$  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/HttpServerProperties.javaj$  modifiedj$  Kj$  K j$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X6  @@ -6,6 +6,9 @@
  * Properties starting with io.prometheus.httpServer
  */
 public class HttpServerProperties {
+
+    // TODO: Not used yet, will be used when we port the simpleclient_httpserver module to the new data model.
+
     private static final String PORT = "port";
     private final Integer port;
 u}(jQ$  (46a0d4e052d2c7ddaf392afff0cea3dbdac36ffdj$  Zprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricProperties.javaj$  modifiedj$  KQj$  Kj$  KRj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -159,46 +159,80 @@ private void validate(String prefix) throws PrometheusPropertiesException {
         }
     }
 
+    /**
+     * This is the only configuration property that can be applied to all metric types.
+     * You can use it to turn Exemplar support off. Default is {@code true}.
+     */
     public Boolean getExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
+    /**
+     * See {@code Histogram.Builder.nativeOnly()}
+     */
     public Boolean getHistogramNativeOnly() {
         return histogramNativeOnly;
     }
 
+    /**
+     * See {@code Histogram.Builder.classicOnly()}
+     */
     public Boolean getHistogramClassicOnly() {
         return histogramClassicOnly;
     }
 
+    /**
+     * See {@code Histogram.Builder.withClassicBuckets()}
+     */
     public double[] getHistogramClassicUpperBounds() {
         return histogramClassicUpperBounds;
     }
 
+    /**
+     * See {@code Histogram.Builder.withNativeInitialSchema()}
+     */
     public Integer getHistogramNativeInitialSchema() {
         return histogramNativeInitialSchema;
     }
 
+    /**
+     * See {@code Histogram.Builder.withNativeMinZeroThreshold()}
+     */
     public Double getHistogramNativeMinZeroThreshold() {
         return histogramNativeMinZeroThreshold;
     }
 
+    /**
+     * See {@code Histogram.Builder.withNativeMaxZeroThreshold()}
+     */
     public Double getHistogramNativeMaxZeroThreshold() {
         return histogramNativeMaxZeroThreshold;
     }
 
+    /**
+     * See {@code Histogram.Builder.withNativeMaxNumberOfBuckets()}
+     */
     public Integer getHistogramNativeMaxNumberOfBuckets() {
         return histogramNativeMaxNumberOfBuckets;
     }
 
+    /**
+     * See {@code Histogram.Builder.withNativeResetDuration()}
+     */
     public Long getHistogramNativeResetDurationSeconds() {
         return histogramNativeResetDurationSeconds;
     }
 
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     */
     public double[] getSummaryQuantiles() {
         return summaryQuantiles;
     }
 
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     */
     public double[] getSummaryQuantileErrors() {
         if (summaryQuantileErrors != null) {
             return summaryQuantileErrors;
@@ -217,16 +251,23 @@ public double[] getSummaryQuantileErrors() {
         }
     }
 
+    /**
+     * See {@code Summary.Builder.withMaxAgeSeconds()}
+     */
     public Long getSummaryMaxAgeSeconds() {
         return summaryMaxAgeSeconds;
     }
 
+    /**
+     * See {@code Summary.Builder.withNumberOfAgeBuckets()}
+     */
     public Integer getSummaryNumberOfAgeBuckets() {
         return summaryNumberOfAgeBuckets;
     }
 
     /**
-     * Properties that are loaded will be removed from the map. The remaining properties are unused.
+     * Properties that are loaded will be removed from {@code properties}.
+     * The remaining entries in {@code properties} are unused.
      */
     static MetricProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         return new MetricProperties(
@@ -284,66 +325,105 @@ public MetricProperties build() {
                     summaryNumberOfAgeBuckets);
         }
 
+        /**
+         * See {@link MetricProperties#getExemplarsEnabled()}
+         */
         public Builder withExemplarsEnabled(Boolean exemplarsEnabled) {
             this.exemplarsEnabled = exemplarsEnabled;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeOnly()}
+         */
         public Builder withHistogramNativeOnly(Boolean histogramNativeOnly) {
             this.histogramNativeOnly = histogramNativeOnly;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramClassicOnly()}
+         */
         public Builder withHistogramClassicOnly(Boolean histogramClassicOnly) {
             this.histogramClassicOnly = histogramClassicOnly;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramClassicUpperBounds()}
+         */
         public Builder withHistogramClassicUpperBounds(double... histogramClassicUpperBounds) {
             this.histogramClassicUpperBounds = histogramClassicUpperBounds;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeInitialSchema()}
+         */
         public Builder withHistogramNativeInitialSchema(Integer histogramNativeInitialSchema) {
             this.histogramNativeInitialSchema = histogramNativeInitialSchema;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeMinZeroThreshold()}
+         */
         public Builder withHistogramNativeMinZeroThreshold(Double histogramNativeMinZeroThreshold) {
             this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeMaxZeroThreshold()}
+         */
         public Builder withHistogramNativeMaxZeroThreshold(Double histogramNativeMaxZeroThreshold) {
             this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeMaxNumberOfBuckets()}
+         */
         public Builder withHistogramNativeMaxNumberOfBuckets(Integer histogramNativeMaxNumberOfBuckets) {
             this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getHistogramNativeResetDurationSeconds()}
+         */
         public Builder withHistogramNativeResetDurationSeconds(Long histogramNativeResetDurationSeconds) {
             this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getSummaryQuantiles()}
+         */
         public Builder withSummaryQuantiles(double... summaryQuantiles) {
             this.summaryQuantiles = summaryQuantiles;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getSummaryQuantileErrors()}
+         */
         public Builder withSummaryQuantileErrors(double... summaryQuantileErrors) {
             this.summaryQuantileErrors = summaryQuantileErrors;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getSummaryMaxAgeSeconds()}
+         */
         public Builder withSummaryMaxAgeSeconds(Long summaryMaxAgeSeconds) {
             this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
             return this;
         }
 
+        /**
+         * See {@link MetricProperties#getSummaryNumberOfAgeBuckets()}
+         */
         public Builder withSummaryNumberOfAgeBuckets(Integer summaryNumberOfAgeBuckets) {
             this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
             return this;u}(jQ$  (1c208a68ef951ad110d707b10f0b81e8af360784j$  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj$  modifiedj$  Kj$  K j$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X9  @@ -3,6 +3,9 @@
 import java.util.HashMap;
 import java.util.Map;
 
+/**
+ * Allow overriding configuration like histogram bucket boundaries at application startup time.
+ */
 public class PrometheusProperties {
 
     private static final PrometheusProperties defaultInstance = PrometheusPropertiesLoader.load();u}(jQ$  (bfafadd028f0bbcd117f047cc700067136a796abj$  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -61,8 +61,8 @@ private static void validateAllPropertiesProcessed(Map<Object, Object> propertie
     private static Map<Object, Object> loadProperties() {
         Map<Object, Object> properties = new HashMap<>();
         properties.putAll(loadPropertiesFromClasspath());
-        properties.putAll(loadPropertiesFromFile()); // overwriting the entries from the classpath file
-        properties.putAll(System.getProperties()); // overwriting the entries from the properties file
+        properties.putAll(loadPropertiesFromFile()); // overriding the entries from the classpath file
+        properties.putAll(System.getProperties()); // overriding the entries from the properties file
         // TODO: Add environment variables like EXEMPLARS_ENABLED.
         return properties;
     }u}(jQ$  (e9d2543bbb64a5f440df5f3b34ffa4e451b1228aj$  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfig.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -7,20 +7,31 @@
 
 public class ExemplarSamplerConfig {
 
+    /**
+     * See {@link ExemplarProperties#getMinRetentionPeriodSeconds()}
+     */
     public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDS = 7;
+
+    /**
+     * See {@link ExemplarProperties#getMaxRetentionPeriodSeconds()}
+     */
     public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDS = 70;
+
+    /**
+     * See {@link ExemplarProperties#getSampleIntervalMilliseconds()}
+     */
     private static final int DEFAULT_SAMPLE_INTERVAL_MILLISECONDS = 90;
 
     private final long minRetentionPeriodMillis;
     private final long maxRetentionPeriodMillis;
     private final long sampleIntervalMillis;
-    private final double[] histogramClassicUpperBounds; // null unless used in a classic histogram
+    private final double[] histogramClassicUpperBounds; // null unless it's a classic histogram
     private final int numberOfExemplars; // if histogramClassicUpperBounds != null, then numberOfExemplars == histogramClassicUpperBounds.length
 
     /**
      * Constructor for all metric types except classic histograms.
      *
-     * @param properties        Coming from {@link PrometheusProperties#getExemplarConfig()}.
+     * @param properties        See {@link PrometheusProperties#getExemplarConfig()}.
      * @param numberOfExemplars Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default.
      *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarProperties, double[])}.
      */
@@ -31,7 +42,7 @@ public ExemplarSamplerConfig(ExemplarProperties properties, int numberOfExemplar
     /**
      * Constructor for classic histogram metrics.
      *
-     * @param properties                  Coming from {@link PrometheusProperties#getExemplarConfig()}.
+     * @param properties                  See {@link PrometheusProperties#getExemplarConfig()}.
      * @param histogramClassicUpperBounds the ExemplarSampler will provide one Exemplar per histogram bucket.
      *                                    Must be sorted, and must include the +Inf bucket.
      */
@@ -94,18 +105,30 @@ public double[] getHistogramClassicUpperBounds() {
         return histogramClassicUpperBounds;
     }
 
+    /**
+     * See {@link ExemplarProperties#getMinRetentionPeriodSeconds()}
+     */
     public long getMinRetentionPeriodMillis() {
         return minRetentionPeriodMillis;
     }
 
+    /**
+     * See {@link ExemplarProperties#getMaxRetentionPeriodSeconds()}
+     */
     public long getMaxRetentionPeriodMillis() {
         return maxRetentionPeriodMillis;
     }
 
+    /**
+     * See {@link ExemplarProperties#getSampleIntervalMilliseconds()}
+     */
     public long getSampleIntervalMillis() {
         return sampleIntervalMillis;
     }
 
+    /**
+     * Defaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.
+     */
     public int getNumberOfExemplars() {
         return numberOfExemplars;
     }u}(jQ$  (e79eb2b67f43025157b72bc60050e7e0c1908630j$  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javaj$  modifiedj$  Kj$  K j$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X<  @@ -896,6 +896,8 @@ public Builder withNativeMinZeroThreshold(double nativeMinZeroThreshold) {
          * <p>
          * If the number of native buckets exceeds the maximum, the {@link #withNativeInitialSchema(int)} is decreased,
          * i.e. the resolution of the histogram is decreased to reduce the number of buckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS}.
          */
         public Builder withNativeMaxNumberOfBuckets(int nativeMaxBuckets) {
             this.nativeMaxNumberOfBuckets = nativeMaxBuckets;u}(jQ$  (393e2c876c0c08a41b6c11231a31214ecc6b981bj$  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -709,7 +709,7 @@ public void testDefaults() throws IOException {
 
         // text
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false);
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
         writer.write(out, MetricSnapshots.of(snapshot));
         Assert.assertEquals(expectedClassic, out.toString());
     }u}(jQ$  (b7c971702d8c82c21a43e83de92dd425c8f3c177j$  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormats.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -25,7 +25,7 @@ public static ExpositionFormats init(ExpositionFormatProperties properties) {
         return new ExpositionFormats(
                 new PrometheusProtobufWriter(),
                 new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),
-                new OpenMetricsTextFormatWriter(properties.getIncludeCreatedTimestamps())
+                new OpenMetricsTextFormatWriter(properties.getIncludeCreatedTimestamps(), properties.getExemplarsOnAllMetricTypes())
         );
     }
 u}(jQ$  (2c663ef6764ae4c764b3bee4812df5e16eabffb1j$  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj$  modifiedj$  K
j$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  XY  @@ -37,12 +37,14 @@ public class OpenMetricsTextFormatWriter implements ExpositionFormatWriter {
 
     public final static String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
     private final boolean createdTimestampsEnabled;
+    private final boolean exemplarsOnAllMetricTypesEnabled;
 
     /**
      * @param createdTimestampsEnabled defines if {@code _created} timestamps should be included in the output or not.
      */
-    public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled) {
+    public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled, boolean exemplarsOnAllMetricTypesEnabled) {
         this.createdTimestampsEnabled = createdTimestampsEnabled;
+        this.exemplarsOnAllMetricTypesEnabled = exemplarsOnAllMetricTypesEnabled;
     }
 
     @Override
@@ -100,7 +102,11 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
-            writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            if (exemplarsOnAllMetricTypesEnabled) {
+                writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
         }
     }
 
@@ -172,7 +178,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
             for (Quantile quantile : data.getQuantiles()) {
                 writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
-                if (exemplars.size() > 0) {
+                if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
                     exemplarIndex = (exemplarIndex + 1) % exemplars.size();
                     writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
                 } else {
@@ -234,7 +240,11 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
+            if (exemplarsOnAllMetricTypesEnabled) {
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
         }
     }
 
@@ -328,6 +338,4 @@ private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMet
             writer.write('\n');
         }
     }
-
-
 }u}(jQ$  (233953e00da552de8ff77e414dbe85fca017c63fj$  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj$  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X  @@ -1436,14 +1436,14 @@ public void testLabelValueEscape() throws IOException {
 
     private void assertOpenMetricsText(String expected, MetricSnapshot snapshot) throws IOException {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true);
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
         writer.write(out, MetricSnapshots.of(snapshot));
         Assert.assertEquals(expected, out.toString());
     }
 
     private void assertOpenMetricsTextWithoutCreated(String expected, MetricSnapshot snapshot) throws IOException {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false);
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
         writer.write(out, MetricSnapshots.of(snapshot));
         Assert.assertEquals(expected, out.toString());
     }u}(jQ$  (fd110a7d62ef873f95d604ddf3104f3273d33771j$  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javaj$  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  X;  @@ -37,7 +37,7 @@ public void run() throws InterruptedException {
         ScheduledExecutorService scraper = Executors.newSingleThreadScheduledExecutor();
 
         PrometheusProtobufWriter protoWriter = new PrometheusProtobufWriter();
-        OpenMetricsTextFormatWriter textWriter = new OpenMetricsTextFormatWriter(false);
+        OpenMetricsTextFormatWriter textWriter = new OpenMetricsTextFormatWriter(false, true);
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
         scraper.scheduleAtFixedRate(() -> {
             try {u}(jQ$  (47645359ea86cf3fb7dbf55aac075b1e9954cc24j$  Stmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj$  modifiedj$  Kj$  Kj$  Kj$  https://github.com/prometheus/client_java/blob/4834536272b4926efd7ec5b493dd10b70c2abc48/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj$  https://github.com/prometheus/client_java/raw/4834536272b4926efd7ec5b493dd10b70c2abc48/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj$  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=4834536272b4926efd7ec5b493dd10b70c2abc48j$  XO  @@ -291,7 +291,7 @@ private HTTPServer(ExecutorService executorService, HttpServer httpServer, Prome
         server = httpServer;
         List<ExpositionFormatWriter> expositionFormatWriters = Arrays.asList(
                 new PrometheusTextFormatWriter(true),
-                new OpenMetricsTextFormatWriter(true),
+                new OpenMetricsTextFormatWriter(true, true),
                 new PrometheusProtobufWriter());
         HttpHandler mHandler = new MetricsHandler(registry, expositionFormatWriters, sampleNameFilter);
         HttpHandler hHandler = new HealthyHandler();ueu(3f00b29731b8059395a247ab631e729a5bfc49ce}(sha(3f00b29731b8059395a247ab631e729a5bfc49cenode_idEC_kwDOAHoJt9oAKDNmMDBiMjk3MzFiODA1OTM5NWEyNDdhYjYzMWU3MjlhNWJmYzQ5Y2Ucommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:14:25Zu	committer}(j6%  Fabian Stäberj8%  fabian@fstab.dej:%  2023-07-16T21:14:25ZumessagePrepare 1.0.0-alpha-1 versiontree}(j.%  (1c85bcceb12a4008bf4c42f131b582ea32ca2d77urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1c85bcceb12a4008bf4c42f131b582ea32ca2d77ujF%  hhttps://api.github.com/repos/prometheus/client_java/git/commits/3f00b29731b8059395a247ab631e729a5bfc49ce
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujF%  dhttps://api.github.com/repos/prometheus/client_java/commits/3f00b29731b8059395a247ab631e729a5bfc49cehtml_urlYhttps://github.com/prometheus/client_java/commit/3f00b29731b8059395a247ab631e729a5bfc49cecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/3f00b29731b8059395a247ab631e729a5bfc49ce/commentsj4%  }(loginfstabidJ' j0%  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jF%  "https://api.github.com/users/fstabjR%  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj<%  }(jW%  fstabjY%  J' j0%  MDQ6VXNlcjMzMDUzNQ==j[%  2https://avatars.githubusercontent.com/u/330535?v=4j]%  h3jF%  "https://api.github.com/users/fstabjR%  https://github.com/fstabj`%  ,https://api.github.com/users/fstab/followersjb%  9https://api.github.com/users/fstab/following{/other_user}jd%  2https://api.github.com/users/fstab/gists{/gist_id}jf%  9https://api.github.com/users/fstab/starred{/owner}{/repo}jh%  0https://api.github.com/users/fstab/subscriptionsjj%  'https://api.github.com/users/fstab/orgsjl%  (https://api.github.com/users/fstab/reposjn%  3https://api.github.com/users/fstab/events{/privacy}jp%  2https://api.github.com/users/fstab/received_eventsjr%  Userjt%  uparents]}(j.%  (94bef3e0588b2ec0dd92210133fb10809b74bb52jF%  dhttps://api.github.com/repos/prometheus/client_java/commits/94bef3e0588b2ec0dd92210133fb10809b74bb52jR%  Yhttps://github.com/prometheus/client_java/commit/94bef3e0588b2ec0dd92210133fb10809b74bb52uastats}(totalK	additionsK[	deletionsKSufiles](}(j.%  (db455570b12cd7b9ff47bbf1afeb9e0cdd38584ffilenamebenchmarks/pom.xmlstatusmodifiedj%  Kj%  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cepatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j.%  (a4f33846cfe05d4dff030425d26bfe2c34f2e2f6j%  examples/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  jhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/examples%2Fpom.xmlj%  ihttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/examples%2Fpom.xmlj%  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j.%  (778d917a8fd4c95360b5f5d8f3d5a7a8d9a90387j%  examples/tomcat-servlet/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  {https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/examples%2Ftomcat-servlet%2Fpom.xmlj%  zhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/examples%2Ftomcat-servlet%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>tomcat-servlet</artifactId>u}(j.%  (44758744c4f0ad45f6722d4d54792c1ddad04f5fj%  #integration_tests/it_common/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_common%2Fpom.xmlj%  ~https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_common%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j.%  (80a97e549f0ce7481a2d485584c655245de3358dj%  1integration_tests/it_exemplars_otel_agent/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j.%  (90c99c15596b192de324a53de84b880afe94dec7j%  /integration_tests/it_exemplars_otel_sdk/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j.%  (64441aee0be4d8e126583ea74ca23cb67dddfeefj%  *integration_tests/it_java_versions/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_java_versions%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_java_versions%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j.%  (3090704cdb55be24a678bc5725c15ba5fbff8fbej%  #integration_tests/it_log4j2/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_log4j2%2Fpom.xmlj%  ~https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_log4j2%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j.%  (aa17740a1a38769a29bdff94c1e4a80af68f5053j%  (integration_tests/it_pushgateway/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_pushgateway%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_pushgateway%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j.%  (487dba31d5597ce66a658992b8b9977871160b73j%  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j.%  (05a56956fc66fe059485a69aef350171c78564c1j%  integration_tests/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  shttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fpom.xmlj%  rhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/integration_tests%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j.%  (49a6cc19b6905ac7e4858c5f5ecd3122fa177380j%  pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  _https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/pom.xmlj%  ^https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/pom.xmlj%  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
 
     <name>Prometheus Java Suite</name>
     <url>http://github.com/prometheus/client_java</url>u}(j.%  (38701ed2329f5405a4165671ac01e0d6a1b22951j%  !prometheus-metrics-config/pom.xmlj%  modifiedj%  K	j%  Kj%  K
j%  {https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-config%2Fpom.xmlj%  zhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-config%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xo  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>
@@ -25,6 +25,14 @@
         </license>
     </licenses>
 
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@prometheus.io</email>
+        </developer>
+    </developers>
+
     <dependencies>
         <dependency>
             <groupId>junit</groupId>u}(j.%  (392db3ef2308ebcbe6fa164451c119a650aa5fe4j%  prometheus-metrics-core/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  yhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-core%2Fpom.xmlj%  xhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-core%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j.%  (a17ac2192b78213d59a250b8359b9e0d83abbd1ej%  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
@@ -32,12 +32,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-exposition-formats</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u}(j.%  (3762989e68974aaff111f401d0f6259365363915j%  -prometheus-metrics-exposition-formats/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-exposition-formats%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-exposition-formats%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X)  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j.%  (5e703261bf3ae8eb6084ee454c33eb0d69c469f5j%   prometheus-metrics-model/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  zhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-model%2Fpom.xmlj%  yhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-model%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j.%  (6efc105585b8fdd5c9188d7a8363e15d0628a397j%  !prometheus-metrics-tracer/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  {https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fpom.xmlj%  zhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j.%  (f76eb2158c7ea7afcdd69c53e62a79b13814462ej%  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j.%  (41121915b041b7a234634d1146e4f3d70027bc9bj%  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X!  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j.%  (e628e1310a495bbe5bafbd26ed38aa692d3932c6j%  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j.%  (a96adc6e44206185c0d4f877543caee19e8e21c6j%  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j.%  (42cb34138a9bcae4a594f094ca5b771b62de4105j%  protobuf-shaded/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  qhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/protobuf-shaded%2Fpom.xmlj%  phttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/protobuf-shaded%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(j.%  (16dd46d4f12193c14bd4e485174a5f901371da77j%  simpleclient/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  nhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient%2Fpom.xmlj%  mhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j.%  (e54830a6d8004739ebd6991e57fd90a5beed57a7j%  simpleclient_bom/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  rhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_bom%2Fpom.xmlj%  qhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_bom%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j.%  (d6a195f49944134cbdc277d3620eb507f86d084aj%  simpleclient_caffeine/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  whttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_caffeine%2Fpom.xmlj%  vhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_caffeine%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xp  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.github.ben-manes.caffeine</groupId>u}(j.%  (67c05bbcdb4cfcc4484d06f4cc7f16a8cc72f879j%  simpleclient_common/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  uhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_common%2Fpom.xmlj%  thttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_common%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X[  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j.%  (f6aeabbe558cdbbad5a448317ae3b5624730c48fj%  simpleclient_dropwizard/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  yhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_dropwizard%2Fpom.xmlj%  xhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_dropwizard%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xj  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.dropwizard.metrics</groupId>u}(j.%  (862ebd4c8c54a97ac08b108cdb0673034b871b5fj%  $simpleclient_graphite_bridge/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  ~https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_graphite_bridge%2Fpom.xmlj%  }https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_graphite_bridge%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xd  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j.%  (9ddb2f231b13ab06a81fee63bf3ce105540776a6j%  simpleclient_guava/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  thttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_guava%2Fpom.xmlj%  shttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_guava%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X`  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>u}(j.%  (58695646606877516cc68a13832e3830a3dc0431j%  simpleclient_hibernate/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  xhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_hibernate%2Fpom.xmlj%  whttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_hibernate%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  XV  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- We support Hibernate versions >= 4.2 -->u}(j.%  (30c3f5ed79f448501246b4ccf971599110d3f4ddj%  simpleclient_hotspot/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  vhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_hotspot%2Fpom.xmlj%  uhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_hotspot%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>
@@ -36,14 +36,14 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         
         <!-- Test Dependencies Follow -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>u}(j.%  (693bc9dccf3d1a2ba3122faac0d34adedd68abf7j%  simpleclient_httpserver/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  yhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_httpserver%2Fpom.xmlj%  xhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_httpserver%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  XY  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>
@@ -36,12 +36,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j.%  (44a8dd332c8e21c85465dfbad45772b717946825j%  simpleclient_jetty/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  thttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_jetty%2Fpom.xmlj%  shttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_jetty%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xa  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>
@@ -38,7 +38,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(j.%  (5ed130a89db28eacdf2731f36bddf89ce170575dj%  simpleclient_jetty_jdk8/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  yhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_jetty_jdk8%2Fpom.xmlj%  xhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_jetty_jdk8%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xf  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u      }(j.%  (67d294ff7eb58eac134c447445ed586e96f3187aj%  simpleclient_log4j/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  thttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_log4j%2Fpom.xmlj%  shttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_log4j%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xh  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j.%  (13af55105af26d0bd311e939da3b9ea151802d1ej%  simpleclient_log4j2/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  uhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_log4j2%2Fpom.xmlj%  thttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_log4j2%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xi  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j.%  (51aaa5cdef9bfb4fb37bbab8474740d88337bd64j%  simpleclient_logback/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  vhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_logback%2Fpom.xmlj%  uhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_logback%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X`  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>u}(j.%  (6197919d58ef87fd8f6f05fbb6c108d4f764cc01j%   simpleclient_pushgateway/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  zhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_pushgateway%2Fpom.xmlj%  yhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_pushgateway%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X^  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>
@@ -37,12 +37,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>u}(j.%  (2e2033e41547903e43a9998f0332fd406ba3c524j%  simpleclient_servlet/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  vhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet%2Fpom.xmlj%  uhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  XY  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>u}(j.%  (df5068323a33744892e30f236a3492dead6de827j%  #simpleclient_servlet_common/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  }https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet_common%2Fpom.xmlj%  |https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet_common%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X]  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>
@@ -40,12 +40,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j.%  (ede162091d55ab298c96343edf8eb8fce6d0cfc2j%  $simpleclient_servlet_jakarta/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  ~https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet_jakarta%2Fpom.xmlj%  }https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_servlet_jakarta%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xc  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u}(j.%  (0f8e40208fbe5c3b4c6d8bedf8cdf56412086909j%   simpleclient_spring_boot/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  zhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_spring_boot%2Fpom.xmlj%  yhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_spring_boot%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_boot%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X\  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_boot</artifactId>
@@ -51,17 +51,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
           <groupId>io.prometheus</groupId>
           <artifactId>simpleclient_spring_web</artifactId>
-          <version>0.16.1-SNAPSHOT</version>
+          <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>u}(j.%  (982d8f2274b88bde88935de1130cf2809a51bcd0j%  simpleclient_spring_web/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  yhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_spring_web%2Fpom.xmlj%  xhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_spring_web%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  Xb  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>
@@ -51,12 +51,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>u}(j.%  (92f806f61fb61bf54e492975125275928f19b4d3j%  simpleclient_tracer/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  uhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fpom.xmlj%  thttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j.%  (5536dfe89887ce6789f09401e63da87ae32151f2j%  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j.%  (dedf920421314c40bb06d69a6bc12f41bd3b466aj%  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j.%  (488b3db0a344f652b735f1e9be805287ba74f1d5j%  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  https://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj%  https://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j.%  (dd3fba81c862be1074d9a8a3e31c8203eb4be9f7j%  simpleclient_vertx/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  thttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_vertx%2Fpom.xmlj%  shttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_vertx%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j.%  (5ddc9f56747dfeb609a44f7e93908da7549d775fj%  simpleclient_vertx4/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  uhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_vertx4%2Fpom.xmlj%  thttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/simpleclient_vertx4%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>u}(j.%  (59dda206f3b26c5025ba10b482f2e25e3f5561ffj%  tmp_example/pom.xmlj%  modifiedj%  Kj%  Kj%  Kj%  mhttps://github.com/prometheus/client_java/blob/3f00b29731b8059395a247ab631e729a5bfc49ce/tmp_example%2Fpom.xmlj%  lhttps://github.com/prometheus/client_java/raw/3f00b29731b8059395a247ab631e729a5bfc49ce/tmp_example%2Fpom.xmlj%  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=3f00b29731b8059395a247ab631e729a5bfc49cej%  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>tmp_example</artifactId>ueu(b9baf5a92c66986b808fe6811496627e3923993c}(sha(b9baf5a92c66986b808fe6811496627e3923993cnode_idEC_kwDOAHoJt9oAKGI5YmFmNWE5MmM2Njk4NmI4MDhmZTY4MTE0OTY2MjdlMzkyMzk5M2Mcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-19T20:12:10Zu	committer}(j;'  Fabian Stäberj='  fabian@fstab.dej?'  2023-07-19T20:12:10Zumessage-Add README to the tomcat-servlet-example #850tree}(j3'  (9dd498d4c18cc02ce1711b018fc9227cd0d74ae3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9dd498d4c18cc02ce1711b018fc9227cd0d74ae3ujK'  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b9baf5a92c66986b808fe6811496627e3923993c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujK'  dhttps://api.github.com/repos/prometheus/client_java/commits/b9baf5a92c66986b808fe6811496627e3923993chtml_urlYhttps://github.com/prometheus/client_java/commit/b9baf5a92c66986b808fe6811496627e3923993ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b9baf5a92c66986b808fe6811496627e3923993c/commentsj9'  }(loginfstabidJ' j5'  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jK'  "https://api.github.com/users/fstabjW'  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujA'  }(j\'  fstabj^'  J' j5'  MDQ6VXNlcjMzMDUzNQ==j`'  2https://avatars.githubusercontent.com/u/330535?v=4jb'  h3jK'  "https://api.github.com/users/fstabjW'  https://github.com/fstabje'  ,https://api.github.com/users/fstab/followersjg'  9https://api.github.com/users/fstab/following{/other_user}ji'  2https://api.github.com/users/fstab/gists{/gist_id}jk'  9https://api.github.com/users/fstab/starred{/owner}{/repo}jm'  0https://api.github.com/users/fstab/subscriptionsjo'  'https://api.github.com/users/fstab/orgsjq'  (https://api.github.com/users/fstab/reposjs'  3https://api.github.com/users/fstab/events{/privacy}ju'  2https://api.github.com/users/fstab/received_eventsjw'  Userjy'  uparents]}(j3'  (97ccbfc71002c2b5da28f409779c8e3c6bac09adjK'  dhttps://api.github.com/repos/prometheus/client_java/commits/97ccbfc71002c2b5da28f409779c8e3c6bac09adjW'  Yhttps://github.com/prometheus/client_java/commit/97ccbfc71002c2b5da28f409779c8e3c6bac09aduastats}(totalKY	additionsKV	deletionsKufiles](}(j3'  (66d6378f72b7e30f7fe81664e3e0655092b2b553filename)examples/tomcat-servlet-example/README.mdstatusaddedj'  KRj'  K changesKRblob_urlhttps://github.com/prometheus/client_java/blob/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2FREADME.md?ref=b9baf5a92c66986b808fe6811496627e3923993cpatchX^  @@ -0,0 +1,82 @@
+# Tomcat Servlet Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+
+```
+java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+```
+
+Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.
+
+## Manually testing the Metrics Endpoint
+
+Metrics are available on [http://localhost:8080/metrics](http://localhost:8080/metrics). The default Prometheus text format looks like this:
+
+```
+# HELP request_duration_seconds request duration in seconds
+# TYPE request_duration_seconds histogram
+request_duration_seconds_bucket{http_status="200",le="0.005"} 0
+request_duration_seconds_bucket{http_status="200",le="0.01"} 1
+request_duration_seconds_bucket{http_status="200",le="0.025"} 1
+request_duration_seconds_bucket{http_status="200",le="0.05"} 2
+request_duration_seconds_bucket{http_status="200",le="0.1"} 5
+request_duration_seconds_bucket{http_status="200",le="0.25"} 11
+request_duration_seconds_bucket{http_status="200",le="0.5"} 12
+request_duration_seconds_bucket{http_status="200",le="1.0"} 12
+request_duration_seconds_bucket{http_status="200",le="2.5"} 12
+request_duration_seconds_bucket{http_status="200",le="5.0"} 12
+request_duration_seconds_bucket{http_status="200",le="10.0"} 12
+request_duration_seconds_bucket{http_status="200",le="+Inf"} 12
+request_duration_seconds_count{http_status="200"} 12
+request_duration_seconds_sum{http_status="200"} 1.513772412
+# HELP requests_total total number of requests
+# TYPE requests_total counter
+requests_total{http_status="200"} 12.0
+```
+
+The exporter servlet supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:8080/metrics?debug=text](http://localhost:8080/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:8080/metrics?debug=openmetrics](http://localhost:8080/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:8080/metrics?debug=prometheus-protobuf](http://localhost:8080/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## Testing with the Prometheus Server
+
+1. Download the latest Prometheus server release from [https://github.com/prometheus/prometheus/releases](https://github.com/prometheus/prometheus/releases).
+2. Extract the archive
+3. Edit `prometheus.yml` and append the following snippet at the end:
+   ```yaml
+    job_name: "tomcat-servlet-example"
+    static_configs:
+      - targets: ["localhost:8080"]
+   ```
+4. Run with native histograms and examplars enabled:
+   ```shell
+   ./prometheus --enable-feature=native-histograms --enable-feature=exemplar-storage
+   ```
+   
+Verify that the `tomcat-servlet-example` target is up on [http://localhost:9090/targets](http://localhost:9090/targets).
+
+Prometheus is now scraping metrics in Protobuf format. If you type the name `request_duration_seconds` you will see a non-human-readable representation of the histogram including the native buckets:
+
+![Screenshot showing a Prometheus Native Histogram in Text Format](https://github.com/prometheus/client_java/assets/330535/863efe0b-a9eb-40ae-a078-72497abc6f04)
+
+Note: You have to run at least one GET request on the Hello World endpoint [http://localhost:8080](http://localhost:8080) before you see the metric.
+
+Use the `histogram_quantile()` function to calculate quantiles from the native histogram:
+
+```
+histogram_quantile(0.95, rate(request_duration_seconds[10m]))
+```
+
+![Screenshot showing the 95th Percentile Calculated from a Prometheus Native Histogram](https://github.com/prometheus/client_java/assets/330535/889fb769-9445-4f6f-8540-2b1ddffca55e)u}(j3'  (1598028dbd14e0d6991a5a7a1796f150e5c9cd5ej'  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj'  modifiedj'  Kj'  K j'  Kj'  https://github.com/prometheus/client_java/blob/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj'  https://github.com/prometheus/client_java/raw/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj'  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=b9baf5a92c66986b808fe6811496627e3923993cj'  X#  @@ -12,6 +12,9 @@
 
 import static io.prometheus.metrics.model.snapshots.Unit.nanosToSeconds;
 
+/**
+ * Hello World REST servlet, with an example counter and an example histogram.
+ */
 public class HelloWorldServlet extends HttpServlet {
 
     private final Random random = new Random(0);u}(j3'  (3e33b1192f72f3b790d36a37270d632234c88927j'  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj'  modifiedj'  Kj'  Kj'  Kj'  https://github.com/prometheus/client_java/blob/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj'  https://github.com/prometheus/client_java/raw/b9baf5a92c66986b808fe6811496627e3923993c/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj'  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=b9baf5a92c66986b808fe6811496627e3923993cj'  Xy  @@ -1,16 +1,14 @@
 package io.prometheus.metrics.examples.tomcat_servlet;
 
-import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
 
 /**
- * Simple example using embedded Tomcat an the {@link PrometheusMetricsServlet}.
+ * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 ueu(32028c51520e28cd03077ef94445716e1c22ec9e}(sha(32028c51520e28cd03077ef94445716e1c22ec9enode_idEC_kwDOAHoJt9oAKDMyMDI4YzUxNTIwZTI4Y2QwMzA3N2VmOTQ0NDU3MTZlMWMyMmVjOWUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:05:12Zu	committer}(j'  Fabian Stäberj'  fabian@fstab.dej'  2023-07-17T10:13:36ZumessageKUpdate parent pom metadata

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j'  (ab547bbd04b310cdb7737bb6cfe2d06ebb2ccfbdurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ab547bbd04b310cdb7737bb6cfe2d06ebb2ccfbduj'  hhttps://api.github.com/repos/prometheus/client_java/git/commits/32028c51520e28cd03077ef94445716e1c22ec9e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj'  dhttps://api.github.com/repos/prometheus/client_java/commits/32028c51520e28cd03077ef94445716e1c22ec9ehtml_urlYhttps://github.com/prometheus/client_java/commit/32028c51520e28cd03077ef94445716e1c22ec9ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/32028c51520e28cd03077ef94445716e1c22ec9e/commentsj'  }(loginfstabidJ' j'  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j'  "https://api.github.com/users/fstabj'  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj'  }(j'  fstabj'  J' j'  MDQ6VXNlcjMzMDUzNQ==j'  2https://avatars.githubusercontent.com/u/330535?v=4j'  h3j'  "https://api.github.com/users/fstabj'  https://github.com/fstabj'  ,https://api.github.com/users/fstab/followersj'  9https://api.github.com/users/fstab/following{/other_user}j'  2https://api.github.com/users/fstab/gists{/gist_id}j'  9https://api.github.com/users/fstab/starred{/owner}{/repo}j'  0https://api.github.com/users/fstab/subscriptionsj'  'https://api.github.com/users/fstab/orgsj'  (https://api.github.com/users/fstab/reposj'  3https://api.github.com/users/fstab/events{/privacy}j'  2https://api.github.com/users/fstab/received_eventsj'  Userj'  uparents]}(j'  (6f19357786a4d2451864b873bcd7f623590e5fe5j'  dhttps://api.github.com/repos/prometheus/client_java/commits/6f19357786a4d2451864b873bcd7f623590e5fe5j'  Yhttps://github.com/prometheus/client_java/commit/6f19357786a4d2451864b873bcd7f623590e5fe5uastats}(totalK	additionsK
	deletionsKufiles]}(j'  (31ccbeb7c7a1852bfd73e4fec7dde56c66af4b5ffilenamepom.xmlstatusmodifiedj(  K
j(  KchangesKblob_url_https://github.com/prometheus/client_java/blob/32028c51520e28cd03077ef94445716e1c22ec9e/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/32028c51520e28cd03077ef94445716e1c22ec9e/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=32028c51520e28cd03077ef94445716e1c22ec9epatchX  @@ -7,10 +7,10 @@
     <artifactId>client_java</artifactId>
     <version>1.0.0-alpha-1-SNAPSHOT</version>
 
-    <name>Prometheus Java Suite</name>
+    <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
     <description>
-        The Prometheus Java Suite: Client Metrics, Exposition, and Examples
+        The Prometheus Java Metrics Library
     </description>
 
     <licenses>
@@ -34,6 +34,16 @@
             <name>Matt T. Proud</name>
             <email>matt.proud@gmail.com</email>
         </developer>
+        <developer>
+            <id>brian-brazil</id>
+            <name>Brian Brazil</name>
+            <email>brian.brazil@boxever.com</email>
+        </developer>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
     </developers>
 
     <modules>
@@ -193,6 +203,7 @@
                     <useReleaseProfile>false</useReleaseProfile>
                     <releaseProfiles>release</releaseProfiles>
                     <goals>deploy</goals>
+                    <tagNameFormat>v${project.version}</tagNameFormat>
                 </configuration>
             </plugin>
             <plugin>uau(5178fb0abaf89ea6e92fea9129e5ec3196b3d21f}(sha(5178fb0abaf89ea6e92fea9129e5ec3196b3d21fnode_idEC_kwDOAHoJt9oAKDUxNzhmYjBhYmFmODllYTZlOTJmZWE5MTI5ZTVlYzMxOTZiM2QyMWYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T11:19:19Zu	committer}(j5(  Fabian Stäberj7(  fabian@fstab.dej9(  2023-07-16T11:19:19ZumessageAllow null as Info helptree}(j-(  (80e00081d9959e4e28dfa9c73dc71ee8962b43f4urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/80e00081d9959e4e28dfa9c73dc71ee8962b43f4ujE(  hhttps://api.github.com/repos/prometheus/client_java/git/commits/5178fb0abaf89ea6e92fea9129e5ec3196b3d21f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujE(  dhttps://api.github.com/repos/prometheus/client_java/commits/5178fb0abaf89ea6e92fea9129e5ec3196b3d21fhtml_urlYhttps://github.com/prometheus/client_java/commit/5178fb0abaf89ea6e92fea9129e5ec3196b3d21fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/5178fb0abaf89ea6e92fea9129e5ec3196b3d21f/commentsj3(  }(loginfstabidJ' j/(  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jE(  "https://api.github.com/users/fstabjQ(  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj;(  }(jV(  fstabjX(  J' j/(  MDQ6VXNlcjMzMDUzNQ==jZ(  2https://avatars.githubusercontent.com/u/330535?v=4j\(  h3jE(  "https://api.github.com/users/fstabjQ(  https://github.com/fstabj_(  ,https://api.github.com/users/fstab/followersja(  9https://api.github.com/users/fstab/following{/other_user}jc(  2https://api.github.com/users/fstab/gists{/gist_id}je(  9https://api.github.com/users/fstab/starred{/owner}{/repo}jg(  0https://api.github.com/users/fstab/subscriptionsji(  'https://api.github.com/users/fstab/orgsjk(  (https://api.github.com/users/fstab/reposjm(  3https://api.github.com/users/fstab/events{/privacy}jo(  2https://api.github.com/users/fstab/received_eventsjq(  Userjs(  uparents]}(j-(  (6f2a435bc0164a326aa958d136d87809040513d4jE(  dhttps://api.github.com/repos/prometheus/client_java/commits/6f2a435bc0164a326aa958d136d87809040513d4jQ(  Yhttps://github.com/prometheus/client_java/commit/6f2a435bc0164a326aa958d136d87809040513d4uastats}(totalK	additionsK	deletionsKufiles]}(j-(  (9d6675dbb86e65db74b02e8eedafd51293d16c71filenameRprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javastatusmodifiedj(  Kj(  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/5178fb0abaf89ea6e92fea9129e5ec3196b3d21f/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaraw_urlhttps://github.com/prometheus/client_java/raw/5178fb0abaf89ea6e92fea9129e5ec3196b3d21f/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=5178fb0abaf89ea6e92fea9129e5ec3196b3d21fpatchX  @@ -106,7 +106,10 @@ public Builder withName(String name) {
          */
         @Override
         public Builder withUnit(Unit unit) {
-            throw new UnsupportedOperationException("Info metrics cannot have a unit.");
+            if (unit != null) {
+                throw new UnsupportedOperationException("Info metrics cannot have a unit.");
+            }
+            return this;
         }
 
         private static String normalizeName(String name) {uau(c8b22bbd1a61ad6b04bd433da4985cd0abda2661}(sha(c8b22bbd1a61ad6b04bd433da4985cd0abda2661node_idEC_kwDOAHoJt9oAKGM4YjIyYmJkMWE2MWFkNmIwNGJkNDMzZGE0OTg1Y2QwYWJkYTI2NjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-06T16:12:11Zu	committer}(j(  Fabian Stäberj(  fabian@fstab.dej(  2023-08-06T16:15:48Zumessage&Add Jetty sample for the Exporter testtree}(j(  (5ba537ed88f3c1fc4fc371df79c118c342909a92urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/5ba537ed88f3c1fc4fc371df79c118c342909a92uj(  hhttps://api.github.com/repos/prometheus/client_java/git/commits/c8b22bbd1a61ad6b04bd433da4985cd0abda2661
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj(  dhttps://api.github.com/repos/prometheus/client_java/commits/c8b22bbd1a61ad6b04bd433da4985cd0abda2661html_urlYhttps://github.com/prometheus/client_java/commit/c8b22bbd1a61ad6b04bd433da4985cd0abda2661comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/commentsj(  }(loginfstabidJ' j(  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j(  "https://api.github.com/users/fstabj(  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj(  }(j(  fstabj(  J' j(  MDQ6VXNlcjMzMDUzNQ==j(  2https://avatars.githubusercontent.com/u/330535?v=4j(  h3j(  "https://api.github.com/users/fstabj(  https://github.com/fstabj(  ,https://api.github.com/users/fstab/followersj(  9https://api.github.com/users/fstab/following{/other_user}j(  2https://api.github.com/users/fstab/gists{/gist_id}j(  9https://api.github.com/users/fstab/starred{/owner}{/repo}j(  0https://api.github.com/users/fstab/subscriptionsj(  'https://api.github.com/users/fstab/orgsj(  (https://api.github.com/users/fstab/reposj(  3https://api.github.com/users/fstab/events{/privacy}j(  2https://api.github.com/users/fstab/received_eventsj(  Userj(  uparents]}(j(  (b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1j(  dhttps://api.github.com/repos/prometheus/client_java/commits/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1j(  Yhttps://github.com/prometheus/client_java/commit/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1uastats}(totalK	additionsK،	deletionsKufiles](}(j(  (8767c971d0f813a8af5a6dee7d7276f15ae79be6filenameCintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlstatusmodifiedj)  Kj)  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661patchX|  @@ -11,9 +11,9 @@
 
     <artifactId>it-exporter-httpserver-sample</artifactId>
 
-    <name>Integration Tests - HTTPServer Sample</name>
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
     <description>
-        HTTPServer Sample for Integration Testing
+        HTTPServer Sample for the Exporter Integration Test
     </description>
 
     <licenses>
@@ -46,7 +46,7 @@
     </dependencies>
 
     <build>
-        <finalName>httpserver-sample</finalName>
+        <finalName>exporter-httpserver-sample</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j(  (6111b6c28ef5b8586d91365f50d7c6d1c4b08a7fj)  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj
)  modifiedj)  Kj)  Kj)  Kj
)  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj)  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj)  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X  @@ -21,7 +21,7 @@ enum Mode {
     public static void main(String[] args) throws IOException, InterruptedException {
 
         if (args.length != 2) {
-            System.err.println("Usage: java -jar httpserver-sample.jar <port> <mode>");
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
             System.err.println("Where mode is \"success\" or \"error\".");
             System.exit(1);
         }
@@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("httpserver-sample");
+        info.infoLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j(  (a470df5c021d465c51388b5a740ba88a49d40858j)  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj
)  addedj)  KSj)  K j)  KSj
)  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj)  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj)  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j(  (efa119c4e2292afc04d79a6f1b049bca20e923bej)  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj
)  addedj)  Kqj)  K j)  Kqj
)  X  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj)  X
  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj)  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j(  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j)  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj
)  modifiedj)  Kj)  Kj)  K	j
)  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj)  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj)  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X4  @@ -11,9 +11,9 @@
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
 
-    <name>Integration Tests - Servlet with Tomcat Sample</name>
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
     <description>
-        Tomcat Sample for Integration Testing
+        Tomcat Sample for the Exporter Integration Test
     </description>
 
     <licenses>
@@ -51,7 +51,7 @@
     </dependencies>
 
     <build>
-        <finalName>servlet-tomcat-sample</finalName>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -66,8 +66,7 @@
                             <transformers>
                                 <transformer
                                         implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.TomcatServletSample
-                                    </mainClass>
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>u}(j(  (21956ae78f5aca3a25abb6b5bb32a80999930390j)  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj
)  renamedj)  Kj)  Kj)  K
j
)  X  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj)  X  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj)  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X  @@ -18,9 +18,9 @@
 import java.nio.file.Path;
 
 /**
- * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
  */
-public class TomcatServletSample {
+public class ExporterServletTomcatSample {
     enum Mode {
         success,
         error
@@ -29,7 +29,7 @@ enum Mode {
     public static void main(String[] args) throws LifecycleException, IOException {
 
         if (args.length != 2) {
-            System.err.println("Usage: java -jar servlet-jakarta.jar <port> <mode>");
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
             System.err.println("Where mode is \"success\" or \"error\".");
             System.exit(1);
         }
@@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("servlet-tomcat-sample");
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")
@@ -80,7 +80,7 @@ public MetricSnapshot collect() {
         Tomcat tomcat = new Tomcat();
         tomcat.setPort(port);
 
-        Path tmpDir = Files.createTempDirectory("servlet-tomcat-sample-");
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
         tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
         Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());previous_filenameintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/TomcatServletSample.javau}(j(  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj)  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj
)  modifiedj)  Kj)  Kj)  K	j
)  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj)  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj)  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X  @@ -39,15 +39,16 @@ public class ExporterIT {
     @Parameterized.Parameters(name = "{0}")
     public static String[] sampleApps() {
         return new String[]{
-                "httpserver-sample",
-                "servlet-tomcat-sample",
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
         };
     }
 
     public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
         this.sampleApp = sampleApp;
         this.sampleAppVolume = Volume.create("it-exporter")
-                .copy("../../it-exporter-" + sampleApp + "/target/" + sampleApp + ".jar");
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
         this.sampleAppContainer = new GenericContainer<>("openjdk:17")
                 .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
                 .withWorkingDirectory("/app")
@@ -152,7 +153,7 @@ public void testErrorHandling() throws IOException {
         sampleAppContainer
                 .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
                 .start();
-        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Response response = scrape("GET", "");
         Assert.assertEquals(500, response.status);
         Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
     }u}(j(  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j)  %integration-tests/it-exporter/pom.xmlj
)  modifiedj)  Kj)  K j)  Kj
)  https://github.com/prometheus/client_java/blob/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fpom.xmlj)  https://github.com/prometheus/client_java/raw/c8b22bbd1a61ad6b04bd433da4985cd0abda2661/integration-tests%2Fit-exporter%2Fpom.xmlj)  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=c8b22bbd1a61ad6b04bd433da4985cd0abda2661j)  X  @@ -42,6 +42,7 @@
 
     <modules>
         <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
         <module>it-exporter-httpserver-sample</module>
         <module>it-exporter-test</module>
     </modules>ueu(1e32584be1a687e73b48be40bc1769b4b2ac25c3}(sha(1e32584be1a687e73b48be40bc1769b4b2ac25c3node_idEC_kwDOAHoJt9oAKDFlMzI1ODRiZTFhNjg3ZTczYjQ4YmU0MGJjMTc2OWI0YjJhYzI1YzMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-28T20:41:54Zu	committer}(jY)  Fabian Stäberj[)  fabian@fstab.dej])  2023-06-28T20:41:54Zumessage1add error handling to long running histogram testtree}(jQ)  (2f0c61937f30f549946d2ebf681e48d576af07b2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/2f0c61937f30f549946d2ebf681e48d576af07b2uji)  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1e32584be1a687e73b48be40bc1769b4b2ac25c3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuji)  dhttps://api.github.com/repos/prometheus/client_java/commits/1e32584be1a687e73b48be40bc1769b4b2ac25c3html_urlYhttps://github.com/prometheus/client_java/commit/1e32584be1a687e73b48be40bc1769b4b2ac25c3comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1e32584be1a687e73b48be40bc1769b4b2ac25c3/commentsjW)  }(loginfstabidJ' jS)  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ji)  "https://api.github.com/users/fstabju)  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj_)  }(jz)  fstabj|)  J' jS)  MDQ6VXNlcjMzMDUzNQ==j~)  2https://avatars.githubusercontent.com/u/330535?v=4j)  h3ji)  "https://api.github.com/users/fstabju)  https://github.com/fstabj)  ,https://api.github.com/users/fstab/followersj)  9https://api.github.com/users/fstab/following{/other_user}j)  2https://api.github.com/users/fstab/gists{/gist_id}j)  9https://api.github.com/users/fstab/starred{/owner}{/repo}j)  0https://api.github.com/users/fstab/subscriptionsj)  'https://api.github.com/users/fstab/orgsj)  (https://api.github.com/users/fstab/reposj)  3https://api.github.com/users/fstab/events{/privacy}j)  2https://api.github.com/users/fstab/received_eventsj)  Userj)  uparents]}(jQ)  (3825c64d1fa15490ba14176a244b8cd0f62b9c42ji)  dhttps://api.github.com/repos/prometheus/client_java/commits/3825c64d1fa15490ba14176a244b8cd0f62b9c42ju)  Yhttps://github.com/prometheus/client_java/commit/3825c64d1fa15490ba14176a244b8cd0f62b9c42uastats}(totalK	additionsK
	deletionsKufiles]}(jQ)  (10ec29d0345a0b85e6ccc4c49992b6393fa7677cfilenameMtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javastatusmodifiedj)  K
j)  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/1e32584be1a687e73b48be40bc1769b4b2ac25c3/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/1e32584be1a687e73b48be40bc1769b4b2ac25c3/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java=     contents_urlhttps://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=1e32584be1a687e73b48be40bc1769b4b2ac25c3patchX5  @@ -73,12 +73,17 @@ public void run() throws InterruptedException {
             producers.submit(() -> {
                 double[] random = randoms[finalThread];
                 while (true) {
-                    long start = System.nanoTime();
-                    for (int i = 0; i < random.length; i++) {
-                        prometheusHistogram.observe(i);
+                    try {
+                        long start = System.nanoTime();
+                        for (int i = 0; i < random.length; i++) {
+                            prometheusHistogram.observe(i);
+                        }
+                        long duration = System.nanoTime() - start;
+                        System.out.println("[" + Thread.currentThread().getName() + "] observing took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        System.exit(-1);
                     }
-                    long duration = System.nanoTime() - start;
-                    System.out.println("[" + Thread.currentThread().getName() + "] observing took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
                 }
             });
         }uau(c45dd350414a4a980e7058aaa9da9bd668090170}(sha(c45dd350414a4a980e7058aaa9da9bd668090170node_idEC_kwDOAHoJt9oAKGM0NWRkMzUwNDE0YTRhOTgwZTcwNThhYWE5ZGE5YmQ2NjgwOTAxNzAcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-02T16:16:50Zu	committer}(j)  Fabian Stäberj)  fabian@fstab.dej)  2023-07-02T16:16:50ZumessageJavaDoc for Counter and Gaugetree}(j)  (739b011dc81beb68227ede94746cb87cb488bd2curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/739b011dc81beb68227ede94746cb87cb488bd2cuj)  hhttps://api.github.com/repos/prometheus/client_java/git/commits/c45dd350414a4a980e7058aaa9da9bd668090170
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj)  dhttps://api.github.com/repos/prometheus/client_java/commits/c45dd350414a4a980e7058aaa9da9bd668090170html_urlYhttps://github.com/prometheus/client_java/commit/c45dd350414a4a980e7058aaa9da9bd668090170comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/c45dd350414a4a980e7058aaa9da9bd668090170/commentsj)  }(loginfstabidJ' j)  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j)  "https://api.github.com/users/fstabj)  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj)  }(j)  fstabj)  J' j)  MDQ6VXNlcjMzMDUzNQ==j)  2https://avatars.githubusercontent.com/u/330535?v=4j)  h3j)  "https://api.github.com/users/fstabj)  https://github.com/fstabj)  ,https://api.github.com/users/fstab/followersj)  9https://api.github.com/users/fstab/following{/other_user}j)  2https://api.github.com/users/fstab/gists{/gist_id}j)  9https://api.github.com/users/fstab/starred{/owner}{/repo}j *  0https://api.github.com/users/fstab/subscriptionsj*  'https://api.github.com/users/fstab/orgsj*  (https://api.github.com/users/fstab/reposj*  3https://api.github.com/users/fstab/events{/privacy}j*  2https://api.github.com/users/fstab/received_eventsj
*  Userj*  uparents]}(j)  (6e1666e979c7e4ad69dd8ae1c10881172e3110d9j)  dhttps://api.github.com/repos/prometheus/client_java/commits/6e1666e979c7e4ad69dd8ae1c10881172e3110d9j)  Yhttps://github.com/prometheus/client_java/commit/6e1666e979c7e4ad69dd8ae1c10881172e3110d9uastats}(totalMi	additionsK	deletionsKuufiles](}(j)  (c2f72c30ee3460cd864df79e4ea1f37160c8aa64filenameaprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/CounterDataPoint.javastatusmodifiedj&*  Kj'*  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javaraw_urlhttps://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170patchX  @@ -60,29 +60,29 @@ default void inc(long amount) {
         inc((double) amount);
     }
 
-    /**
-     * Add one, but also create a custom exemplar with the given labels.
-     */
-    default void incWithExemplar(Labels labels) {
-        incWithExemplar(1.0, labels);
-    }
-
     /**
      * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
      */
     void inc(double amount);
 
     /**
-     * Add {@code amount}, but also create a custom exemplar with the given labels.
-     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     * Add one, and create a custom exemplar with the given labels.
      */
-    void incWithExemplar(double amount, Labels labels);
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
 
     /**
-     * Add {@code amount}, but also create a custom exemplar with the given labels.
+     * Add {@code amount}, and create a custom exemplar with the given labels.
      * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
      */
     default void incWithExemplar(long amount, Labels labels) {
         inc((double) amount);
     }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    void incWithExemplar(double amount, Labels labels);
 }u}(j)  (9daf0142815c398164ac1c680d2961e5e1011fccj,*  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/GaugeDataPoint.javaj.*  modifiedj&*  K+j'*  Kj0*  KBj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X
  @@ -2,58 +2,78 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 
-public interface GaugeDataPoint extends DataPoint {
+/**
+ * Represents a single gauge data point, i.e. a single line for a gauge metric in Prometheus text format.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface GaugeDataPoint extends DataPoint, TimerApi {
 
+    /**
+     * Add one.
+     */
     default void inc() {
         inc(1.0);
     }
 
-    // TODO: Do we need this method?
-    default void incWithExemplar() {
-        incWithExemplar(1.0, Labels.EMPTY);
-    }
+    /**
+     * Add {@code amount}.
+     */
+    void inc(double amount);
 
+    /**
+     * Add one, and create a custom exemplar with the given labels.
+     */
     default void incWithExemplar(Labels labels) {
         incWithExemplar(1.0, labels);
     }
 
-    void inc(double amount);
-
-    default void incWithExemplar(double amount) {
-        incWithExemplar(amount, Labels.EMPTY);
-    }
-
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     */
     void incWithExemplar(double amount, Labels labels);
 
+    /**
+     * Subtract one.
+     */
     default void dec() {
         inc(-1.0);
     }
 
-    default void decWithExemplar() {
-        incWithExemplar(-1.0, Labels.EMPTY);
+    /**
+     * Subtract {@code amount}.
+     */
+    default void dec(double amount) {
+        inc(-amount);
     }
 
+    /**
+     * Subtract one, and create a custom exemplar with the given labels.
+     */
     default void decWithExemplar(Labels labels) {
         incWithExemplar(-1.0, labels);
     }
 
-    default void dec(double amount) {
-        inc(-amount);
-    }
-
-    default void decWithExemplar(double amount) {
-        incWithExemplar(-amount, Labels.EMPTY);
-    }
+    /**
+     * Subtract {@code amount}, and create a custom exemplar with the given labels.
+     */
     default void decWithExemplar(double amount, Labels labels) {
         incWithExemplar(-amount, labels);
     }
 
+    /**
+     * Set the gauge to {@code value}.
+     */
     void set(double value);
-    default void setWithExemplar(double value) {
-        setWithExemplar(value, Labels.EMPTY);
-    }
+
+    /**
+     * Set the gauge to {@code value}, and create a custom exemplar with the given labels.
+     */
     void setWithExemplar(double value, Labels labels);
 
+    /**
+     * {@inheritDoc}
+     */
     default Timer startTimer() {
         return new Timer(this::set);
     }u}(j)  (5e2fcb530d143c42e6bcd146a8cd6c79bab7430fj,*  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/Timer.javaj.*  modifiedj&*  K
j'*  Kj0*  Kj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X^  @@ -3,23 +3,35 @@
 import java.io.Closeable;
 import java.util.function.DoubleConsumer;
 
+/**
+ * Helper class for observing durations.
+ */
 public class Timer implements Closeable {
 
     private static final double NANOSECONDS_PER_SECOND = 1E9;
     private final DoubleConsumer observeFunction;
     private final long startTimeNanos = System.nanoTime();
 
-    // package private
+    /**
+     * Constructor is package private. Use the {@link TimerApi} provided by the implementation of the {@link DataPoint}.
+     */
     Timer(DoubleConsumer observeFunction) {
         this.observeFunction = observeFunction;
     }
 
+    /**
+     * Records the observed duration in seconds since this {@code Timer} instance was created.
+     * @return the observed duration.
+     */
     public double observeDuration() {
         double elapsed = (System.nanoTime() - startTimeNanos) / NANOSECONDS_PER_SECOND;
         observeFunction.accept(elapsed);
         return elapsed;
     }
 
+    /**
+     * Same as {@link #observeDuration()}.
+     */
     @Override
     public void close() {
         observeDuration();u}(j)  (76fc6327122514478c9c906ed2fb58377ef11d10j,*  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/TimerApi.javaj.*  addedj&*  K5j'*  K j0*  K5j1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  XJ  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.core.datapoints;
+
+import java.util.concurrent.Callable;
+import java.util.function.Supplier;
+
+/**
+ * Convenience API for timing the duration of method calls.
+ * <p>
+ * All times are recorded in seconds, as Prometheus mandates seconds as the base unit.
+ */
+public interface TimerApi {
+
+    /**
+     * Start a {@code Timer}. Example:
+     * <pre>{@code
+     * try (Timer timer = dataPoint.startTimer) {
+     *     // duration of this code block will be observed.
+     * }
+     * }</pre>
+     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
+     */
+    Timer startTimer();
+
+    /**
+     * Observe the duration of the {@code func} call.
+     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
+     */
+    default void time(Runnable func) {
+        try (Timer timer = startTimer()) {
+            func.run();
+        }
+    }
+
+    /**
+     * Observe the duration of the {@code func} call.
+     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
+     * @return the return value of {@code func}.
+     */
+    default <T> T time(Supplier<T> func) {
+        try (Timer timer = startTimer()) {
+            return func.get();
+        }
+    }
+
+    /**
+     * Like {@link #time(Supplier)}, but {@code func} may throw a checked {@code Exception}.
+     */
+    default <T> T timeChecked(Callable<T> func) throws Exception {
+        try (Timer timer = startTimer()) {
+            return func.call();
+        }
+    }
+}u}(j)  (2d9eb0b54e3b4bc1c03b730b413f2366c81c4d39j,*  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CallbackMetric.javaj.*  modifiedj&*  Kj'*  Kj0*  Kj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X  @@ -6,14 +6,9 @@
 import java.util.List;
 
 /**
- * There are two kinds of metrics:
- * <ul>
- *     <li>A {@code StatefulMetric} actively maintains its current values, e.g. a stateful counter actively stores its current count.</li>
- *     <li>A {@code CallbackMetric} gets its values on demand when it is collected, e.g. a callback gauge representing the current heap size.</li>
- * </ul>
- * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
- * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
- * but this has nothing to do with multi-threading.
+ * There are two kinds of metrics: {@code StatefulMetric} and {@code CallbackMetric}.
+ * <p>
+ * See JavaDoc on {@link StatefulMetric} for more info.
  */
 abstract class CallbackMetric extends MetricWithFixedMetadata {
 u}(j)  (6ad04129200b97c859bc0e89024340470e1a2045j,*  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj.*  modifiedj&*  Kj'*  Kj0*  Kj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X
  @@ -109,14 +109,6 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
         return new CounterSnapshot(getMetadata(), data);
     }
 
-    public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.get());
-    }
-
-    public static Builder newBuilder(PrometheusProperties config) {
-        return new Builder(config);
-    }
-
     static String normalizeName(String name) {
         if (name != null && name.endsWith("_total")) {
             name = name.substring(0, name.length() - 6);
@@ -212,6 +204,14 @@ private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
         }
     }
 
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
     public static class Builder extends StatefulMetric.Builder<Builder, Counter> {
 
         private Builder(PrometheusProperties properties) {u}(j)  (79d8dc30fa819b8b29405eed3dc5c7e0452e0dfcj,*  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javaj.*  modifiedj&*  K:j'*  K3j0*  Kmj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X  @@ -2,19 +2,40 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
-import java.util.function.DoubleSupplier;
 
+/**
+ * Gauge metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Gauge currentActiveUsers = Gauge.newBuilder()
+ *     .withName("current_active_users")
+ *     .withHelp("Number of users that are currently active")
+ *     .withLabelNames("region")
+ *     .register();
+ *
+ * public void login(String region) {
+ *     currentActiveUsers.withLabelValues(region).inc();
+ *     // perform login
+ * }
+ *
+ * public void logout(String region) {
+ *     currentActiveUsers.withLabelValues(region).dec();
+ *     // perform logout
+ * }
+ * }</pre>
+ */
 public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
 
     private final boolean exemplarsEnabled;
@@ -31,26 +52,41 @@ private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void inc(double amount) {
         getNoLabels().inc(amount);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void incWithExemplar(double amount, Labels labels) {
         getNoLabels().incWithExemplar(amount, labels);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void set(double value) {
         getNoLabels().set(value);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void setWithExemplar(double value, Labels labels) {
         getNoLabels().setWithExemplar(value, labels);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GaugeSnapshot collect() {
         return (GaugeSnapshot) super.collect();
@@ -89,6 +125,9 @@ private DataPoint(ExemplarSampler exemplarSampler) {
 
         private final AtomicLong value = new AtomicLong(Double.doubleToRawLongBits(0));
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void inc(double amount) {
             long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
@@ -97,6 +136,9 @@ public void inc(double amount) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void incWithExemplar(double amount, Labels labels) {
             long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
@@ -105,6 +147,9 @@ public void incWithExemplar(double amount, Labels labels) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void set(double value) {
             this.value.set(Double.doubleToRawLongBits(value));
@@ -113,6 +158,9 @@ public void set(double value) {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void setWithExemplar(double value, Labels labels) {
             this.value.set(Double.doubleToRawLongBits(value));
@@ -138,6 +186,14 @@ private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
         }
     }
 
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
     public static class Builder extends StatefulMetric.Builder<Builder, Gauge> {
 
         private Builder(PrometheusProperties config) {
@@ -154,53 +210,4 @@ protected Builder self() {
             return this;
         }
     }
-
-    public static class FromCallback extends MetricWithFixedMetadata {
-
-        private final DoubleSupplier callback;
-
-        private FromCallback(Gauge.FromCallback.Builder builder) {
-            super(builder);
-            this.callback = builder.callback;
-        }
-
-        @Override
-        public GaugeSnapshot collect() {
-            return new GaugeSnapshot(getMetadata(), Collections.singletonList(
-                    new GaugeSnapshot.GaugeDataPointSnapshot(callback.getAsDouble(), constLabels, null)
-            ));
-        }
-
-        public static class Builder extends MetricWithFixedMetadata.Builder<Gauge.FromCallback.Builder, Gauge.FromCallback> {
-
-            private DoubleSupplier callback;
-
-            private Builder(PrometheusProperties config) {
-                super(Collections.emptyList(), config);
-            }
-
-            public Gauge.FromCallback.Builder withCallback(DoubleSupplier callback) {
-                this.callback = callback;
-                return this;
-            }
-
-            @Override
-            public Gauge.FromCallback build() {
-                return new Gauge.FromCallback(this);
-            }
-
-            @Override
-            protected Gauge.FromCallback.Builder self() {
-                return this;
-            }
-        }
-    }
-
-    public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.get());
-    }
-
-    public static Builder newBuilder(PrometheusProperties config) {
-        return new Builder(config);
-    }
 }u}(j)  (2faf525fbb0962d1695c92901c247c768db13a46j,*  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TmpTest.javaj.*  modifiedj&*  K6j'*  Kj0*  KBj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  XN  @@ -1,8 +1,11 @@
 package io.prometheus.metrics.core.metrics;
 
+import io.prometheus.metrics.core.datapoints.Timer;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
@@ -31,8 +34,45 @@ private static double getErroneousMessageCount() {
         return 8.0;
     }
 
-    public static void main(String[] args) {
+    static Gauge currentActiveUsers = Gauge.newBuilder()
+            .withName("current_active_users")
+            .withHelp("Number of users that are currently active")
+            .withLabelNames("region")
+            .register();
 
+    public static void login (String region){
+        currentActiveUsers.withLabelValues(region).inc();
+        // perform login
+    }
+
+    public static void logout (String region){
+        currentActiveUsers.withLabelValues(region).dec();
+        // perform logout
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        login("us");
+        login("us");
+        logout("us");
+
+        Gauge latestBatchJobDuration = Gauge.newBuilder()
+                .withName("latest_backup_duration_seconds")
+                .withHelp("Duration of the latest backup run in seconds.")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("env")
+                .register();
+        try (Timer timer = latestBatchJobDuration.withLabelValues("prod").startTimer()) {
+            Thread.sleep(100);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+
+        latestBatchJobDuration.time(() -> System.out.println("hi"));
+
+        latestBatchJobDuration.time(() -> {return 1 + 2;});
+
+        latestBatchJobDuration.timeChecked(() -> {return 1 + 2;});
         /*
 
         JVM_GC_COLLECTION_SECONDS,
@@ -41,7 +81,7 @@ public static void main(String[] args) {
          */
         double MILLISECONDS_PER_SECOND = 1E3;
 
-        SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
+             SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
                 .withName("jvm_gc_collection_seconds")
                 .withHelp("Time spent in a given JVM garbage collector in seconds.")
                 .withUnit(Unit.SECONDS)
@@ -50,15 +90,15 @@ public static void main(String[] args) {
                     for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
                         callback.call(
                                 gc.getCollectionCount(),
-                           gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
+                                gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
                                 Quantiles.EMPTY,
                                 gc.getName()
                         );
                     }
                 })
                 .build();
 
-        Runtime.getRuntime().gc();
+             Runtime.getRuntime().gc();
         /*
         GaugeMetricFamily used = new GaugeMetricFamily(
                 JVM_MEMORY_BYTES_USED,
@@ -71,7 +111,7 @@ public static void main(String[] args) {
 
         MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
 
-        GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
+             GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
                 .withName("jvm_memory_bytes_used")
                 .withHelp("Used bytes of a given JVM memory area.")
                 .withUnit(Unit.BYTES)
@@ -82,21 +122,23 @@ public static void main(String[] args) {
                 })
                 .build();
 
-        CounterWithCallback messageCount = CounterWithCallback.newBuilder()
+             CounterWithCallback messageCount = CounterWithCallback.newBuilder()
                 .withName("messages_total")
                 .withLabelNames("status")
                 .withConstLabels(Labels.of("staus", "b"))
                 .withCallback(messageCountCallback)
                 .build();
 
-        ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
-        CounterWithCallback counter = CounterWithCallback.newBuilder()
+             ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+             CounterWithCallback counter = CounterWithCallback.newBuilder()
                 .withName("classes_loaded_total")
                 .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
                 .build();
-        CounterSnapshot sn = messageCount.collect();
-        GaugeSnapshot sn2 = memoryBytesUsed.collect();
-        SummarySnapshot sn3 = gcSeconds.collect();
-        System.out.println(sn2);
+             CounterSnapshot sn = messageCount.collect();
+             GaugeSnapshot sn2 = memoryBytesUsed.collect();
+             SummarySnapshot sn3 = gcSeconds.collect();
+             PrometheusRegistry r = PrometheusRegistry.defaultRegistry;
+             MetricSnapshots s = r.scrape();
+             System.out.println(sn2);
     }
 }u}(j)  (7d8fd187dd99edf20b439f7bcb2faf65f143b74ej,*  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javaj.*  modifiedj&*  Kj'*  Kj0*  Kj1*  https://github.com/prometheus/client_java/blob/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj3*  https://github.com/prometheus/client_java/raw/c45dd350414a4a980e7058aaa9da9bd668090170/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj5*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=c45dd350414a4a980e7058aaa9da9bd668090170j7*  X  @@ -8,9 +8,7 @@
 import java.util.stream.Collectors;
 
 /**
- * To be registered with the Prometheus collector registry.
- * See <i>Overall Structure</i> on
- * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
+ * Like {@link Collector}, but collecting multiple Snapshots at once.
  */
 @FunctionalInterface
 public interface MultiCollector {ueu(c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b}(sha(c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bnode_idEC_kwDOAHoJt9oAKGM5YzBiNjliMTVmZWVkMTVjYmIzOGIyZWY1NzE1ZjBlM2ZlZGJiMWIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-23T20:56:53Zu	committer}(j*  Fabian Stäberj*  fabian@fstab.dej*  2023-07-27T11:25:02Zumessage[Allow dots in metric names and label names

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j{*  (97d9358ac605a4bb6145b6a4a63736d6651b6aeburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/97d9358ac605a4bb6145b6a4a63736d6651b6aebuj*  hhttps://api.github.com/repos/prometheus/client_java/git/commits/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj*  dhttps://api.github.com/repos/prometheus/client_java/commits/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bhtml_urlYhttps://github.com/prometheus/client_java/commit/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/commentsj*  }(loginfstabidJ' j}*  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j*  "https://api.github.com/users/fstabj*  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj*  }(j*  fstabj*  J' j}*  MDQ6VXNlcjMzMDUzNQ==j*  2https://avatars.githubusercontent.com/u/330535?v=4j*  h3j*  "https://api.github.com/users/fstabj*  https://github.com/fstabj*  ,https://api.github.com/users/fstab/followersj*  9https://api.github.com/users/fstab/following{/other_user}j*  2https://api.github.com/users/fstab/gists{/gist_id}j*  9https://api.github.com/users/fstab/starred{/owner}{/repo}j*  0https://api.github.com/users/fstab/subscriptionsj*  'https://api.github.com/users/fstab/orgsj*  (https://api.github.com/users/fstab/reposj*  3https://api.github.com/users/fstab/events{/privacy}j*  2https://api.github.com/users/fstab/received_eventsj*  Userj*  uparents]}(j{*  (fd373459616d18126824b68d09c428b3613dd097j*  dhttps://api.github.com/repos/prometheus/client_java/commits/fd373459616d18126824b68d09c428b3613dd097j*  Yhttps://github.com/prometheus/client_java/commit/fd373459616d18126824b68d09c428b3613dd097uastats}(totalM	additionsMH	deletionsM=ufiles](}(j{*  (a1046e2a2cdfe14bf863778640d998f79536d655filenameexamples/example-exemplars-tail-sampling/example-greeting-service/src/main/java/io/prometheus/metrics/examples/otel_exemplars/greeting/GreetingServlet.javastatusmodifiedj*  Kj*  KchangesKblob_urlX  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javaraw_urlX
  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bpatchX  @@ -27,7 +27,7 @@ public GreetingServlet() {
             .withUnit(Unit.SECONDS)
             .withLabelNames("http_status")
             .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j{*  (cabedbce594acc78d89aaf5e6792997d4550fed4j*  examples/example-exemplars-tail-sampling/example-hello-world-app/src/main/java/io/prometheus/metrics/examples/otel_exemplars/app/HelloWorldServlet.javaj*  modifiedj*  Kj*  Kj*  Kj*  X  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javaj*  X  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javaj*  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -34,7 +34,7 @@ public HelloWorldServlet() {
                 .withUnit(Unit.SECONDS)
                 .withLabelNames("http_status")
                 .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j{*  (7a95e36da299e8ce780ea5f0d2f2751765754afcj*  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj*  modifiedj*  Kj*  K j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj*  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -32,6 +32,11 @@ public class HelloWorldServlet extends HttpServlet {
             .withLabelNames("http_status")
             .register();
 
+    public HelloWorldServlet() {
+        counter.initLabelValues("200");
+        histogram.initLabelValues("200");
+    }
+
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
         long start = System.nanoTime();u}(j{*  (95660a463e944851a5d6c7c83caa98e475ec2b84j*  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -58,7 +58,7 @@ public MetricsProperties getDefaultMetricProperties() {
      * May return {@code null} if no metric-specific properties are configured for a metric name.
      */
     public MetricsProperties getMetricProperties(String metricName) {
-        return metricProperties.get(metricName);
+        return metricProperties.get(metricName.replace(".", "_"));
     }
 
     public ExemplarsProperties getExemplarProperties() {u}(j{*  (58ddc2669a05f79f8a9d19dbfb3374280a720f28j*  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XE  @@ -39,6 +39,8 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
     // This will remove entries from properties when they are processed.
     private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
         Map<String, MetricsProperties> result = new HashMap<>();
+        // Note that the metric name in the properties file must be as exposed in the Prometheus exposition formats,
+        // i.e. all dots replaced with underscores.
         Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
         // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
         // because entries are removed when MetricsConfig.load(...) is called.
@@ -49,7 +51,7 @@ private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Obj
         for (String propertyName : propertyNames) {
             Matcher matcher = pattern.matcher(propertyName);
             if (matcher.find()) {
-                String metricName = matcher.group(1);
+                String metricName = matcher.group(1).replace(".", "_");
                 if (!result.containsKey(metricName)) {
                     result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
                 }u}(j{*  (caf2cf8548342e5fb17046a95acbb18e13bf2315j*  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XC  @@ -9,13 +9,16 @@
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Counter metric.
  * <p>
@@ -109,8 +112,8 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
         return new CounterSnapshot(getMetadata(), data);
     }
 
-    static String normalizeName(String name) {
-        if (name != null && name.endsWith("_total")) {
+    static String stripTotalSuffix(String name) {
+        if (name != null && (name.endsWith("_total") || name.endsWith(".total"))) {
             name = name.substring(0, name.length() - 6);
         }
         return name;
@@ -231,12 +234,12 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(normalizeName(name));
+            return super.withName(stripTotalSuffix(name));
         }
 
         @Overrideu}(j{*  (b4d7bc7619b07a80158b44f817a2e3b28e1c7f79j*  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X.  @@ -80,12 +80,12 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(Counter.normalizeName(name));
+            return super.withName(Counter.stripTotalSuffix(name));
         }
 
         @Overrideu}(j{*  (5731e28435a190d82cd3ae1416fe81f7c301c29bj*  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj*  modifiedj*  Kj*  K
j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X|  @@ -2,16 +2,16 @@
 
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Label;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Info metric. Example:
  * <pre>{@code
@@ -90,15 +90,12 @@ private Builder(PrometheusProperties config) {
          * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            if (name != null && name.endsWith("_info")) {
-                name = name.substring(0, name.length() - 5);
-            }
-            return super.withName(name);
+            return super.withName(stripInfoSuffix(name));
         }
 
         /**
@@ -112,16 +109,16 @@ public Builder withUnit(Unit unit) {
             return this;
         }
 
-        private static String normalizeName(String name) {
-            if (name != null && name.endsWith("_info")) {
+        private static String stripInfoSuffix(String name) {
+            if (name != null && (name.endsWith("_info") || name.endsWith(".info"))) {
                 name = name.substring(0, name.length() - 5);
             }
             return name;
         }
 
         @Override
         public Info build() {
-            return new Info(withName(normalizeName(name)));
+            return new Info(this);
         }
 
         @Overrideu}(j{*  (6f963c299dad6c6c2b8a733d876725960d0f03bej*  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X@  @@ -3,11 +3,14 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.Arrays;
 import java.util.List;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
  * <p>
@@ -31,9 +34,8 @@ protected MetricMetadata getMetadata() {
 
     private String makeName(String name, Unit unit) {
         if (unit != null) {
-            String suffix = "_" + unit;
-            if (!name.endsWith(suffix)) {
-                name = name + suffix;
+            if (!name.endsWith(unit.toString())) {
+                name = name + "_" + unit;
             }
         }
         return name;
@@ -51,7 +53,7 @@ protected Builder(List<String> illegalLabelNames, PrometheusProperties propertie
         }
 
         public B withName(String name) {
-            if (!MetricMetadata.isValidMetricName(name)) {
+            if (!PrometheusNaming.isValidMetricName(name)) {
                 throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
             }
             this.name = name;
@@ -70,7 +72,7 @@ public B withHelp(String help) {
 
         public B withLabelNames(String... labelNames) {
             for (String labelName : labelNames) {
-                if (!Labels.isValidLabelName(labelName)) {
+                if (!PrometheusNaming.isValidLabelName(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name");
                 }
                 if (illegalLabelNames.contains(labelName)) {u}(j{*  (7348c04101650d22ceae1186a8822f60e29ac846j*  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
 
@@ -11,6 +12,8 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * StateSet metric. Example:
  * <pre>{@code
@@ -58,7 +61,7 @@ private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
-            if (this.getMetadata().getName().equals(name)) {
+            if (this.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                 throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
             }
         }u}(j{*  (17d8da246cccd484c9d26753c930dfd67f3221c6j*  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XB  @@ -62,6 +62,34 @@ public MetricSnapshot collect() {
         return collect(labels, metricData);
     }
 
+    /**
+     * Initialize label values.
+     * <p>
+     * Example: Imagine you have a counter for payments as follows
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 7.0
+     * payment_transactions_total{payment_type="paypal"} 3.0
+     * </pre>
+     * Now, the data points for the {@code payment_type} label values get initialized when they are
+     * first used, i.e. the first time you call
+     * <pre>{@code
+     * counter.withLabelValues("paypal").inc();
+     * }</pre>
+     * the data point with label {@code payment_type="paypal"} will go from non-existent to having value {@code 1.0}.
+     * <p>
+     * In some cases this is confusing, and you want to have data points initialized on application start
+     * with an initial value of {@code 0.0}:
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 0.0
+     * payment_transactions_total{payment_type="paypal"} 0.0
+     * </pre>
+     * {@code initLabelValues(...)} can be used to initialize label value, so that the data points
+     * show up in the exposition format with an initial value of zero.
+     */
+    public void initLabelValues(String... labelValues) {
+        withLabelValues(labelValues);
+    }
+
     public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
@@ -73,7 +101,6 @@ public D withLabelValues(String... labelValues) {
         return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
-    // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }u}(j{*  (a967a8d64a8b6693885910148cbdfb625550e06aj*  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  Xc  @@ -109,18 +109,18 @@ public void testLabels() {
 
     @Test
     public void testTotalStrippedFromName() {
-        Counter counter = Counter.newBuilder()
-                .withName("my_counter_total")
-                .withUnit(Unit.SECONDS)
-                .build();
-        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
-
-        counter = Counter.newBuilder()
-                .withName("my_counter")
-                .build();
-        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        for (String name : new String[]{
+                "my_counter_total", "my.counter.total",
+                "my_counter_seconds_total", "my.counter.seconds.total",
+                "my_counter", "my.counter",
+                "my_counter_seconds", "my.counter.seconds"}) {
+            Counter counter = Counter.newBuilder()
+                    .withName(name)
+                    .withUnit(Unit.SECONDS)
+                    .build();
+            Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+            assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        }
     }
 
     @Testu}(j{*  (2af392097245eeec40fd622cb75b8403c561dab3j*  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -1,19 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-import io.prometheus.metrics.tracer.common.SpanContext;
-import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -1043,19 +1043,9 @@ public void testIllegalLabelNamePrefix() {
                 .withLabelNames("__hello");
     }
 
-    @Test(expected = IllegalArgumentException.class)
-    public void testIllegalLabelNameDot() {
-        // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid.
-        // The reason is that you cannot use illegal label names in the Prometheus query language.
-        Histogram.newBuilder()
-                .withName("test")
-                .withLabelNames("http.status");
-    }
-
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalName() {
-        Histogram.newBuilder()
-                .withName("server.durations");
+        Histogram.newBuilder().withName("my_namespace/server.durations");
     }
 
     @Test(expected = IllegalArgumentException.class)u}(j{*  (5b1bbf991003f2e68f994ac87b8368d397691ce0j*  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj*  modifiedj*  Kj*  Kj*  K!j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -1,23 +1,28 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import org.junit.Assert;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+
 public class InfoTest {
 
     @Test
-    public void testIncrement() {
-        Info info = Info.newBuilder()
-                .withName("target_info")
-                .withLabelNames("key")
-                .build();
-        info.infoLabelValues("value");
-        InfoSnapshot snapshot = info.collect();
-        Assert.assertEquals("target", snapshot.getMetadata().getName());
-        Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
-        Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
+    public void testInfoStrippedFromName() {
+        for (String name : new String[]{
+                "jvm.runtime", "jvm_runtime",
+                "jvm.runtime.info", "jvm_runtime_info"}) {
+            for (String labelName : new String[]{"my.key", "my_key"}) {
+                Info info = Info.newBuilder()
+                        .withName(name)
+                        .withLabelNames(labelName)
+                        .build();
+                info.infoLabelValues("value");
+                Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
+                assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
+            }
+        }
     }
 }u'     }(j{*  (fa131335ef7fabb86de2a3b1ae5e5e3c3a9fc525j*  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XF"  @@ -29,6 +29,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
@@ -89,7 +90,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
         for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
             writeCreated(writer, metadata, data);
@@ -100,7 +101,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
                 writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -128,7 +129,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 Exemplar exemplar;
                 if (i == 0) {
@@ -176,7 +177,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
             // quantiles, all indexes modulo exemplars.length.
             int exemplarIndex = 1;
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
                     exemplarIndex = (exemplarIndex + 1) % exemplars.size();
@@ -195,7 +196,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
         }
@@ -206,21 +207,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "stateset", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -238,7 +239,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -251,7 +252,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
     private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
-            writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), countSuffix, data.getLabels());
             writeLong(writer, data.getCount());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -261,7 +262,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
             }
         }
         if (data.hasSum()) {
-            writeNameAndLabels(writer, metadata.getName(), sumSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), sumSuffix, data.getLabels());
             writeDouble(writer, data.getSum());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -273,7 +274,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
 
     private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
-            writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
             if (data.hasScrapeTimestamp()) {
                 writer.write(' ');
@@ -319,20 +320,20 @@ private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPoin
 
     private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(metadata.getPrometheusName());
         writer.write(' ');
         writer.write(typeName);
         writer.write('\n');
         if (metadata.getUnit() != null) {
             writer.write("# UNIT ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getUnit().toString());
             writer.write('\n');
         }
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getHelp());
             writer.write('\n');u}(j{*  (6f4eb6e6756990ee3101a7afbcd095ba63c911d3j*  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X	  @@ -24,6 +24,7 @@
 import java.io.OutputStream;
 
 import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus protobuf format as defined in
@@ -103,7 +104,7 @@ public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         } else if (snapshot instanceof StateSetSnapshot) {
             for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
-                    builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
+                    builder.addMetric(convert(data, snapshot.getMetadata().getPrometheusName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
@@ -121,9 +122,9 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
             return;
         }
         if (nameSuffix == null) {
-            builder.setName(metadata.getName());
+            builder.setName(metadata.getPrometheusName());
         } else {
-            builder.setName(metadata.getName() + nameSuffix);
+            builder.setName(metadata.getPrometheusName() + nameSuffix);
         }
         if (metadata.getHelp() != null) {
             builder.setHelp(metadata.getHelp());
@@ -335,7 +336,7 @@ private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot
     private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }
@@ -344,7 +345,7 @@ private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
     private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }u}(j{*  (bc187a88648e66fb17a2269fe11bcb0a9959a764j*  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javaj*  modifiedj*  Kj*  Kj*  K%j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X%  @@ -26,6 +26,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
@@ -102,7 +103,7 @@ public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) thr
                         writeMetadata(writer, "_created", "gauge", metadata);
                         metadataWritten = true;
                     }
-                    writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
                     writeTimestamp(writer, data.getCreatedTimestampMillis());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -115,7 +116,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
             for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-                writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -126,7 +127,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -140,18 +141,18 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (!snapshot.isGaugeHistogram()) {
                 if (data.hasCount()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                     writeLong(writer, data.getCount());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
                 if (data.hasSum()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                     writeDouble(writer, data.getSum());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -183,7 +184,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gcount", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gcount", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gcount", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -195,7 +196,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gsum", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gsum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gsum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -214,17 +215,17 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
                 metadataWritten = true;
             }
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasCount()) {
-                writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasSum()) {
-                writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -235,7 +236,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -246,21 +247,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "", "gauge", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -278,7 +279,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -303,7 +304,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
     private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             if (suffix != null) {
                 writer.write(suffix);
             }
@@ -312,7 +313,7 @@ private void writeMetadata(OutputStreamWriter writer, String suffix, String type
             writer.write('\n');
         }
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(metadata.getPrometheusName());
         if (suffix != null) {
             writer.write(suffix);
         }u}(j{*  (423fa6692c6c56240886d572fe3adb3373168ddaj*  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -6,6 +6,8 @@
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 public class TextFormatUtil {
 
     static void writeLong(OutputStreamWriter writer, long value) throws IOException {
@@ -61,7 +63,7 @@ static void writeLabels(OutputStreamWriter writer, Labels labels, String additio
             if (i > 0) {
                 writer.write(",");
             }
-            writer.write(labels.getName(i));
+            writer.write(labels.getPrometheusName(i));
             writer.write("=\"");
             writeEscapedLabelValue(writer, labels.getValue(i));
             writer.write("\"");u}(j{*  (7c9e714dfd905aa92e79a30c50ea424411a53bc5j*  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj*  modifiedj*  Mcj*  K j*  Mcj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XS  @@ -23,6 +23,7 @@
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -32,6 +33,7 @@ public class ExpositionFormatsTest {
 
     private final String exemplar1String = "{env=\"prod\",span_id=\"12345\",trace_id=\"abcde\"} 1.7 1672850685.829";
     private final String exemplar2String = "{env=\"dev\",span_id=\"23456\",trace_id=\"bcdef\"} 2.4 1672850685.830";
+    private final String exemplarWithDotsString = "{some_exemplar_key=\"some value\"} 3.0 1690298864.383";
 
     private final String exemplar1protoString = "exemplar { " +
             "label { name: \"env\" value: \"prod\" } " +
@@ -47,6 +49,11 @@ public class ExpositionFormatsTest {
             "value: 2.4 " +
             "timestamp { seconds: 1672850685 nanos: 830000000 } }";
 
+    private final String exemplarWithDotsProtoString = "exemplar { " +
+            "label { name: \"some_exemplar_key\" value: \"some value\" } " +
+            "value: 3.0 " +
+            "timestamp { seconds: 1690298864 nanos: 383000000 } }";
+
     private final String createdTimestamp1s = "1672850385.800";
     private final long createdTimestamp1 = (long) (1000 * Double.parseDouble(createdTimestamp1s));
     private final String createdTimestamp2s = "1672850285.000";
@@ -72,6 +79,12 @@ public class ExpositionFormatsTest {
             .withTimestampMillis(1672850685830L)
             .build();
 
+    private final Exemplar exemplarWithDots = Exemplar.newBuilder()
+            .withLabels(Labels.of("some.exemplar.key", "some value"))
+            .withValue(3.0)
+            .withTimestampMillis(1690298864383L)
+            .build();
+
     @Test
     public void testCounterComplete() throws IOException {
         String openMetricsText = "" +
@@ -183,6 +196,42 @@ public void testCounterMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, counter);
     }
 
+    @Test
+    public void testCounterWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_count counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE my_request_count_total counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_count_total\" " +
+                "type: COUNTER " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "counter { " +
+                        "value: 3.0 " + exemplarWithDotsProtoString + " " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my.request.count")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(3.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
     @Test
     public void testGaugeComplete() throws IOException {
         String openMetricsText = "" +
@@ -264,6 +313,48 @@ public void testGaugeMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gauge);
     }
 
+    @Test
+    public void testGaugeWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "# UNIT my_temperature_celsius celsius\n" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_temperature_celsius\" " +
+                "help: \"Temperature\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"location_id\" value: \"data-center-1\" } " +
+                    "gauge { " +
+                        "value: 23.0 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("my.temperature.celsius")
+                .withHelp("Temperature")
+                .withUnit(Unit.CELSIUS)
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(23.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("location.id", "data-center-1")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
     @Test
     public void testSummaryComplete() throws IOException {
         String openMetricsText = "" +
@@ -596,6 +687,49 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, summary);
     }
 
+    @Test
+    public void testSummaryWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "summary { sample_count: 1 sample_sum: 0.03 } " +
+                "}";
+                //@formatter:on
+
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(1)
+                        .withSum(0.03)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
     @Test
     public void testClassicHistogramComplete() throws Exception {
         String openMetricsText = "" +
@@ -1047,6 +1181,57 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
     }
 
+    @Test
+    public void testClassicHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "sample_sum: 0.01 " +
+                        "bucket { cumulative_count: 130 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(0.01)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
     @Test
     public void testNativeHistogramComplete() throws IOException {
         String openMetricsText = "" +
@@ -1244,6 +1429,64 @@ public void testNativeHistogramMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
     }
 
+    @Test
+    public void testNativeHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 4 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 1 " +
+                        "positive_span { offset: 2 length: 1 } " +
+                        "positive_delta: 3 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withSum(3.2)
+                        .withNativeSchema(5)
+                        .withNativeZeroCount(1)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(2, 3)
+                                .build()
+                        )
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
     // TODO: Gauge Native Histogram
 
     @Test
@@ -1270,6 +1513,39 @@ public void testInfo() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, info);
     }
 
+    @Test
+    public void testInfoWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE jvm_status info\n" +
+                "# HELP jvm_status JVM status info\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP jvm_status_info JVM status info\n" +
+                "# TYPE jvm_status_info gauge\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"jvm_status_info\" " +
+                "help: \"JVM status info\" " +
+                "type: GAUGE " +
+                "metric { " + "" +
+                    "label { name: \"jvm_version\" value: \"1.2.3\" } " +
+                    "gauge { value: 1.0 } " +
+                "}";
+                //@formatter:on
+        InfoSnapshot info = InfoSnapshot.newBuilder()
+                .withName("jvm.status")
+                .withHelp("JVM status info")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("jvm.version", "1.2.3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, info);
+        assertPrometheusText(prometheusText, info);
+        assertPrometheusProtobuf(prometheusProtobuf, info);
+    }
+
     @Test
     public void testStateSetComplete() throws IOException {
         String openMetrics = "" +
@@ -1333,6 +1609,48 @@ public void testStateSetMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, stateSet);
     }
 
+    @Test
+    public void testStateSetWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_application_state stateset\n" +
+                "# HELP my_application_state My application state\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_application_state My application state\n" +
+                "# TYPE my_application_state gauge\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_application_state\" " +
+                "help: \"My application state\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"feature.enabled\" } " +
+                    "gauge { value: 1.0 } " +
+                "} metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"is.alpha.version\" } " +
+                    "gauge { value: 0.0 } " +
+                "}";
+                //@formatter:on
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("my.application.state")
+                .withHelp("My application state")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("data.center", "us east"))
+                        .addState("feature.enabled", true)
+                        .addState("is.alpha.version", false)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, stateSet);
+        assertPrometheusText(prometheusText, stateSet);
+        assertPrometheusProtobuf(prometheusProtobuf, stateSet);
+    }
+
     @Test
     public void testUnknownComplete() throws IOException {
         String openMetrics = "" +
@@ -1391,6 +1709,43 @@ public void testUnknownMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, unknown);
     }
 
+    @Test
+    public void testUnknownWithDots() throws IOException {
+        String openMetrics = "" +
+                "# TYPE some_unknown_metric unknown\n" +
+                "# UNIT some_unknown_metric bytes\n" +
+                "# HELP some_unknown_metric help message\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP some_unknown_metric help message\n" +
+                "# TYPE some_unknown_metric untyped\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"some_unknown_metric\" " +
+                "help: \"help message\" " +
+                "type: UNTYPED " +
+                "metric { " +
+                    "label { name: \"test_env\" value: \"7\" } " +
+                    "untyped { value: 0.7 } " +
+                "}";
+                //@formatter:on
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("some.unknown.metric")
+                .withHelp("help message")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.of("test.env", "7"))
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertPrometheusProtobuf(prometheusProtobuf, unknown);
+    }
+
     @Test
     public void testHelpEscape() throws IOException {
         String openMetrics = "" +u}(j{*  (349ebda602c544d46c02baee1d84ddc4694cc561j*  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj*  modifiedj*  Kj*  Kj*  K
j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.registry;
 
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 
-import java.util.List;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * To be registered with the Prometheus collector registry.
  * See <i>Overall Structure</i> on
@@ -26,7 +26,7 @@ public interface Collector {
      */
     default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (includedNames.test(result.getMetadata().getName())) {
+        if (includedNames.test(result.getMetadata().getPrometheusName())) {
             return result;
         } else {
             return null;
@@ -36,7 +36,7 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     /**
      * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
      */
-    default String getName() {
-        return collect().getMetadata().getName();
+    default String getPrometheusName() {
+        return collect().getMetadata().getPrometheusName();
     }
 }u}(j{*  (8e5aff15f740e5e75a7a2e6119704cede91b5f5fj*  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XN  @@ -7,6 +7,8 @@
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Like {@link Collector}, but collecting multiple Snapshots at once.
  */
@@ -27,7 +29,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
         MetricSnapshots allSnapshots = collect();
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (MetricSnapshot snapshot : allSnapshots) {
-            if (includedNames.test(snapshot.getMetadata().getName())) {
+            if (includedNames.test(snapshot.getMetadata().getPrometheusName())) {
                 result.addMetricSnapshot(snapshot);
             }
         }
@@ -38,7 +40,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
      * Override this and return an empty list if the MultiCollector does not return a constant list of names
      * (names may be added / removed between scrapes).
      */
-    default List<String> getNames() {
-        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    default List<String> getPrometheusNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getPrometheusName()).collect(Collectors.toList());
     }
 }u}(j{*  (373d32a89dc675a3b0fdb08c511c5b30b31bf9f6j*  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj*  modifiedj*  Kj*  Kj*  K-j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -9,50 +9,63 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 public class PrometheusRegistry {
 
     public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
 
-    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final Set<String> prometheusNames = ConcurrentHashMap.newKeySet();
     private final List<Collector> collectors = new CopyOnWriteArrayList<>();
     private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
 
     public void register(Collector collector) {
-        String name = collector.getName();
-        if (!names.add(name)) {
-            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        String prometheusName = collector.getPrometheusName();
+        if (prometheusName != null) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because a metric with that name is already registered.");
+            }
         }
         collectors.add(collector);
     }
 
     public void register(MultiCollector collector) {
-        for (String name : collector.getNames()) {
-            if (!names.add(name)) {
-                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        for (String prometheusName : collector.getPrometheusNames()) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because that name is already registered.");
             }
         }
         multiCollectors.add(collector);
     }
 
     public void unregister(Collector collector) {
         collectors.remove(collector);
-        names.remove(collector.getName());
+        prometheusNames.remove(collector.getPrometheusName());
     }
 
     public void unregister(MultiCollector collector) {
         multiCollectors.remove(collector);
-        for (String name : collector.getNames()) {
-            names.remove(name);
+        for (String prometheusName : collector.getPrometheusNames()) {
+            prometheusNames.remove(prometheusName(prometheusName));
         }
     }
 
     public MetricSnapshots scrape() {
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            result.addMetricSnapshot(collector.collect());
+            MetricSnapshot snapshot = collector.collect();
+            if (snapshot != null) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
+                }
+                result.addMetricSnapshot(snapshot);
+            }
         }
         for (MultiCollector collector : multiCollectors) {
             for (MetricSnapshot snapshot : collector.collect()) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
+                }
                 result.addMetricSnapshot(snapshot);
             }
         }
@@ -65,19 +78,19 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            String name = collector.getName();
-            if (name == null || includedNames.test(name)) {
+            String prometheusName = collector.getPrometheusName();
+            if (prometheusName == null || includedNames.test(prometheusName)) {
                 MetricSnapshot snapshot = collector.collect(includedNames);
                 if (snapshot != null) {
                     result.addMetricSnapshot(snapshot);
                 }
             }
         }
         for (MultiCollector collector : multiCollectors) {
-            List<String> names = collector.getNames();
+            List<String> prometheusNames = collector.getPrometheusNames();
             boolean excluded = true; // the multi-collector is excluded unless at least one name matches
-            for (String name : names) {
-                if (includedNames.test(name)) {
+            for (String prometheusName : prometheusNames) {
+                if (includedNames.test(prometheusName)) {
                     excluded = false;
                     break;
                 }u}(j{*  (dac311004cf67ab2b1fa6f177c1b019244c138a6j*  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javaj*  modifiedj*  K j*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -20,9 +20,6 @@ public final class InfoSnapshot extends MetricSnapshot {
      */
     public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
-        if (metadata.getName().endsWith("_info")) {
-            throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
-        }
         if (metadata.hasUnit()) {
             throw new IllegalArgumentException("An Info metric cannot have a unit.");
         }u}(j{*  (60b1b58be1cab789e16cfeaeba13d7d505fce545j*  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javaj*  modifiedj*  Kxj*  K:j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X>  @@ -5,23 +5,37 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.regex.Pattern;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.isValidLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Immutable set of name/value pairs, sorted by name.
  */
 public class Labels implements Comparable<Labels>, Iterable<Label> {
 
-    public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
-    private static final Pattern LABEL_NAME_RE = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
+    public static final Labels EMPTY;
+
+    static {
+        String[] names = new String[]{};
+        String[] values = new String[]{};
+        EMPTY = new Labels(names, names, values);
+    }
 
-    private final String[] names; // sorted
+    // prometheusNames is the same as names, but dots are replaced with underscores.
+    // Labels is sorted by prometheusNames.
+    // If names[i] does not contain a dot, prometheusNames[i] references the same String as names[i]
+    // so that we don't have unnecessary duplicates of strings.
+    // If none of the names contains a dot, then prometheusNames references the same array as names
+    // so that we don't have unnecessary duplicate arrays.
+    private final String[] prometheusNames;
+    private final String[] names;
     private final String[] values;
 
-    private Labels(String[] names, String[] values) {
-        // names and values are already sorted and validated
+    private Labels(String[] names, String[] prometheusNames, String[] values) {
         this.names = names;
+        this.prometheusNames = prometheusNames;
         this.values = values;
     }
 
@@ -35,9 +49,9 @@ public boolean isEmpty() {
      * or you can use the {@link Labels#newBuilder()}.
      *
      * @param keyValuePairs as in {@code {name1, value1, name2, value2}}. Length must be even.
-     *                      {@link #isValidLabelName(String)} must be true for each name.
-     *                      Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid
-     *                      label names. Label names must be unique (no duplicate label names).
+     *                      {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *                      Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *                      to valid label names. Label names must be unique (no duplicate label names).
      */
     public static Labels of(String... keyValuePairs) {
         if (keyValuePairs.length % 2 != 0) {
@@ -52,18 +66,34 @@ public static Labels of(String... keyValuePairs) {
             names[i] = keyValuePairs[2 * i];
             values[i] = keyValuePairs[2 * i + 1];
         }
-        return Labels.of(names, values);
+        String[] prometheusNames = makePrometheusNames(names);
+        sortAndValidate(names, prometheusNames, values);
+        return new Labels(names, prometheusNames, values);
+    }
+
+    // package private for testing
+    static String[] makePrometheusNames(String[] names) {
+        String[] prometheusNames = names;
+        for (int i=0; i<names.length; i++) {
+            if (names[i].contains(".")) {
+                if (prometheusNames == names) {
+                    prometheusNames = Arrays.copyOf(names, names.length);
+                }
+                prometheusNames[i] = PrometheusNaming.prometheusName(names[i]);
+            }
+        }
+        return prometheusNames;
     }
 
     /**
      * Create a new Labels instance.
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.size() must be equal to values.size().
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.size()} must be equal to {@code values.size()}.
      */
     public static Labels of(List<String> names, List<String> values) {
         if (names.size() != values.size()) {
@@ -74,19 +104,20 @@ public static Labels of(List<String> names, List<String> values) {
         }
         String[] namesCopy = names.toArray(new String[0]);
         String[] valuesCopy = values.toArray(new String[0]);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
      * Create a new Labels instance.
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.length must be equal to values.length.
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.length} must be equal to {@code values.length}.
      */
     public static Labels of(String[] names, String[] values) {
         if (names.length != values.length) {
@@ -97,72 +128,67 @@ public static Labels of(String[] names, String[] values) {
         }
         String[] namesCopy = Arrays.copyOf(names, names.length);
         String[] valuesCopy = Arrays.copyOf(values, values.length);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
      * Test if these labels contain a specific label name.
+     * <p>
+     * Dots are treated as underscores, so {@code contains("my.label")} and {@code contains("my_label")} are the same.
      */
     public boolean contains(String labelName) {
-        for (String name : names) {
+        labelName = prometheusName(labelName);
+        for (String name : prometheusNames) {
             if (name.equals(labelName)) {
                 return true;
             }
         }
         return false;
     }
 
-    private static void sortAndValidate(String[] names, String[] values) {
-        sort(names, values);
-        validateNames(names);
+    private static void sortAndValidate(String[] names, String[] prometheusNames, String[] values) {
+        sort(names, prometheusNames, values);
+        validateNames(names, prometheusNames);
     }
 
-    private static void validateNames(String[] names) {
+    private static void validateNames(String[] names, String[] prometheusNames) {
         for (int i = 0; i < names.length; i++) {
             if (!isValidLabelName(names[i])) {
                 throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
             }
-            if (i > 0 && names[i - 1].equals(names[i])) {
+            // The arrays are sorted, so duplicates are next to each other
+            if (i > 0 && prometheusNames[i - 1].equals(prometheusNames[i])) {
                 throw new IllegalArgumentException(names[i] + ": duplicate label name");
             }
         }
     }
 
-    private static void sort(String[] names, String[] values) {
-        // bubblesort :)
-        int n = names.length;
+    private static void sort(String[] names, String[] prometheusNames, String[] values) {
+        // bubblesort
+        int n = prometheusNames.length;
         for (int i = 0; i < n - 1; i++) {
             for (int j = 0; j < n - i - 1; j++) {
-                if (names[j].compareTo(names[j + 1]) > 0) {
-                    swap(j, j + 1, names, values);
+                if (prometheusNames[j].compareTo(prometheusNames[j + 1]) > 0) {
+                    swap(j, j + 1, names, prometheusNames, values);
                 }
             }
         }
     }
 
-    private static void swap(int i, int j, String[] names, String[] values) {
+    private static void swap(int i, int j, String[] names, String[] prometheusNames, String[] values) {
         String tmp = names[j];
         names[j] = names[i];
         names[i] = tmp;
         tmp = values[j];
         values[j] = values[i];
         values[i] = tmp;
-    }
-
-    public static boolean isValidLabelName(String name) {
-        return LABEL_NAME_RE.matcher(name).matches() && !name.startsWith("__");
-    }
-
-    /**
-     * Convert arbitrary label names to valid Prometheus label names.
-     */
-    public static String sanitizeLabelName(String labelName) {
-        String result = MetricMetadata.sanitizeMetricName(labelName);
-        while (result.startsWith("__")) {
-            result = result.substring(1);
+        if (prometheusNames != names) {
+            tmp = prometheusNames[j];
+            prometheusNames[j] = prometheusNames[i];
+            prometheusNames[i] = tmp;
         }
-        return result;
     }
 
     @Override
@@ -182,6 +208,15 @@ public String getName(int i) {
         return names[i];
     }
 
+    /**
+     * Like {@link #getName(int)}, but dots are replaced with underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName(int i) {
+        return prometheusNames[i];
+    }
+
     public String getValue(int i) {
         return values[i];
     }
@@ -191,32 +226,54 @@ public String getValue(int i) {
      * This and other must not contain the same label name.
      */
     public Labels merge(Labels other) {
+        if (this.isEmpty()) {
+            return other;
+        }
+        if (other.isEmpty()) {
+            return this;
+        }
         String[] names = new String[this.names.length + other.names.length];
+        String[] prometheusNames = names;
+        if (this.names != this.prometheusNames || other.names != other.prometheusNames) {
+            prometheusNames = new String[names.length];
+        }
         String[] values = new String[names.length];
         int thisPos = 0;
         int otherPos = 0;
         while (thisPos + otherPos < names.length) {
             if (thisPos >= this.names.length) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else if (otherPos >= other.names.length) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) < 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) < 0) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) > 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) > 0) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else {
                 throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
             }
         }
-        return new Labels(names, values);
+        return new Labels(names, prometheusNames, values);
     }
 
     /**
@@ -241,12 +298,13 @@ public Labels merge(String[] names, String[] values) {
         System.arraycopy(this.values, 0, mergedValues, 0, this.values.length);
         System.arraycopy(names, 0, mergedNames, this.names.length, names.length);
         System.arraycopy(values, 0, mergedValues, this.values.length, values.length);
-        sortAndValidate(mergedNames, mergedValues);
-        return new Labels(mergedNames, mergedValues);
+        String[] prometheusNames = makePrometheusNames(mergedNames);
+        sortAndValidate(mergedNames, prometheusNames, mergedValues);
+        return new Labels(mergedNames, prometheusNames, mergedValues);
     }
 
     public boolean hasSameNames(Labels other) {
-        return Arrays.equals(names, other.names);
+        return Arrays.equals(prometheusNames, other.prometheusNames);
     }
 
     public boolean hasSameValues(Labels other) {
@@ -255,7 +313,7 @@ public boolean hasSameValues(Labels other) {
 
     @Override
     public int compareTo(Labels other) {
-        int result = compare(names, other.names);
+        int result = compare(prometheusNames, other.prometheusNames);
         if (result != 0) {
             return result;
         }
@@ -288,6 +346,11 @@ private List<Label> asList() {
         return Collections.unmodifiableList(result);
     }
 
+    /**
+     * This must not be used in Prometheus exposition formats because names may contain dots.
+     * <p>
+     * However, for debugging it's better to show the original names rather than the Prometheus names.
+     */
     @Override
     public String toString() {
         StringBuilder b = new StringBuilder();
@@ -324,18 +387,17 @@ private void appendEscapedLabelValue(StringBuilder b, String value) {
         }
     }
 
-    // as labels are sorted by name, equals is insensitive to the order
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         Labels labels = (Labels) o;
-        return Arrays.equals(names, labels.names) && Arrays.equals(values, labels.values);
+        return labels.hasSameNames(this) && labels.hasSameValues(this);
     }
 
     @Override
     public int hashCode() {
-        int result = Arrays.hashCode(names);
+        int result = Arrays.hashCode(prometheusNames);
         result = 31 * result + Arrays.hashCode(values);
         return result;
     }uI      }(j{*  (366805ddf9954e2b90078d43f8fdcadf4c88df76j*  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javaj*  modifiedj*  K*j*  Kej*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XT!  @@ -1,28 +1,37 @@
 package io.prometheus.metrics.model.snapshots;
 
-import java.util.regex.Pattern;
-
 /**
  * Immutable container for metric metadata: name, help, unit.
  */
 public final class MetricMetadata {
-    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
-    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
-    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
-    // * Micrometer: jvm_buffer_count
-    // * OpenTelemetry: process_runtime_jvm_buffer_count
-    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
-    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
-    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
 
     /**
-     * Name is the name without suffix.
+     * Name without suffix.
+     * <p>
      * For example, the name for a counter "http_requests_total" is "http_requests".
-     * The name of an info called "target_info" is "target".
+     * The name of an info called "jvm_info" is "jvm".
+     * <p>
+     * We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
+     * exposition formats. However, if metrics from this library are exposed in OpenTelemetry
+     * format dots are retained.
+     * <p>
      * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
      */
     private final String name;
+
+    /**
+     * Same as name, except if name contains dots, then the prometheusName is {@code name.replace(".", "_")}.
+     */
+    private final String prometheusName;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final String help;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final Unit unit;
 
     /**
@@ -40,28 +49,10 @@ public MetricMetadata(String name, String help) {
     }
 
     /**
-     * Naming conventions:
-     * <ul>
-     *     <li>The name MUST NOT include the {@code _total} suffix for counter metrics or the
-     *         {@code _info} suffix for info metrics.
-     *         If in doubt, use {@link #sanitizeMetricName(String)} to remove the suffix.</li>
-     *     <li>If name is {@code null}, a {@link NullPointerException} is thrown.</li>
-     *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
-     *         an {@link IllegalArgumentException} is thrown.
-     *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
-     *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
-     *         <pre>
-     *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
-     *         </pre>
-     *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
-     *     <li>The name MUST NOT contain the {@code _total} or {@code _created} suffixes for counters,
-     *         the {@code _count}, {@code _sum}, or {@code _created} suffixes for summaries,
-     *         the {@code _count}, {@code _sum}, {@code _bucket}, or {@code _created} suffixes for classic histograms,
-     *         the {@code _gcount}, {@code _gsum}, {@code _bucket} suffixes for classic gauge histograms,
-     *         or the {@code _info} suffix for info metrics.</li>
-     * </ul>
-     *
-     * @param name must follow the naming conventions described above.
+     * Constructor.
+     * @param name must not be {@code null}. {@link PrometheusNaming#isValidMetricName(String) isValidMetricName(name)}
+     *             must be {@code true}. Use {@link PrometheusNaming#sanitizeMetricName(String)} to convert arbitrary
+     *             strings into valid names.
      * @param help optional. May be {@code null}.
      * @param unit optional. May be {@code null}.
      */
@@ -70,16 +61,29 @@ public MetricMetadata(String name, String help, Unit unit) {
         this.help = help;
         this.unit = unit;
         validate();
+        this.prometheusName = name.contains(".") ? PrometheusNaming.prometheusName(name) : name;
     }
 
     /**
      * The name does not include the {@code _total} suffix for counter metrics
      * or the {@code _info} suffix for Info metrics.
+     * <p>
+     * The name may contain dots. Use {@link #getPrometheusName()} to get the name in Prometheus format,
+     * i.e. with dots replaced by underscores.
      */
     public String getName() {
         return name;
     }
 
+    /**
+     * Same as {@link #getName()} but with dots replaced by underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName() {
+        return prometheusName;
+    }
+
     public String getHelp() {
         return help;
     }
@@ -96,73 +100,10 @@ private void validate() {
         if (name == null) {
             throw new IllegalArgumentException("Missing required field: name is null");
         }
-        if (!isValidMetricName(name)) {
-            throw new IllegalArgumentException("'" + name + "': illegal metric name");
-        }
-    }
-
-    /**
-     * Test if a metric name is valid. Rules:
-     * <ul>
-     * <li>The name must match {@link #METRIC_NAME_RE}.</li>
-     * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
-     * </ul>
-     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
-     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but this library does not enforce Unit
-     * suffixes).
-     * <p>
-     * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
-     * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
-     * values: {@code processing_time_seconds_total} for the counter value, and the optional
-     * {@code processing_time_seconds_created} timestamp.
-     * <p>
-     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
-     */
-    public static boolean isValidMetricName(String name) {
-        for (String reservedSuffix : RESERVED_SUFFIXES) {
-            if (name.endsWith(reservedSuffix)) {
-                return false;
-            }
-        }
-        return METRIC_NAME_RE.matcher(name).matches();
-    }
-
-    /**
-     * Convert arbitrary metric names to valid Prometheus metric names.
-     */
-    public static String sanitizeMetricName(String metricName) {
-        if (metricName.isEmpty()) {
-            throw new IllegalArgumentException("Cannot convert an empty string into a valid metric name.");
-        }
-        int length = metricName.length();
-        char[] sanitized = new char[length];
-        for (int i = 0; i < length; i++) {
-            char ch = metricName.charAt(i);
-            if (ch == ':' ||
-                    (ch >= 'a' && ch <= 'z') ||
-                    (ch >= 'A' && ch <= 'Z') ||
-                    (i > 0 && ch >= '0' && ch <= '9')) {
-                sanitized[i] = ch;
-            } else {
-                sanitized[i] = '_';
-            }
-        }
-        String sanitizedString = new String(sanitized);
-        boolean modified = true;
-        while (modified) {
-            modified = false;
-            for (String reservedSuffix : RESERVED_SUFFIXES) {
-                if (sanitizedString.equals(reservedSuffix)) {
-                    // This is for the corner case when you call sanitizeMetricName("_total").
-                    // In that case the result will be "total".
-                    return reservedSuffix.substring(1);
-                }
-                if (sanitizedString.endsWith(reservedSuffix)) {
-                    sanitizedString = sanitizedString.substring(0, sanitizedString.length() - reservedSuffix.length());
-                    modified = true;
-                }
-            }
+        String error = PrometheusNaming.validateMetricName(name);
+        if (error != null) {
+            throw new IllegalArgumentException("'" + name + "': Illegal metric name. " + error
+                    + " Call " + PrometheusNaming.class.getSimpleName() + ".sanitizeMetricName(name) to avoid this error.");
         }
-        return sanitizedString;
     }
 }u}(j{*  (7faaa63998c19f3127cb26208547237fdd5548bfj*  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javaj*  modifiedj*  Kj*  Kj*  K	j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -20,10 +20,13 @@ protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
     }
 
     protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
-        this.metadata = metadata;
+        if (metadata == null) {
+            throw new NullPointerException("metadata");
+        }
         if (data == null) {
-            throw new NullPointerException();
+            throw new NullPointerException("data");
         }
+        this.metadata = metadata;
         List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
         dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);
@@ -56,7 +59,7 @@ public static abstract class Builder<T extends Builder<T>> {
         /**
          * The name is required.
          * If the name is missing or invalid, {@code build()} will throw an {@link IllegalArgumentException}.
-         * See {@link MetricMetadata#isValidMetricName(String)} for info on valid metric names.
+         * See {@link PrometheusNaming#isValidMetricName(String)} for info on valid metric names.
          */
         public T withName(String name) {
             this.name = name;u}(j{*  (5308e6f9822dbf2060d3bc890378147102554514j*  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javaj*  modifiedj*  Kj*  Kj*  K	j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XM  @@ -7,6 +7,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 import static java.util.Collections.unmodifiableList;
 import static java.util.Comparator.comparing;
 
@@ -36,10 +37,10 @@ public MetricSnapshots(MetricSnapshot... snapshots) {
      */
     public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
         List<MetricSnapshot> list = new ArrayList<>(snapshots);
-        list.sort(comparing(s -> s.getMetadata().getName()));
+        list.sort(comparing(s -> s.getMetadata().getPrometheusName()));
         for (int i = 0; i < snapshots.size() - 1; i++) {
-            if (list.get(i).getMetadata().getName().equals(list.get(i + 1).getMetadata().getName())) {
-                throw new IllegalArgumentException(list.get(i).getMetadata().getName() + ": duplicate metric name");
+            if (list.get(i).getMetadata().getPrometheusName().equals(list.get(i + 1).getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException(list.get(i).getMetadata().getPrometheusName() + ": duplicate metric name");
             }
         }
         this.snapshots = unmodifiableList(list);
@@ -79,7 +80,7 @@ private Builder() {
 
         public boolean containsMetricName(String name) {
             for (MetricSnapshot snapshot : snapshots) {
-                if (snapshot.getMetadata().getName().equals(name)) {
+                if (snapshot.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                     return true;
                 }
             }u}(j{*  (58de0c814385d31a732df26926a3fe56d2377a9ej*  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/PrometheusNaming.javaj*  addedj*  Kj*  K j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  XU  @@ -0,0 +1,178 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.regex.Pattern;
+
+/**
+ * Utility for Prometheus Metric and Label naming.
+ * <p>
+ * Note that this library allows dots in metric and label names. Dots will automatically be replaced with underscores
+ * in Prometheus exposition formats. However, if metrics are exposed in OpenTelemetry format the dots are retained.
+ */
+public class PrometheusNaming {
+
+    /**
+     * Legal characters for metric names, including dot.
+     */
+    private static final Pattern METRIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
+
+    /**
+     * Legal characters for label names, including dot.
+     */
+    private static final Pattern LABEL_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.][a-zA-Z0-9_.]*$");
+
+    /**
+     * According to OpenMetrics {@code _count} and {@code _sum} (and {@code _gcount}, {@code _gsum}) should also be
+     * reserved metric name suffixes. However, popular instrumentation libraries have Gauges with names
+     * ending in {@code _count}.
+     * Examples:
+     * <ul>
+     * <li>Micrometer: {@code jvm_buffer_count}</li>
+     * <li>OpenTelemetry: {@code process_runtime_jvm_buffer_count}</li>
+     * </ul>
+     * We do not treat {@code _count} and {@code _sum} as reserved suffixes here for compatibility with these libraries.
+     * However, there is a risk of name conflict if someone creates a gauge named {@code my_data_count} and a
+     * histogram or summary named {@code my_data}, because the histogram or summary will implicitly have a sample
+     * named {@code my_data_count}.
+     */
+    private static final String[] RESERVED_METRIC_NAME_SUFFIXES = {
+            "_total", "_created", "_bucket", "_info",
+            ".total", ".created", ".bucket", ".info"
+    };
+
+    /**
+     * Test if a metric name is valid. Rules:
+     * <ul>
+     * <li>The name must match {@link #METRIC_NAME_PATTERN}.</li>
+     * <li>The name MUST NOT end with one of the {@link #RESERVED_METRIC_NAME_SUFFIXES}.</li>
+     * </ul>
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix.
+     * Note that <a href="https://openmetrics.io/">OpenMetrics</a> requires metric names to have their unit as suffix,
+     * and we implement this in {@code prometheus-metrics-core}. However, {@code prometheus-metrics-model}
+     * does not enforce Unit suffixes.
+     * <p>
+     * Example: If you create a Counter for a processing time with Unit {@link Unit#SECONDS SECONDS},
+     * the name should be {@code processing_time_seconds}. When exposed in OpenMetrics Text format,
+     * this will be represented as two values: {@code processing_time_seconds_total} for the counter value,
+     * and the optional {@code processing_time_seconds_created} timestamp.
+     * <p>
+     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
+     */
+    public static boolean isValidMetricName(String name) {
+        return validateMetricName(name) == null;
+    }
+
+    /**
+     * Same as {@link #isValidMetricName(String)}, but produces an error message.
+     * <p>
+     * The name is valid if the error message is {@code null}.
+     */
+    static String validateMetricName(String name) {
+        for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+            if (name.endsWith(reservedSuffix)) {
+                return "The metric name must not include the '" + reservedSuffix + "' suffix.";
+            }
+        }
+        if (!METRIC_NAME_PATTERN.matcher(name).matches()) {
+            return "The metric name contains unsupported characters";
+        }
+        return null;
+    }
+
+    public static boolean isValidLabelName(String name) {
+        return LABEL_NAME_PATTERN.matcher(name).matches() &&
+                !(name.startsWith("__") || name.startsWith("._") || name.startsWith("..") || name.startsWith("_."));
+    }
+
+    /**
+     * Get the metric or label name that is used in Prometheus exposition format.
+     *
+     * @param name must be a valid metric or label name,
+     *             i.e. {@link #isValidMetricName(String) isValidMetricName(name)}
+     *             or {@link #isValidLabelName(String) isValidLabelName(name)}  must be true.
+     * @return the name with dots replaced by underscores.
+     */
+    public static String prometheusName(String name) {
+        return name.replace(".", "_");
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidMetricName(String) isValidMetricName(name)} is true.
+     */
+    public static String sanitizeMetricName(String metricName) {
+        if (metricName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid metric name.");
+        }
+        String sanitizedName = replaceIllegalCharsInMetricName(metricName);
+        boolean modified = true;
+        while (modified) {
+            modified = false;
+            for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+                if (sanitizedName.equals(reservedSuffix)) {
+                    // This is for the corner case when you call sanitizeMetricName("_total").
+                    // In that case the result will be "total".
+                    return reservedSuffix.substring(1);
+                }
+                if (sanitizedName.endsWith(reservedSuffix)) {
+                    sanitizedName = sanitizedName.substring(0, sanitizedName.length() - reservedSuffix.length());
+                    modified = true;
+                }
+            }
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidLabelName(String) isValidLabelName(name)} is true.
+     */
+    public static String sanitizeLabelName(String labelName) {
+        if (labelName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid label name.");
+        }
+        String sanitizedName = replaceIllegalCharsInLabelName(labelName);
+        while (sanitizedName.startsWith("__") || sanitizedName.startsWith("_.") || sanitizedName.startsWith("._") || sanitizedName.startsWith("..")) {
+            sanitizedName = sanitizedName.substring(1);
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Returns a string that matches {@link #METRIC_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInMetricName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == ':' ||
+                    ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+
+    /**
+     * Returns a string that matches {@link #LABEL_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInLabelName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+}u}(j{*  (9b0c4f07d7f0601545a394b4f9082ec3194aeeebj*  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javaj*  modifiedj*  Kj*  Kj*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  Xt  @@ -30,8 +30,8 @@ private void validate() {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
         for (StateSetDataPointSnapshot entry : getData()) {
-            if (entry.getLabels().contains(getMetadata().getName())) {
-                throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
+            if (entry.getLabels().contains(getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException("Label name " + getMetadata().getPrometheusName() + " is reserved.");
             }
         }
     }u}(j{*  (8519f5f277ee317712db90c768f587c3091c09d6j*  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/PrometheusRegistryTest.javaj*  addedj*  KRj*  K j*  KRj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PrometheusRegistryTest {
+
+    Collector noName = new Collector() {
+        @Override
+        public MetricSnapshot collect() {
+            return GaugeSnapshot.newBuilder()
+                    .withName("no_name_gauge")
+                    .build();
+        }
+
+        @Override
+        public String getPrometheusName() {
+            return null;
+        }
+    };
+
+    Collector counterA1 = () -> CounterSnapshot.newBuilder()
+            .withName("counter_a")
+            .build();
+
+    Collector counterA2 = () -> CounterSnapshot.newBuilder()
+            .withName("counter.a")
+            .build();
+
+    Collector counterB = () -> CounterSnapshot.newBuilder()
+            .withName("counter_b")
+            .build();
+
+    Collector gaugeA = () -> GaugeSnapshot.newBuilder()
+            .withName("gauge_a")
+            .build();
+
+    @Test
+    public void registerNoName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        // If the collector does not have a name at registration time, there is no conflict during registration.
+        registry.register(noName);
+        registry.register(noName);
+        // However, at scrape time the collector has to provide a metric name, and then we'll get a duplicat name error.
+        try {
+            registry.scrape();
+        } catch (IllegalStateException e) {
+            Assert.assertTrue(e.getMessage().contains("duplicate") && e.getMessage().contains("no_name_gauge"));
+            return;
+        }
+        Assert.fail("Expected duplicate name exception");
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void registerDuplicateName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterA2);
+    }
+
+    @Test
+    public void registerOk() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterB);
+        registry.register(gaugeA);
+        MetricSnapshots snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+
+        registry.unregister(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(2, snapshots.size());
+
+        registry.register(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+    }
+}u}(j{*  (d4e2fec337b69b021e674354003ad0e993df4004j*  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javaj*  modifiedj*  Kj*  K j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -87,6 +87,11 @@ public void testTotalSuffixPresent() {
         CounterSnapshot.newBuilder().withName("test_total").build();
     }
 
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresentDot() {
+        CounterSnapshot.newBuilder().withName("test.total").build();
+    }
+
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
         CounterDataPointSnapshot.newBuilder().build();u}(j{*  (c2fd2af6365247fec4b6c4754aff692efdefb35fj*  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javaj*  modifiedj*  Kj*  K j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X#  @@ -43,4 +43,18 @@ public void testDataImmutable() {
         iterator.next();
         iterator.remove();
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffix() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm_info")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffixDot() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm.info")
+                .build();
+    }
 }u}(j{*  (d7a3e8b3e4bca4ac75de0f7b9a390dc602ce10bfj*  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javaj*  modifiedj*  K8j*  Kj*  K=j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  Xx
  @@ -2,8 +2,10 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
 import static org.junit.Assert.assertNotEquals;
 
 public class LabelsTest {
@@ -47,6 +49,20 @@ public void testCompareDifferentNumberOfLabels() {
         assertNotEquals(labels2, labels1);
     }
 
+    @Test
+    public void testComparePrometheusNames() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.b", "val");
+        assertLessThan(labels1, labels2); // this is true because it compares "my_a" to "my_b".
+    }
+
+    @Test
+    public void testEqualsHashcodeDots() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.a", "val");
+        Assert.assertEquals(labels1, labels2);
+        Assert.assertEquals(labels1.hashCode(), labels2.hashCode());
+    }
 
     @Test
     public void testCompareEquals() {
@@ -60,21 +76,56 @@ public void testCompareEquals() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalLabelName() {
-        Labels.of("http.status_code", "200");
+        Labels.of("my_service/status", "200");
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testReservedLabelName() {
         Labels.of("__name__", "requests_total");
     }
 
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabelName() {
+        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    }
+
     @Test
-    public void testSanitizeLabelName() {
-        Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
+    public void testMakePrometheusNames() {
+        String[] names = new String[]{};
+        String[] prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"no_dots", "at_all"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"dots", "here.it.is"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertNotSame(names, prometheusNames);
+        Assert.assertSame(names[0], prometheusNames[0]);
+        Assert.assertEquals("here.it.is", names[1]);
+        Assert.assertEquals("here_it_is", prometheusNames[1]);
+    }
+
+    @Test
+    public void testMerge() {
+        Labels labels1 = Labels.of("key.1", "value 1", "key.3", "value 3");
+        Labels labels2 = Labels.of("key_2", "value 2");
+        Labels merged = labels2.merge(labels1);
+        Assert.assertEquals("key.1", merged.getName(0));
+        Assert.assertEquals("key_2", merged.getName(1));
+        Assert.assertEquals("key.3", merged.getName(2));
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void testDuplicateLabelName() {
-        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    public void testMergeDuplicateName() {
+        Labels labels1 = Labels.of("key_one", "v1");
+        Labels labels2 = Labels.of("key.one", "v2");
+        labels2.merge(labels1);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateName() {
+        Labels.of("key_one", "v1", "key.one", "v2");
     }
 }u}(j{*  (6e76f724a29dcaadcae96d15cf691cae4b8f302fj*  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javaj*  modifiedj*  Kj*  K	j*  Kj*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X
  @@ -1,10 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.Assert;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
 public class MetricMetadataTest {
 
     @Test(expected = IllegalArgumentException.class)
@@ -19,37 +20,38 @@ public void testNullName() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalName() {
-        new MetricMetadata("http.server.duration");
+        new MetricMetadata("my_namespace/http_server_duration"); // let's see when we decide to allow slashes :)
     }
 
     @Test
     public void testSanitizationIllegalCharacters() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
-        Assert.assertEquals("http_server_duration", metadata.getName());
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_namespace/http.server.duration"), "help string", Unit.SECONDS);
+        Assert.assertEquals("my_namespace_http.server.duration", metadata.getName());
+        Assert.assertEquals("my_namespace_http_server_duration", metadata.getPrometheusName());
         Assert.assertEquals("help string", metadata.getHelp());
         Assert.assertEquals("seconds", metadata.getUnit().toString());
     }
 
     @Test
     public void testSanitizationCounter() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("my_events_total"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_events_total"));
         Assert.assertEquals("my_events", metadata.getName());
     }
 
     @Test
     public void testSanitizationInfo() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("target_info"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("target_info"));
         Assert.assertEquals("target", metadata.getName());
     }
 
     @Test
     public void testSanitizationWeirdCornerCase() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("_total_created"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("_total_created"));
         Assert.assertEquals("total", metadata.getName());
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testSanitizeEmptyString() {
-        MetricMetadata.sanitizeMetricName("");
+        sanitizeMetricName("");
     }
 }u}(j{*  (d9ba9339d77c244a3837b1c8b50806899b02ce38j*  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/PrometheusNamingTest.javaj*  addedj*  K"j*  K j*  K"j*  https://github.com/prometheus/client_java/blob/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javaj*  https://github.com/prometheus/client_java/raw/c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javaj*  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.java?ref=c9c0b69b15feed15cbb38b2ef5715f0e3fedbb1bj*  X  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
+public class PrometheusNamingTest {
+
+    @Test
+    public void testSanitizeMetricName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeMetricName("0abc.def")));
+        Assert.assertEquals("___ab_:c0", prometheusName(sanitizeMetricName("___ab.:c0")));
+        Assert.assertEquals("my_prefix_my_metric", sanitizeMetricName("my_prefix/my_metric"));
+        Assert.assertEquals("my_counter", prometheusName(sanitizeMetricName("my_counter_total")));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm_info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("a.b", sanitizeMetricName("a.b"));
+    }
+
+    @Test
+    public void testSanitizeLabelName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeLabelName("0abc.def")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("__abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("___abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_.abc")));
+        Assert.assertEquals("abc.def", sanitizeLabelName("abc.def"));
+        Assert.assertEquals("abc.def2", sanitizeLabelName("abc.def2"));
+    }
+}ueu(6f2a435bc0164a326aa958d136d87809040513d4}(sha(6f2a435bc0164a326aa958d136d87809040513d4node_idEC_kwDOAHoJt9oAKDZmMmE0MzViYzAxNjRhMzI2YWE5NThkMTM2ZDg3ODA5MDQwNTEzZDQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T09:55:30Zu	committer}(j,  Fabian Stäberj
,  fabian@fstab.dej,  2023-07-16T09:55:30Zumessage/Fix default summary config with empty quantilestree}(j ,  (0826e65dcc080a56c9867ce3dc35444bc33964f5urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/0826e65dcc080a56c9867ce3dc35444bc33964f5uj,  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6f2a435bc0164a326aa958d136d87809040513d4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj,  dhttps://api.github.com/repos/prometheus/client_java/commits/6f2a435bc0164a326aa958d136d87809040513d4html_urlYhttps://github.com/prometheus/client_java/commit/6f2a435bc0164a326aa958d136d87809040513d4comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6f2a435bc0164a326aa958d136d87809040513d4/commentsj,  }(loginfstabidJ' j,  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j,  "https://api.github.com/users/fstabj$,  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj,  }(j),  fstabj+,  J' j,  MDQ6VXNlcjMzMDUzNQ==j-,  2https://avatars.githubusercontent.com/u/330535?v=4j/,  h3j,  "https://api.github.com/users/fstabj$,  https://github.com/fstabj2,  ,https://api.github.com/users/fstab/followersj4,  9https://api.github.com/users/fstab/following{/other_user}j6,  2https://api.github.com/users/fstab/gists{/gist_id}j8,  9https://api.github.com/users/fstab/starred{/owner}{/repo}j:,  0https://api.github.com/users/fstab/subscriptionsj<,  'https://api.github.com/users/fstab/orgsj>,  (https://api.github.com/users/fstab/reposj@,  3https://api.github.com/users/fstab/events{/privacy}jB,  2https://api.github.com/users/fstab/received_eventsjD,  UserjF,  uparents]}(j ,  (e2ac68f27995ce415043a646b6713f2701bae23aj,  dhttps://api.github.com/repos/prometheus/client_java/commits/e2ac68f27995ce415043a646b6713f2701bae23aj$,  Yhttps://github.com/prometheus/client_java/commit/e2ac68f27995ce415043a646b6713f2701bae23auastats}(totalK	additionsK	deletionsK ufiles]}(j ,  (d461162f149129f72af0f2b4224ed5b895ba6ac8filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javastatusmodifiedj`,  Kja,  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/6f2a435bc0164a326aa958d136d87809040513d4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaraw_urlhttps://github.com/prometheus/client_java/raw/6f2a435bc0164a326aa958d136d87809040513d4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=6f2a435bc0164a326aa958d136d87809040513d4patchX  @@ -336,6 +336,7 @@ protected MetricsProperties toProperties() {
         public MetricsProperties getDefaultProperties() {
             return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(true)
+                    .withSummaryQuantiles()
                     .withSummaryNumberOfAgeBuckets(DEFAULT_NUMBER_OF_AGE_BUCKETS)
                     .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)
                     .build();uau(cad4fcab806d4abd0ad1a7e9715e8983af58df01}(sha(cad4fcab806d4abd0ad1a7e9715e8983af58df01node_idEC_kwDOAHoJt9oAKGNhZDRmY2FiODA2ZDRhYmQwYWQxYTdlOTcxNWU4OTgzYWY1OGRmMDEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-23T20:56:53Zu	committer}(j},  Fabian Stäberj,  fabian@fstab.dej,  2023-07-23T20:56:53Zumessage[Allow dots in metric names and label names

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(ju,  (fac36f5ab700ca51fbd4141c83a1d1614f7752a2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/fac36f5ab700ca51fbd4141c83a1d1614f7752a2uj,  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cad4fcab806d4abd0ad1a7e9715e8983af58df01
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj,  dhttps://api.github.com/repos/prometheus/client_java/commits/cad4fcab806d4abd0ad1a7e9715e8983af58df01html_urlYhttps://github.com/prometheus/client_java/commit/cad4fcab806d4abd0ad1a7e9715e8983af58df01comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cad4fcab806d4abd0ad1a7e9715e8983af58df01/commentsj{,  }(loginfstabidJ' jw,  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j,  "https://api.github.com/users/fstabj,  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj,  }(j,  fstabj,  J' jw,  MDQ6VXNlcjMzMDUzNQ==j,  2https://avatars.githubusercontent.com/u/330535?v=4j,  h3j,  "https://api.github.com/users/fstabj,  https://github.com/fstabj,  ,https://api.github.com/users/fstab/followersj,  9https://api.github.com/users/fstab/following{/other_user}j,  2https://api.github.com/users/fstab/gists{/gist_id}j,  9https://api.github.com/users/fstab/starred{/owner}{/repo}j,  0https://api.github.com/users/fstab/subscriptionsj,  'https://api.github.com/users/fstab/orgsj,  (https://api.github.com/users/fstab/reposj,  3https://api.github.com/users/fstab/events{/privacy}j,  2https://api.github.com/users/fstab/received_eventsj,  Userj,  uparents]}(ju,  (fd373459616d18126824b68d09c428b3613dd097j,  dhttps://api.github.com/repos/prometheus/client_java/commits/fd373459616d18126824b68d09c428b3613dd097j,  Yhttps://github.com/prometheus/client_java/commit/fd373459616d18126824b68d09c428b3613dd097uastats}(totalK͌	additionsK	deletionsKCufiles](}(ju,  (e5129cf0adf8731da2b93ab6bc388e1298739303filenamedprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javastatusmodifiedj,  Kj,  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaraw_urlhttps://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01patchX	  @@ -39,6 +39,8 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
     // This will remove entries from properties when they are processed.
     private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
         Map<String, MetricsProperties> result = new HashMap<>();
+        // Note that the metric name in the properties file must be as exposed in the Prometheus exposition formats,
+        // i.e. all dots replaced with underscores.
         Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
         // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
         // because entries are removed when MetricsConfig.load(...) is called.u}(ju,  (0d28ddbf0b00dc8f113c7b744db47b09a31cf420j,  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj,  modifiedj,  Kj,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
 
@@ -11,6 +12,8 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+
 /**
  * StateSet metric. Example:
  * <pre>{@code
@@ -58,7 +61,7 @@ private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
-            if (this.getMetadata().getName().equals(name)) {
+            if (prometheusName(this.getMetadata().getName()).equals(prometheusName(name))) {
                 throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
             }
         }u}(ju,  (0abf570ad2e8a1bb7319109f296318e0c89790d0j,  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj,  modifiedj,  Kj,  K j,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -17,6 +17,7 @@
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -1053,6 +1054,7 @@ public void testIllegalLabelNameDot() {
     }
 
     @Test(expected = IllegalArgumentException.class)
+    @Ignore
     public void testIllegalName() {
         Histogram.newBuilder()
                 .withName("server.durations");u}(ju,  (2f334a6cbbdebe9c440bc0fa67c8cceee19fd110j,  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj,  modifiedj,  Kj,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  Xu!  @@ -29,6 +29,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
@@ -89,7 +90,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
         for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
             writeCreated(writer, metadata, data);
@@ -100,7 +101,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
                 writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -128,7 +129,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 Exemplar exemplar;
                 if (i == 0) {
@@ -176,7 +177,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
             // quantiles, all indexes modulo exemplars.length.
             int exemplarIndex = 1;
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
                     exemplarIndex = (exemplarIndex + 1) % exemplars.size();
@@ -195,7 +196,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
         }
@@ -206,7 +207,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "stateset", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(prometheusName(metadata.getName()));
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
@@ -220,7 +221,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(prometheusName(metadata.getName()));
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -238,7 +239,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -251,7 +252,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
     private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
-            writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), countSuffix, data.getLabels());
             writeLong(writer, data.getCount());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -261,7 +262,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
             }
         }
         if (data.hasSum()) {
-            writeNameAndLabels(writer, metadata.getName(), sumSuffix, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), sumSuffix, data.getLabels());
             writeDouble(writer, data.getSum());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -273,7 +274,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
 
     private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
-            writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
             if (data.hasScrapeTimestamp()) {
                 writer.write(' ');
@@ -319,20 +320,20 @@ private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPoin
 
     private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(prometheusName(metadata.getName()));
         writer.write(' ');
         writer.write(typeName);
         writer.write('\n');
         if (metadata.getUnit() != null) {
             writer.write("# UNIT ");
-            writer.write(metadata.getName());
+            writer.write(prometheusName(metadata.getName()));
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getUnit().toString());
             writer.write('\n');
         }
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(prometheusName(metadata.getName()));
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getHelp());
             writer.write('\n');u}(ju,  (0051bbe1529f1a9bbbd2d3104af9a5395c14a166j,  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj,  modifiedj,  Kj,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -24,6 +24,7 @@
 import java.io.OutputStream;
 
 import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
 
 /**
  * Write the Prometheus protobuf format as defined in
@@ -103,7 +104,7 @@ public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         } else if (snapshot instanceof StateSetSnapshot) {
             for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
-                    builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
+                    builder.addMetric(convert(data, prometheusName(snapshot.getMetadata().getName()), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
@@ -121,9 +122,9 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
             return;
         }
         if (nameSuffix == null) {
-            builder.setName(metadata.getName());
+            builder.setName(prometheusName(metadata.getName()));
         } else {
-            builder.setName(metadata.getName() + nameSuffix);
+            builder.setName(prometheusName(metadata.getName()) + nameSuffix);
         }
         if (metadata.getHelp() != null) {
             builder.setHelp(metadata.getHelp());u}(ju,  (c2102f7be2663b7f4899d31704fdb7fbb832d85ej,  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.java     j,  modifiedj,  Kj,  Kj,  K#j,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X%  @@ -26,6 +26,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
 
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
@@ -102,7 +103,7 @@ public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) thr
                         writeMetadata(writer, "_created", "gauge", metadata);
                         metadataWritten = true;
                     }
-                    writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_created", data.getLabels());
                     writeTimestamp(writer, data.getCreatedTimestampMillis());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -115,7 +116,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
             for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-                writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -126,7 +127,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -140,18 +141,18 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (!snapshot.isGaugeHistogram()) {
                 if (data.hasCount()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_count", data.getLabels());
                     writeLong(writer, data.getCount());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
                 if (data.hasSum()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_sum", data.getLabels());
                     writeDouble(writer, data.getSum());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -183,7 +184,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gcount", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gcount", data.getLabels());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_gcount", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -195,7 +196,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gsum", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gsum", data.getLabels());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_gsum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -214,17 +215,17 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
                 metadataWritten = true;
             }
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasCount()) {
-                writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_count", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasSum()) {
-                writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_sum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -235,7 +236,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -246,7 +247,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "", "gauge", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(prometheusName(metadata.getName()));
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
@@ -260,7 +261,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(prometheusName(metadata.getName()));
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -278,7 +279,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -303,7 +304,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
     private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(prometheusName(metadata.getName()));
             if (suffix != null) {
                 writer.write(suffix);
             }
@@ -312,7 +313,7 @@ private void writeMetadata(OutputStreamWriter writer, String suffix, String type
             writer.write('\n');
         }
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(prometheusName(metadata.getName()));
         if (suffix != null) {
             writer.write(suffix);
         }u}(ju,  (84feedc1efc71f94b7e0a24186873016e38bf768j,  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj,  modifiedj,  Kj,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.model.registry;
 
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 
@@ -26,7 +27,7 @@ public interface Collector {
      */
     default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (includedNames.test(result.getMetadata().getName())) {
+        if (includedNames.test(MetricMetadata.prometheusName(result.getMetadata().getName()))) {
             return result;
         } else {
             return null;u}(ju,  (4a03df72a09ca1751162fd8f2a76e7ef67af2cdcj,  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javaj,  modifiedj,  Kj,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -7,6 +7,8 @@
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+
 /**
  * Like {@link Collector}, but collecting multiple Snapshots at once.
  */
@@ -27,7 +29,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
         MetricSnapshots allSnapshots = collect();
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (MetricSnapshot snapshot : allSnapshots) {
-            if (includedNames.test(snapshot.getMetadata().getName())) {
+            if (includedNames.test(prometheusName(snapshot.getMetadata().getName()))) {
                 result.addMetricSnapshot(snapshot);
             }
         }u}(ju,  (58119055b642d5cc517a8bf2d9354cca4c2b5bb6j,  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj,  modifiedj,  K	j,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -9,25 +9,27 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+
 public class PrometheusRegistry {
 
     public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
 
-    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final Set<String> prometheusNames = ConcurrentHashMap.newKeySet();
     private final List<Collector> collectors = new CopyOnWriteArrayList<>();
     private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
 
     public void register(Collector collector) {
         String name = collector.getName();
-        if (!names.add(name)) {
+        if (!prometheusNames.add(prometheusName(name))) {
             throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
         }
         collectors.add(collector);
     }
 
     public void register(MultiCollector collector) {
         for (String name : collector.getNames()) {
-            if (!names.add(name)) {
+            if (!prometheusNames.add(prometheusName(name))) {
                 throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
             }
         }
@@ -36,13 +38,13 @@ public void register(MultiCollector collector) {
 
     public void unregister(Collector collector) {
         collectors.remove(collector);
-        names.remove(collector.getName());
+        prometheusNames.remove(prometheusName(collector.getName()));
     }
 
     public void unregister(MultiCollector collector) {
         multiCollectors.remove(collector);
         for (String name : collector.getNames()) {
-            names.remove(name);
+            prometheusNames.remove(prometheusName(name));
         }
     }
 
@@ -66,7 +68,7 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
             String name = collector.getName();
-            if (name == null || includedNames.test(name)) {
+            if (name == null || includedNames.test(prometheusName(name))) {
                 MetricSnapshot snapshot = collector.collect(includedNames);
                 if (snapshot != null) {
                     result.addMetricSnapshot(snapshot);
@@ -77,7 +79,7 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
             List<String> names = collector.getNames();
             boolean excluded = true; // the multi-collector is excluded unless at least one name matches
             for (String name : names) {
-                if (includedNames.test(name)) {
+                if (includedNames.test(prometheusName(name))) {
                     excluded = false;
                     break;
                 }u}(ju,  (dac311004cf67ab2b1fa6f177c1b019244c138a6j,  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javaj,  modifiedj,  K j,  Kj,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -20,9 +20,6 @@ public final class InfoSnapshot extends MetricSnapshot {
      */
     public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
-        if (metadata.getName().endsWith("_info")) {
-            throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
-        }
         if (metadata.hasUnit()) {
             throw new IllegalArgumentException("An Info metric cannot have a unit.");
         }u}(ju,  (0487b6e440dd787706fe4fc2b43592c682664754j,  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javaj,  modifiedj,  K2j,  Kj,  KBj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -6,19 +6,32 @@
  * Immutable container for metric metadata: name, help, unit.
  */
 public final class MetricMetadata {
-    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
+    // We allow dots in metric names. Dots will automatically be replaced with underscores in
+    // Prometheus exposition formats. However, if metrics from this library are exposed in OpenTelemetry
+    // format the dots are retained.
+    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
     // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
     // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
     // * Micrometer: jvm_buffer_count
     // * OpenTelemetry: process_runtime_jvm_buffer_count
-    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
-    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
-    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
+    // We do not treat _count and _sum as reserved suffixes here. On the downside there is a risk of name conflict
+    // if someone creates a gauge named "my_data_count" and a histogram or summary named "my_data", because
+    // the histogram or summary will implicitly have a time series named "my_data_count".
+    private static final String[] RESERVED_SUFFIXES = {
+            "_total", "_created", "_bucket", "_info",
+            ".total", ".created", ".bucket", ".info"
+    };
 
     /**
-     * Name is the name without suffix.
+     * Name without suffix.
+     * <p>
      * For example, the name for a counter "http_requests_total" is "http_requests".
      * The name of an info called "target_info" is "target".
+     * <p>
+     * We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
+     * exposition formats. However, if metrics from this library are exposed in OpenTelemetry
+     * format the dots are retained.
+     * <p>
      * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
      */
     private final String name;
@@ -49,16 +62,16 @@ public MetricMetadata(String name, String help) {
      *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
      *         an {@link IllegalArgumentException} is thrown.
      *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
+     *     <li>We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
+     *         exposition formats. However, if metrics from this library are exposed in OpenTelemetry
+     *         format the dots are retained.
      *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
      *         <pre>
      *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
      *         </pre>
      *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
-     *     <li>The name MUST NOT contain the {@code _total} or {@code _created} suffixes for counters,
-     *         the {@code _count}, {@code _sum}, or {@code _created} suffixes for summaries,
-     *         the {@code _count}, {@code _sum}, {@code _bucket}, or {@code _created} suffixes for classic histograms,
-     *         the {@code _gcount}, {@code _gsum}, {@code _bucket} suffixes for classic gauge histograms,
-     *         or the {@code _info} suffix for info metrics.</li>
+     *     <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES} {@code _total}, {@code _created},
+     *         {@code _bucket}, or {@code _info}.
      * </ul>
      *
      * @param name must follow the naming conventions described above.
@@ -75,6 +88,9 @@ public MetricMetadata(String name, String help, Unit unit) {
     /**
      * The name does not include the {@code _total} suffix for counter metrics
      * or the {@code _info} suffix for Info metrics.
+     * <p>
+     * The name may contain dots. However, dots are automatically replaced by underscores
+     * in Prometheus exposition formats.
      */
     public String getName() {
         return name;
@@ -96,8 +112,9 @@ private void validate() {
         if (name == null) {
             throw new IllegalArgumentException("Missing required field: name is null");
         }
-        if (!isValidMetricName(name)) {
-            throw new IllegalArgumentException("'" + name + "': illegal metric name");
+        String error = validateMetricName(name);
+        if (error != null) {
+            throw new IllegalArgumentException("'" + name + "': Illegal metric name. " + error);
         }
     }
 
@@ -108,8 +125,8 @@ private void validate() {
      * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
      * </ul>
      * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
-     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but this library does not enforce Unit
-     * suffixes).
+     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but the {@code prometheus-metrics-model}
+     * does not enforce Unit suffixes).
      * <p>
      * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
      * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
@@ -119,12 +136,19 @@ private void validate() {
      * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
      */
     public static boolean isValidMetricName(String name) {
+        return validateMetricName(name) == null;
+    }
+
+    private static String validateMetricName(String name) {
         for (String reservedSuffix : RESERVED_SUFFIXES) {
             if (name.endsWith(reservedSuffix)) {
-                return false;
+                return "The metric name must not include the '" + reservedSuffix + "' suffix.";
             }
         }
-        return METRIC_NAME_RE.matcher(name).matches();
+        if (!METRIC_NAME_RE.matcher(name).matches()) {
+            return "The metric name contains unsupported characters";
+        }
+        return null;
     }
 
     /**
@@ -139,6 +163,7 @@ public static String sanitizeMetricName(String metricName) {
         for (int i = 0; i < length; i++) {
             char ch = metricName.charAt(i);
             if (ch == ':' ||
+                    ch == '.' ||
                     (ch >= 'a' && ch <= 'z') ||
                     (ch >= 'A' && ch <= 'Z') ||
                     (i > 0 && ch >= '0' && ch <= '9')) {
@@ -165,4 +190,13 @@ public static String sanitizeMetricName(String metricName) {
         }
         return sanitizedString;
     }
+
+    /**
+     * Get the metric name that is used in Prometheus exposition format.
+     * @param name must be a valid metric name, i.e. {@link #isValidMetricName(String) isValidMetricName(name)} must be true.
+     * @return the name with dots replaced by underscores.
+     */
+    public static String prometheusName(String name) {
+        return name.replace(".", "_");
+    }
 }u}(ju,  (7f4025b744ea8f69ea1a6d319fd4eaf4b3d468a0j,  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javaj,  modifiedj,  Kj,  Kj,  K	j,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  Xi  @@ -7,6 +7,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
 import static java.util.Collections.unmodifiableList;
 import static java.util.Comparator.comparing;
 
@@ -36,10 +37,10 @@ public MetricSnapshots(MetricSnapshot... snapshots) {
      */
     public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
         List<MetricSnapshot> list = new ArrayList<>(snapshots);
-        list.sort(comparing(s -> s.getMetadata().getName()));
+        list.sort(comparing(s -> prometheusName(s.getMetadata().getName())));
         for (int i = 0; i < snapshots.size() - 1; i++) {
-            if (list.get(i).getMetadata().getName().equals(list.get(i + 1).getMetadata().getName())) {
-                throw new IllegalArgumentException(list.get(i).getMetadata().getName() + ": duplicate metric name");
+            if (prometheusName(list.get(i).getMetadata().getName()).equals(prometheusName(list.get(i + 1).getMetadata().getName()))) {
+                throw new IllegalArgumentException(prometheusName(list.get(i).getMetadata().getName()) + ": duplicate metric name");
             }
         }
         this.snapshots = unmodifiableList(list);
@@ -79,7 +80,7 @@ private Builder() {
 
         public boolean containsMetricName(String name) {
             for (MetricSnapshot snapshot : snapshots) {
-                if (snapshot.getMetadata().getName().equals(name)) {
+                if (prometheusName(snapshot.getMetadata().getName()).equals(prometheusName(name))) {
                     return true;
                 }
             }u}(ju,  (d4e2fec337b69b021e674354003ad0e993df4004j,  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javaj,  modifiedj,  Kj,  K j,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -87,6 +87,11 @@ public void testTotalSuffixPresent() {
         CounterSnapshot.newBuilder().withName("test_total").build();
     }
 
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresentDot() {
+        CounterSnapshot.newBuilder().withName("test.total").build();
+    }
+
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
         CounterDataPointSnapshot.newBuilder().build();u}(ju,  (c2fd2af6365247fec4b6c4754aff692efdefb35fj,  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javaj,  modifiedj,  Kj,  K j,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X#  @@ -43,4 +43,18 @@ public void testDataImmutable() {
         iterator.next();
         iterator.remove();
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffix() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm_info")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffixDot() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm.info")
+                .build();
+    }
 }u}(ju,  (723d5276175e7d40ddcd81d205530abab441b5a9j,  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javaj,  modifiedj,  Kj,  K j,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -2,6 +2,7 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertNotEquals;
@@ -69,6 +70,7 @@ public void testReservedLabelName() {
     }
 
     @Test
+    @Ignore
     public void testSanitizeLabelName() {
         Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
     }u}(ju,  (47804b86e4c618faa9cdb23102c89319aef3ce25j,  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javaj,  modifiedj,  Kj,  K j,  Kj,  https://github.com/prometheus/client_java/blob/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj,  https://github.com/prometheus/client_java/raw/cad4fcab806d4abd0ad1a7e9715e8983af58df01/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj,  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=cad4fcab806d4abd0ad1a7e9715e8983af58df01j,  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class MetricMetadataTest {
@@ -18,11 +19,13 @@ public void testNullName() {
     }
 
     @Test(expected = IllegalArgumentException.class)
+    @Ignore
     public void testIllegalName() {
         new MetricMetadata("http.server.duration");
     }
 
     @Test
+    @Ignore
     public void testSanitizationIllegalCharacters() {
         MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
         Assert.assertEquals("http_server_duration", metadata.getName());ueu(8aea91493bd6ff1a6c478131d7607cb0495ff965}(sha(8aea91493bd6ff1a6c478131d7607cb0495ff965node_idEC_kwDOAHoJt9oAKDhhZWE5MTQ5M2JkNmZmMWE2YzQ3ODEzMWQ3NjA3Y2IwNDk1ZmY5NjUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T15:28:10Zu	committer}(jj-  Fabian Stäberjl-  fabian@fstab.dejn-  2023-08-29T20:25:34ZumessageYRemove obsolete step from CircleCI build

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jb-  (1028f879b355626c1eceac89eb6d888d45620c61urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1028f879b355626c1eceac89eb6d888d45620c61ujz-  hhttps://api.github.com/repos/prometheus/client_java/git/commits/8aea91493bd6ff1a6c478131d7607cb0495ff965
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujz-  dhttps://api.github.com/repos/prometheus/client_java/commits/8aea91493bd6ff1a6c478131d7607cb0495ff965html_urlYhttps://github.com/prometheus/client_java/commit/8aea91493bd6ff1a6c478131d7607cb0495ff965comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/8aea91493bd6ff1a6c478131d7607cb0495ff965/commentsjh-  }(loginfstabidJ' jd-  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jz-  "https://api.github.com/users/fstabj-  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujp-  }(j-  fstabj-  J' jd-  MDQ6VXNlcjMzMDUzNQ==j-  2https://avatars.githubusercontent.com/u/330535?v=4j-  h3jz-  "https://api.github.com/users/fstabj-  https://github.com/fstabj-  ,https://api.github.com/users/fstab/followersj-  9https://api.github.com/users/fstab/following{/other_user}j-  2https://api.github.com/users/fstab/gists{/gist_id}j-  9https://api.github.com/users/fstab/starred{/owner}{/repo}j-  0https://api.github.com/users/fstab/subscriptionsj-  'https://api.github.com/users/fstab/orgsj-  (https://api.github.com/users/fstab/reposj-  3https://api.github.com/users/fstab/events{/privacy}j-  2https://api.github.com/users/fstab/received_eventsj-  Userj-  uparents]}(jb-  (7a6d5f16f0fb3b908510ecdc6e23e95f2ce8352ejz-  dhttps://api.github.com/repos/prometheus/client_java/commits/7a6d5f16f0fb3b908510ecdc6e23e95f2ce8352ej-  Yhttps://github.com/prometheus/client_java/commit/7a6d5f16f0fb3b908510ecdc6e23e95f2ce8352euastats}(totalK	additionsK	deletionsKufiles]}(jb-  (58c65b38b7c25bcf282dac90641e8d99a2700dc9filename.circleci/config.ymlstatusmodifiedj-  Kj-  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/8aea91493bd6ff1a6c478131d7607cb0495ff965/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/8aea91493bd6ff1a6c478131d7607cb0495ff965/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=8aea91493bd6ff1a6c478131d7607cb0495ff965patchXR  @@ -16,7 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      - run: cd protobuf-shaded && ../mvnw install && cd ..
+      # - run: cd protobuf-shaded && ../mvnw install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:uau(bbb7ee9635a6de87478e7aa8e5847bd49612889c}(sha(bbb7ee9635a6de87478e7aa8e5847bd49612889cnode_idEC_kwDOAHoJt9oAKGJiYjdlZTk2MzVhNmRlODc0NzhlN2FhOGU1ODQ3YmQ0OTYxMjg4OWMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-04T21:28:40Zu	committer}(j-  Fabian Stäberj-  fabian@fstab.dej-  2023-06-04T21:28:40Zumessageconfig properties for metricstree}(j-  (03cd04e792e6249e3312487a60a1ff65058d43c4urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/03cd04e792e6249e3312487a60a1ff65058d43c4uj-  hhttps://api.github.com/repos/prometheus/client_java/git/commits/bbb7ee9635a6de87478e7aa8e5847bd49612889c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj-  dhttps://api.github.com/repos/prometheus/client_java/commits/bbb7ee9635a6de87478e7aa8e5847bd49612889chtml_urlYhttps://github.com/prometheus/client_java/commit/bbb7ee9635a6de87478e7aa8e5847bd49612889ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/bbb7ee9635a6de87478e7aa8e5847bd49612889c/commentsj-  }(loginfstabidJ' j-  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j-  "https://api.github.com/users/fstabj-  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj-  }(j .  fstabj.  J' j-  MDQ6VXNlcjMzMDUzNQ==j.  2https://avatars.githubusercontent.com/u/330535?v=4j.  h3j-  "https://api.github.com/users/fstabj-  https://github.com/fstabj	.  ,https://api.github.com/users/fstab/followersj.  9https://api.github.com/users/fstab/following{/other_user}j
.  2https://api.github.com/users/fstab/gists{/gist_id}j.  9https://api.github.com/users/fstab/starred{/owner}{/repo}j.  0https://api.github.com/users/fstab/subscriptionsj.  'https://api.github.com/users/fstab/orgsj.  (https://api.github.com/users/fstab/reposj.  3https://api.github.com/users/fstab/events{/privacy}j.  2https://api.github.com/users/fstab/received_eventsj.  Userj.  uparents]}(j-  (1ac4bb8618a0d120a77147e25e5389d7623ffcddj-  dhttps://api.github.com/repos/prometheus/client_java/commits/1ac4bb8618a0d120a77147e25e5389d7623ffcddj-  Yhttps://github.com/prometheus/client_java/commit/1ac4bb8618a0d120a77147e25e5389d7623ffcdduastats}(totalMh	additionsM4	deletionsM4ufiles](}(j-  (d24c1b43cd125bc9c53642298a567d0f1d927347filename\prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarProperties.javastatusrenamedj7.  Kj8.  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cpatchX  @@ -5,7 +5,7 @@
 /**
  * Properties starting with io.prometheus.exemplars
  */
-public class ExemplarConfig {
+public class ExemplarProperties {
 
     private static final String MIN_RETENTION_PERIOD_SECONDS = "minRetentionPeriodSeconds";
     private static final String MAX_RETENTION_PERIOD_SECONDS = "maxRetentionPeriodSeconds";
@@ -17,7 +17,7 @@ public class ExemplarConfig {
     private final Integer sampleIntervalMilliseconds;
     private final Integer numberOfExemplars;
 
-    public ExemplarConfig(
+    public ExemplarProperties(
             Integer minRetentionPeriodSeconds,
             Integer maxRetentionPeriodSeconds,
             Integer sampleIntervalMilliseconds,
@@ -44,7 +44,7 @@ public Integer getNumberOfExemplars() {
         return numberOfExemplars;
     }
 
-    static ExemplarConfig load(String prefix, Map<Object, Object> properties) throws PrometheusConfigException {
+    static ExemplarProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
         Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
         Integer sampleIntervalMilliseconds = Util.loadInteger(prefix + "." + SAMPLE_INTERVAL_MILLISECONDS, properties);
@@ -57,11 +57,11 @@ static ExemplarConfig load(String prefix, Map<Object, Object> properties) throws
 
         if (minRetentionPeriodSeconds != null && maxRetentionPeriodSeconds != null) {
             if (minRetentionPeriodSeconds > maxRetentionPeriodSeconds) {
-                throw new PrometheusConfigException(prefix + "." + MIN_RETENTION_PERIOD_SECONDS + " must not be greater than " + prefix + "." + MAX_RETENTION_PERIOD_SECONDS + ".");
+                throw new PrometheusPropertiesException(prefix + "." + MIN_RETENTION_PERIOD_SECONDS + " must not be greater than " + prefix + "." + MAX_RETENTION_PERIOD_SECONDS + ".");
             }
         }
 
-        return new ExemplarConfig(
+        return new ExemplarProperties(
                 minRetentionPeriodSeconds,
                 maxRetentionPeriodSeconds,
                 sampleIntervalMilliseconds,previous_filenameXprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarConfig.javau}(j-  (67b6613aefb6139838cf5851437804e0fe778b55j=.  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExpositionFormatProperties.javaj?.  renamedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -5,22 +5,22 @@
 /**
  * Properties starting with io.prometheus.expositionFormat
  */
-public class ExpositionFormatConfig {
+public class ExpositionFormatProperties {
 
     private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
 
     private final Boolean includeCreatedTimestamps;
 
-    public ExpositionFormatConfig(Boolean includeCreatedTimestamps) {
+    public ExpositionFormatProperties(Boolean includeCreatedTimestamps) {
         this.includeCreatedTimestamps = includeCreatedTimestamps;
     }
 
     public Boolean getIncludeCreatedTimestamps() {
         return includeCreatedTimestamps;
     }
 
-    static ExpositionFormatConfig load(String prefix, Map<Object, Object> properties) throws PrometheusConfigException {
+    static ExpositionFormatProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
-        return new ExpositionFormatConfig(includeCreatedTimestamps);
+        return new ExpositionFormatProperties(includeCreatedTimestamps);
     }
 }jJ.  `prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExpositionFormatConfig.javau}(j-  (0687b3c764766d00d10d77beded1e63303482359j=.  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/HttpServerProperties.javaj?.  renamedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FHttpServerProperties.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -5,21 +5,21 @@
 /**
  * Properties starting with io.prometheus.httpServer
  */
-public class HttpServerConfig {
+public class HttpServerProperties {
     private static final String PORT = "port";
     private final Integer port;
 
-    public HttpServerConfig(Integer port) {
+    public HttpServerProperties(Integer port) {
         this.port = port;
     }
 
     public Integer getPort() {
         return port;
     }
 
-    static HttpServerConfig load(String prefix, Map<Object, Object> properties) throws PrometheusConfigException {
+    static HttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer port = Util.loadInteger(prefix + "." + PORT, properties);
         Util.assertValue(port, t -> t > 0, "Expecting value > 0", prefix, PORT);
-        return new HttpServerConfig(port);
+        return new HttpServerProperties(port);
     }
 }jJ.  Zprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/HttpServerConfig.javau}(j-  (d9b7448072480fd51ddd1423aba67f2e8be81040j=.  Zprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricProperties.javaj?.  renamedj7.  Kj8.  K
jA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X4  @@ -5,7 +5,7 @@
 /**
  * Properties starting with io.prometheus.metrics
  */
-public class MetricsConfig {
+public class MetricProperties {
 
     private static final String EXEMPLARS_ENABLED = "exemplarsEnabled";
     private static final String HISTOGRAM_NATIVE_ONLY = "histogramNativeOnly";
@@ -17,6 +17,7 @@ public class MetricsConfig {
     private static final String HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS = "histogramNativeMaxNumberOfBuckets"; // 0 means unlimited number of buckets
     private static final String HISTOGRAM_NATIVE_RESET_DURATION_SECONDS = "histogramNativeResetDurationSeconds"; // 0 means no reset
     private static final String SUMMARY_QUANTILES = "summaryQuantiles";
+    private static final String SUMMARY_QUANTILE_ERRORS = "summaryQuantileErrors";
     private static final String SUMMARY_MAX_AGE_SECONDS = "summaryMaxAgeSeconds";
     private static final String SUMMARY_NUMBER_OF_AGE_BUCKETS = "summaryNumberOfAgeBuckets";
 
@@ -30,10 +31,11 @@ public class MetricsConfig {
     private final Integer histogramNativeMaxNumberOfBuckets;
     private final Long histogramNativeResetDurationSeconds;
     private final double[] summaryQuantiles;
+    private final double[] summaryQuantileErrors;
     private final Long summaryMaxAgeSeconds;
     private final Integer summaryNumberOfAgeBuckets;
 
-    public MetricsConfig(
+    public MetricProperties(
             Boolean exemplarsEnabled,
             Boolean histogramNativeOnly,
             Boolean histogramClassicOnly,
@@ -44,6 +46,7 @@ public MetricsConfig(
             Integer histogramNativeMaxNumberOfBuckets,
             Long histogramNativeResetDurationSeconds,
             double[] summaryQuantiles,
+            double[] summaryQuantileErrors,
             Long summaryMaxAgeSeconds,
             Integer summaryNumberOfAgeBuckets) {
         this(exemplarsEnabled,
@@ -56,12 +59,13 @@ public MetricsConfig(
                 histogramNativeMaxNumberOfBuckets,
                 histogramNativeResetDurationSeconds,
                 summaryQuantiles,
+                summaryQuantileErrors,
                 summaryMaxAgeSeconds,
                 summaryNumberOfAgeBuckets,
-                null);
+                "");
     }
 
-    private MetricsConfig(
+    private MetricProperties(
             Boolean exemplarsEnabled,
             Boolean histogramNativeOnly,
             Boolean histogramClassicOnly,
@@ -72,6 +76,7 @@ private MetricsConfig(
             Integer histogramNativeMaxNumberOfBuckets,
             Long histogramNativeResetDurationSeconds,
             double[] summaryQuantiles,
+            double[] summaryQuantileErrors,
             Long summaryMaxAgeSeconds,
             Integer summaryNumberOfAgeBuckets,
             String configPropertyPrefix) {
@@ -85,11 +90,13 @@ private MetricsConfig(
         this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
         this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
         this.summaryQuantiles = summaryQuantiles;
+        this.summaryQuantileErrors = summaryQuantileErrors;
         this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
         this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
         validate(configPropertyPrefix);
     }
 
+
     private Boolean isHistogramClassicOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) {
         if (histogramClassicOnly == null && histogramNativeOnly == null) {
             return null;
@@ -110,7 +117,7 @@ private Boolean isHistogramNativeOnly(Boolean histogramClassicOnly, Boolean hist
         return !histogramClassicOnly;
     }
 
-    private void validate(String prefix) throws PrometheusConfigException {
+    private void validate(String prefix) throws PrometheusPropertiesException {
         Util.assertValue(histogramNativeInitialSchema, s -> s >= -4 && s <= 8, "Expecting number between -4 and +8.", prefix, HISTOGRAM_NATIVE_INITIAL_SCHEMA);
         Util.assertValue(histogramNativeMinZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD);
         Util.assertValue(histogramNativeMaxZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
@@ -120,19 +127,33 @@ private void validate(String prefix) throws PrometheusConfigException {
         Util.assertValue(summaryNumberOfAgeBuckets, t -> t > 0, "Expecting value > 0", prefix, SUMMARY_NUMBER_OF_AGE_BUCKETS);
 
         if (Boolean.TRUE.equals(histogramNativeOnly) && Boolean.TRUE.equals(histogramClassicOnly)) {
-            throw new PrometheusConfigException(prefix + "." + HISTOGRAM_NATIVE_ONLY + " and " + prefix + "." + HISTOGRAM_CLASSIC_ONLY + " cannot both be true");
+            throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_ONLY + " and " + prefix + "." + HISTOGRAM_CLASSIC_ONLY + " cannot both be true");
         }
 
         if (histogramNativeMinZeroThreshold != null && histogramNativeMaxZeroThreshold != null) {
             if (histogramNativeMinZeroThreshold > histogramNativeMaxZeroThreshold) {
-                throw new PrometheusConfigException(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD + " cannot be greater than " + prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
+                throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD + " cannot be greater than " + prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
             }
         }
 
         if (summaryQuantiles != null) {
             for (double quantile : summaryQuantiles) {
                 if (quantile < 0 || quantile > 1) {
-                    throw new PrometheusConfigException(prefix + "." + SUMMARY_QUANTILES + ": Expecting 0.0 <= quantile <= 1.0");
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILES + ": Expecting 0.0 <= quantile <= 1.0");
+                }
+            }
+        }
+
+        if (summaryQuantileErrors != null) {
+            if (summaryQuantiles != null) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Can't configure " + SUMMARY_QUANTILE_ERRORS + " without configuring " + SUMMARY_QUANTILES);
+            }
+            if (summaryQuantileErrors.length != summaryQuantiles.length) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": must have the same length as " + SUMMARY_QUANTILES);
+            }
+            for (double error : summaryQuantileErrors) {
+                if (error < 0 || error > 1) {
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Expecting 0.0 <= error <= 1.0");
                 }
             }
         }
@@ -178,6 +199,24 @@ public double[] getSummaryQuantiles() {
         return summaryQuantiles;
     }
 
+    public double[] getSummaryQuantileErrors() {
+        if (summaryQuantileErrors != null) {
+            return summaryQuantileErrors;
+        } else {
+            double[] result = new double[summaryQuantiles.length];
+            for (int i = 0; i < result.length; i++) {
+                if (summaryQuantiles[i] <= 0.01 || summaryQuantiles[i] >= 0.99) {
+                    result[i] = 0.001;
+                } else if (summaryQuantiles[i] <= 0.02 || summaryQuantiles[i] >= 0.98) {
+                    result[i] = 0.005;
+                } else {
+                    result[i] = 0.01;
+                }
+            }
+            return result;
+        }
+    }
+
     public Long getSummaryMaxAgeSeconds() {
         return summaryMaxAgeSeconds;
     }
@@ -186,8 +225,11 @@ public Integer getSummaryNumberOfAgeBuckets() {
         return summaryNumberOfAgeBuckets;
     }
 
-    static MetricsConfig load(String prefix, Map<Object, Object> properties) throws PrometheusConfigException {
-        return new MetricsConfig(
+    /**
+     * Properties that are loaded will be removed from the map. The remaining properties are unused.
+     */
+    static MetricProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return new MetricProperties(
                 Util.loadBoolean(prefix + "." + EXEMPLARS_ENABLED, properties),
                 Util.loadBoolean(prefix + "." + HISTOGRAM_NATIVE_ONLY, properties),
                 Util.loadBoolean(prefix + "." + HISTOGRAM_CLASSIC_ONLY, properties),
@@ -198,8 +240,113 @@ static MetricsConfig load(String prefix, Map<Object, Object> properties) throws
                 Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS, properties),
                 Util.loadLong(prefix + "." + HISTOGRAM_NATIVE_RESET_DURATION_SECONDS, properties),
                 Util.loadDoubleArray(prefix + "." + SUMMARY_QUANTILES, properties),
+                Util.loadDoubleArray(prefix + "." + SUMMARY_QUANTILE_ERRORS, properties),
                 Util.loadLong(prefix + "." + SUMMARY_MAX_AGE_SECONDS, properties),
                 Util.loadInteger(prefix + "." + SUMMARY_NUMBER_OF_AGE_BUCKETS, properties),
                 prefix);
     }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private Boolean exemplarsEnabled;
+        private Boolean histogramNativeOnly;
+        private Boolean histogramClassicOnly;
+        private double[] histogramClassicUpperBounds;
+        private Integer histogramNativeInitialSchema;
+        private Double histogramNativeMinZeroThreshold;
+        private Double histogramNativeMaxZeroThreshold;
+        private Integer histogramNativeMaxNumberOfBuckets;
+        private Long histogramNativeResetDurationSeconds;
+        private double[] summaryQuantiles;
+        private double[] summaryQuantileErrors;
+        private Long summaryMaxAgeSeconds;
+        private Integer summaryNumberOfAgeBuckets;
+
+        private Builder() {
+        }
+
+        public MetricProperties build() {
+            return new MetricProperties(exemplarsEnabled,
+                    histogramNativeOnly,
+                    histogramClassicOnly,
+                    histogramClassicUpperBounds,
+                    histogramNativeInitialSchema,
+                    histogramNativeMinZeroThreshold,
+                    histogramNativeMaxZeroThreshold,
+                    histogramNativeMaxNumberOfBuckets,
+                    histogramNativeResetDurationSeconds,
+                    summaryQuantiles,
+                    summaryQuantileErrors,
+                    summaryMaxAgeSeconds,
+                    summaryNumberOfAgeBuckets);
+        }
+
+        public Builder withExemplarsEnabled(Boolean exemplarsEnabled) {
+            this.exemplarsEnabled = exemplarsEnabled;
+            return this;
+        }
+
+        public Builder withHistogramNativeOnly(Boolean histogramNativeOnly) {
+            this.histogramNativeOnly = histogramNativeOnly;
+            return this;
+        }
+
+        public Builder withHistogramClassicOnly(Boolean histogramClassicOnly) {
+            this.histogramClassicOnly = histogramClassicOnly;
+            return this;
+        }
+
+        public Builder withHistogramClassicUpperBounds(double... histogramClassicUpperBounds) {
+            this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+            return this;
+        }
+
+        public Builder withHistogramNativeInitialSchema(Integer histogramNativeInitialSchema) {
+            this.histogramNativeInitialSchema = histogramNativeInitialSchema;
+            return this;
+        }
+
+        public Builder withHistogramNativeMinZeroThreshold(Double histogramNativeMinZeroThreshold) {
+            this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
+            return this;
+        }
+
+        public Builder withHistogramNativeMaxZeroThreshold(Double histogramNativeMaxZeroThreshold) {
+            this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
+            return this;
+        }
+
+        public Builder withHistogramNativeMaxNumberOfBuckets(Integer histogramNativeMaxNumberOfBuckets) {
+            this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
+            return this;
+        }
+
+        public Builder withHistogramNativeResetDurationSeconds(Long histogramNativeResetDurationSeconds) {
+            this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
+            return this;
+        }
+
+        public Builder withSummaryQuantiles(double... summaryQuantiles) {
+            this.summaryQuantiles = summaryQuantiles;
+            return this;
+        }
+
+        public Builder withSummaryQuantileErrors(double... summaryQuantileErrors) {
+            this.summaryQuantileErrors = summaryQuantileErrors;
+            return this;
+        }
+
+        public Builder withSummaryMaxAgeSeconds(Long summaryMaxAgeSeconds) {
+            this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
+            return this;
+        }
+
+        public Builder withSummaryNumberOfAgeBuckets(Integer summaryNumberOfAgeBuckets) {
+            this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
+            return this;
+        }
+    }
 }jJ.  Wprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsConfig.javau}(j-  (b97b32e4d2a3424a11dc3fe074adc3b5416c9b67j=.  Zprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusConfig.javaj?.  removedj7.  K j8.  K5jA.  K5jB.  https://github.com/prometheus/client_java/blob/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfig.javajD.  https://github.com/prometheus/client_java/raw/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfig.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfig.java?ref=1ac4bb8618a0d120a77147e25e5389d7623ffcddjH.  X  @@ -1,53 +0,0 @@
-package io.prometheus.metrics.config;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class PrometheusConfig {
-
-    private static final PrometheusConfig instance = PrometheusConfigLoader.load();
-
-    private final MetricsConfig defaultMetricsConfig;
-
-    private final Map<String, MetricsConfig> metricsConfigs = new HashMap<>();
-    private final ExemplarConfig exemplarConfig;
-    private final ExpositionFormatConfig expositionFormatConfig;
-    private final HttpServerConfig httpServerConfig;
-
-    public static PrometheusConfig getInstance() throws PrometheusConfigException {
-        return instance;
-    }
-
-    public PrometheusConfig(
-            MetricsConfig defaultMetricsConfig,
-            Map<String, MetricsConfig> metricsConfigs,
-            ExemplarConfig exemplarConfig,
-            ExpositionFormatConfig expositionFormatConfig,
-            HttpServerConfig httpServerConfig) {
-        this.defaultMetricsConfig = defaultMetricsConfig;
-        this.metricsConfigs.putAll(metricsConfigs);
-        this.exemplarConfig = exemplarConfig;
-        this.expositionFormatConfig = expositionFormatConfig;
-        this.httpServerConfig = httpServerConfig;
-    }
-
-    public MetricsConfig getDefaultMetricsConfig() {
-        return defaultMetricsConfig;
-    }
-
-    public MetricsConfig getMetricsConfig(String metricName) {
-        return metricsConfigs.get(metricName);
-    }
-
-    public ExemplarConfig getExemplarConfig() {
-        return exemplarConfig;
-    }
-
-    public ExpositionFormatConfig getExpositionFormatConfig() {
-        return expositionFormatConfig;
-    }
-
-    public HttpServerConfig getHttpServerConfig() {
-        return httpServerConfig;
-    }
-}u%     }(j-  (0721ec8e2bd89329735ae0035d6f218d447dcc30j=.  cprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusConfigException.javaj?.  removedj7.  K j8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigException.javajD.  https://github.com/prometheus/client_java/raw/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigException.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigException.java?ref=1ac4bb8618a0d120a77147e25e5389d7623ffcddjH.  X;  @@ -1,12 +0,0 @@
-package io.prometheus.metrics.config;
-
-public class PrometheusConfigException extends RuntimeException {
-
-    public PrometheusConfigException(String msg) {
-        super(msg);
-    }
-
-    public PrometheusConfigException(String msg, Exception cause) {
-        super(msg, cause);
-    }
-}u}(j-  (b5c8f071143d50ba6e5157e789caddfe8e6c60eej=.  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj?.  addedj7.  K4j8.  K jA.  K4jB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  XY  @@ -0,0 +1,52 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class PrometheusProperties {
+
+    private static final PrometheusProperties instance = PrometheusPropertiesLoader.load();
+
+    private final MetricProperties defaultMetricProperties;
+    private final Map<String, MetricProperties> metricProperties = new HashMap<>();
+    private final ExemplarProperties exemplarConfig;
+    private final ExpositionFormatProperties expositionFormatProperties;
+    private final HttpServerProperties httpServerConfig;
+
+    public static PrometheusProperties getInstance() throws PrometheusPropertiesException {
+        return instance;
+    }
+
+    public PrometheusProperties(
+            MetricProperties defaultMetricProperties,
+            Map<String, MetricProperties> metricProperties,
+            ExemplarProperties exemplarConfig,
+            ExpositionFormatProperties expositionFormatProperties,
+            HttpServerProperties httpServerConfig) {
+        this.defaultMetricProperties = defaultMetricProperties;
+        this.metricProperties.putAll(metricProperties);
+        this.exemplarConfig = exemplarConfig;
+        this.expositionFormatProperties = expositionFormatProperties;
+        this.httpServerConfig = httpServerConfig;
+    }
+
+    public MetricProperties getDefaultMetricProperties() {
+        return defaultMetricProperties;
+    }
+
+    public MetricProperties getMetricProperties(String metricName) {
+        return metricProperties.get(metricName);
+    }
+
+    public ExemplarProperties getExemplarConfig() {
+        return exemplarConfig;
+    }
+
+    public ExpositionFormatProperties getExpositionFormatConfig() {
+        return expositionFormatProperties;
+    }
+
+    public HttpServerProperties getHttpServerConfig() {
+        return httpServerConfig;
+    }
+}u}(j-  (e41009ca2765dcc7aad02e95de7282ab08ed45e7j=.  gprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesException.javaj?.  addedj7.  Kj8.  K jA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  XG  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.config;
+
+public class PrometheusPropertiesException extends RuntimeException {
+
+    public PrometheusPropertiesException(String msg) {
+        super(msg);
+    }
+
+    public PrometheusPropertiesException(String msg, Exception cause) {
+        super(msg, cause);
+    }
+}u}(j-  (d6ebeaf6b6bb2f1f0e2823be6e230ca458a0ec5fj=.  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj?.  renamedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -12,22 +12,22 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-public class PrometheusConfigLoader {
+public class PrometheusPropertiesLoader {
 
-    public static PrometheusConfig load() throws PrometheusConfigException {
+    public static PrometheusProperties load() throws PrometheusPropertiesException {
         Map<Object, Object> properties = loadProperties();
-        Map<String, MetricsConfig> metricsConfigs = loadMetricsConfigs(properties);
-        MetricsConfig defaultMetricsConfig = MetricsConfig.load("io.prometheus.metrics", properties);
-        ExemplarConfig exemplarConfig = ExemplarConfig.load("io.prometheus.exemplars", properties);
-        ExpositionFormatConfig expositionFormatConfig = ExpositionFormatConfig.load("io.prometheus.expositionFormat", properties);
-        HttpServerConfig httpServerConfig = HttpServerConfig.load("io.prometheus.httpServer", properties);
+        Map<String, MetricProperties> metricsConfigs = loadMetricsConfigs(properties);
+        MetricProperties defaultMetricProperties = MetricProperties.load("io.prometheus.metrics", properties);
+        ExemplarProperties exemplarConfig = ExemplarProperties.load("io.prometheus.exemplars", properties);
+        ExpositionFormatProperties expositionFormatProperties = ExpositionFormatProperties.load("io.prometheus.expositionFormat", properties);
+        HttpServerProperties httpServerConfig = HttpServerProperties.load("io.prometheus.httpServer", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusConfig(defaultMetricsConfig, metricsConfigs, exemplarConfig, expositionFormatConfig, httpServerConfig);
+        return new PrometheusProperties(defaultMetricProperties, metricsConfigs, exemplarConfig, expositionFormatProperties, httpServerConfig);
     }
 
     // This will remove entries from properties when they are processed.
-    private static Map<String, MetricsConfig> loadMetricsConfigs(Map<Object, Object> properties) {
-        Map<String, MetricsConfig> result = new HashMap<>();
+    private static Map<String, MetricProperties> loadMetricsConfigs(Map<Object, Object> properties) {
+        Map<String, MetricProperties> result = new HashMap<>();
         Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
         // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
         // because entries are removed when MetricsConfig.load(...) is called.
@@ -40,7 +40,7 @@ private static Map<String, MetricsConfig> loadMetricsConfigs(Map<Object, Object>
             if (matcher.find()) {
                 String metricName = matcher.group(1);
                 if (!result.containsKey(metricName)) {
-                    result.put(metricName, MetricsConfig.load("io.prometheus.metrics." + metricName, properties));
+                    result.put(metricName, MetricProperties.load("io.prometheus.metrics." + metricName, properties));
                 }
             }
         }
@@ -53,7 +53,7 @@ private static Map<String, MetricsConfig> loadMetricsConfigs(Map<Object, Object>
     private static void validateAllPropertiesProcessed(Map<Object, Object> properties) {
         for (Object key : properties.keySet()) {
             if (key.toString().startsWith("io.prometheus")) {
-                throw new PrometheusConfigException(key + ": Unknown property");
+                throw new PrometheusPropertiesException(key + ": Unknown property");
             }
         }
     }
@@ -76,7 +76,7 @@ private static Properties loadPropertiesFromClasspath() {
         return properties;
     }
 
-    private static Properties loadPropertiesFromFile() throws PrometheusConfigException {
+    private static Properties loadPropertiesFromFile() throws PrometheusPropertiesException {
         Properties properties = new Properties();
         String path = System.getProperty("prometheus.config");
         if (System.getenv("PROMETHEUS_CONFIG") != null) {
@@ -86,7 +86,7 @@ private static Properties loadPropertiesFromFile() throws PrometheusConfigExcept
             try (InputStream stream = Files.newInputStream(Paths.get(path))) {
                 properties.load(stream);
             } catch (IOException e) {
-                throw new PrometheusConfigException("Failed to read Prometheus properties from " + path + ": " + e.getMessage(), e);
+                throw new PrometheusPropertiesException("Failed to read Prometheus properties from " + path + ": " + e.getMessage(), e);
             }
         }
         return properties;jJ.  `prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusConfigLoader.javau}(j-  (88fd26b4b4f741ab603d418d2a8f6868a8c6a656j=.  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -13,18 +13,18 @@ private static String getProperty(String name, Map<Object, Object> properties) {
         return null;
     }
 
-    public static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusConfigException {
+    public static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             if (!"true".equalsIgnoreCase(property) && !"false".equalsIgnoreCase(property)) {
-                throw new PrometheusConfigException(name + "=" + property + ": Expecting 'true' or 'false'");
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting 'true' or 'false'");
             }
             return Boolean.parseBoolean(property);
         }
         return null;
     }
 
-    public static double[] loadDoubleArray(String name, Map<Object, Object> properties) throws PrometheusConfigException {
+    public static double[] loadDoubleArray(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             String[] numbers = property.split(",");
@@ -37,54 +37,54 @@ public static double[] loadDoubleArray(String name, Map<Object, Object> properti
                         result[i] = Double.parseDouble(numbers[i].trim());
                     }
                 } catch (NumberFormatException e) {
-                    throw new PrometheusConfigException(name + "=" + property + ": Expecting comma separated list of double values");
+                    throw new PrometheusPropertiesException(name + "=" + property + ": Expecting comma separated list of double values");
                 }
             }
             return result;
         }
         return null;
     }
 
-    public static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusConfigException {
+    public static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
                 return Integer.parseInt(property);
             } catch (NumberFormatException e) {
-                throw new PrometheusConfigException(name + "=" + property + ": Expecting integer value");
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting integer value");
             }
         }
         return null;
     }
 
-    public static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusConfigException {
+    public static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
                 return Double.parseDouble(property);
             } catch (NumberFormatException e) {
-                throw new PrometheusConfigException(name + "=" + property + ": Expecting double value");
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting double value");
             }
         }
         return null;
     }
 
-    public static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusConfigException {
+    public static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
             try {
                 return Long.parseLong(property);
             } catch (NumberFormatException e) {
-                throw new PrometheusConfigException(name + "=" + property + ": Expecting long value");
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting long value");
             }
         }
         return null;
     }
 
-    public static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusConfigException {
+    public static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusPropertiesException {
         if (number != null && !predicate.test(number)) {
             String fullMessage = prefix == null ? name + ": " + message : prefix + "." + name + ": " + message;
-            throw new PrometheusConfigException(fullMessage);
+            throw new PrometheusPropertiesException(fullMessage);
         }
     }
 }u}(j-  (1182a400445ed17ae8837d0a018c1f6e1e217f2dj=.  ^prometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusConfigTest.javaj?.  removedj7.  K j8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigTest.javajD.  https://github.com/prometheus/client_java/raw/1ac4bb8618a0d120a77147e25e5389d7623ffcdd/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigTest.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusConfigTest.java?ref=1ac4bb8618a0d120a77147e25e5389d7623ffcddjH.  X2  @@ -1,28 +0,0 @@
-package io.prometheus.metrics.config;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-public class PrometheusConfigTest {
-
-    @Test
-    public void testPrometheusConfig() {
-        PrometheusConfig result = PrometheusConfig.getInstance();
-        Assert.assertEquals(11, result.getDefaultMetricsConfig().getHistogramClassicUpperBounds().length);
-        Assert.assertEquals(4, result.getMetricsConfig("http_duration_seconds").getHistogramClassicUpperBounds().length);
-    }
-
-    @Test
-    public void testEmptyUpperBounds() throws IOException {
-        Properties properties = new Properties();
-        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("emptyUpperBounds.properties")) {
-            properties.load(stream);
-        }
-        MetricsConfig config = MetricsConfig.load("io.prometheus.metrics", properties);
-        Assert.assertNull(config.getHistogramClassicUpperBounds());
-    }
-}u}(j-  (2d5a49e5423b8fc483b9b20cd099fa09a2d43335j=.  bprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javaj?.  addedj7.  Kj8.  K jA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -0,0 +1,28 @@
+package io.prometheus.metrics.config;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class PrometheusPropertiesTest {
+
+    @Test
+    public void testPrometheusConfig() {
+        PrometheusProperties result = PrometheusProperties.getInstance();
+        Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().length);
+        Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().length);
+    }
+
+    @Test(expected=PrometheusPropertiesException.class) // can't configure empty histogram classic bounds
+    public void testEmptyUpperBounds() throws IOException {
+        Properties properties = new Properties();
+        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("emptyUpperBounds.properties")) {
+            properties.load(stream);
+        }
+        Assert.assertEquals(1, properties.size());
+        MetricProperties.load("io.prometheus.metrics", properties);
+    }
+}u}(j-  (c019761ca5194c0c99671e26095fb3ffb69566c9j=.  Hprometheus-metrics-config/src/test/resources/emptyUpperBounds.propertiesj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesjD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesjF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.properties?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  w@@ -1 +1 @@
-#io.prometheus.metrics.classicHistogramUpperBounds =
+io.prometheus.metrics.histogramClassicUpperBounds =,u}(j-  (c1717505035a4145d3d935a468dd318ed78d9834j=.  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  XQ  @@ -1,15 +1,17 @@
 io.prometheus.metrics.histogramClassicUpperBounds = .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10
 io.prometheus.metrics.http_duration_seconds.histogramClassicUpperBounds = .005, .01, .015, .02
+io.prometheus.metrics.summaryQuantiles = 0.5, 0.95, 0.99
+io.prometheus.metrics.summaryQuantileErrors = 0.01, 0.01, 0.001
 
 io.prometheus.metrics.exemplarsEnabled = true
 io.prometheus.metrics.http_duration_seconds.exemplarsEnabled = true
 
 io.prometheus.expositionFormat.includeCreatedTimestamps = false
+io.prometheus.expositionFormat.exemplarsForAllMetricTypes = true
 
 io.prometheus.exemplars.minRetentionPeriodSeconds = 30
 io.prometheus.exemplars.maxRetentionPeriodSeconds = 30
 io.prometheus.exemplars.sampleIntervalMilliseconds = 30
-io.prometheus.exemplars.numberOfExemplars = 4
 
 io.prometheus.httpServer.port = 9000
 u}(j-  (519530f04bc2ae6d7a84a180bd5f9adf41b721f5j=.  Mprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Counter.javaj?.  modifiedj7.  Kj8.  K	jA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X	  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Labels;
@@ -14,8 +15,17 @@
 
 public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver {
 
-    private Counter(Builder builder) {
+    private final boolean exemplarsEnabled;
+
+    private Counter(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
+        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
     }
 
     @Override
@@ -49,10 +59,10 @@ public CounterSnapshot collect() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Builder newBuilder(PrometheusConfig config) {
+    public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 
@@ -117,8 +127,8 @@ public DiscreteEventObserver toObserver() {
 
     public static class Builder extends ObservingMetric.Builder<Builder, Counter> {
 
-        private Builder(PrometheusConfig config) {
-            super(Collections.emptyList(), config);
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
         }
 
         @Override
@@ -128,8 +138,7 @@ public Builder withName(String name) {
 
         @Override
         public Counter build() {
-            // TODO we are normalizing the name twice.
-            return new Counter(withName(normalizeName(name)));
+            return new Counter(this, properties);
         }
 
         @Override
@@ -162,7 +171,7 @@ public static class Builder extends Metric.Builder<io.prometheus.metrics.core.Co
 
             private DoubleSupplier callback;
 
-            private Builder(PrometheusConfig config) {
+            private Builder(PrometheusProperties config) {
                 super(Collections.emptyList(), config);
             }
 u}(j-  (886732059a5491b97118322ee1644a02e1b19708j=.  Kprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Gauge.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X	  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;
@@ -14,8 +15,12 @@
 
 public class Gauge extends ObservingMetric<GaugingObserver, Gauge.GaugeData> implements GaugingObserver {
 
-    private Gauge(Builder builder) {
+    private final boolean exemplarsEnabled;
+
+    private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
+        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
     }
 
     @Override
@@ -57,6 +62,11 @@ protected GaugeData newMetricData() {
         return new GaugeData();
     }
 
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
     class GaugeData extends MetricData<GaugingObserver> implements GaugingObserver {
 
         private final AtomicLong value = new AtomicLong(Double.doubleToRawLongBits(0));
@@ -121,13 +131,13 @@ public GaugingObserver toObserver() {
 
     public static class Builder extends ObservingMetric.Builder<Builder, Gauge> {
 
-        private Builder(PrometheusConfig config) {
+        private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
         @Override
         public Gauge build() {
-            return new Gauge(this);
+            return new Gauge(this, properties);
         }
 
         @Override
@@ -156,7 +166,7 @@ public static class Builder extends Metric.Builder<Gauge.FromCallback.Builder, G
 
             private DoubleSupplier callback;
 
-            private Builder(PrometheusConfig config) {
+            private Builder(PrometheusProperties config) {
                 super(Collections.emptyList(), config);
             }
 
@@ -178,10 +188,10 @@ protected Gauge.FromCallback.Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Builder newBuilder(PrometheusConfig config) {
+    public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 }u}(j-  (c133d69ce5fdcce83dc5bde09483d514da42379bj=.  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Histogram.javaj?.  modifiedj7.  KDj8.  KYjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X50  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.MetricsConfig;
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.HistogramSnapshot;
@@ -35,8 +35,8 @@
  * exposition format "Protobuf" uses both representations. This is great for migrating from classic histograms
  * to native histograms.
  * <p>
- * If you want the classic representation only, use {@link Histogram.Builder#classicHistogramOnly}.
- * If you want the native representation only, use {@link Histogram.Builder#nativeHistogramOnly}.
+ * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
+ * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
  */
 public class Histogram extends ObservingMetric<DistributionObserver, Histogram.HistogramData> implements DistributionObserver {
 
@@ -46,6 +46,8 @@ public class Histogram extends ObservingMetric<DistributionObserver, Histogram.H
     // NATIVE_BOUNDS is used to look up the native bucket index depending on the current schema.
     private static final double[][] NATIVE_BOUNDS;
 
+    private final boolean exemplarsEnabled;
+
     // Upper bounds for the classic histogram buckets. Contains at least +Inf.
     // An empty array indicates that this is a native histogram only.
     private final double[] classicUpperBounds;
@@ -87,37 +89,23 @@ public class Histogram extends ObservingMetric<DistributionObserver, Histogram.H
     // the histogram may reset (all values set to zero) after nativeResetDurationSeconds is expired.
     private final long nativeResetDurationSeconds; // 0 indicates no reset
 
-    private Histogram(Histogram.Builder builder, PrometheusConfig prometheusConfig) {
+    private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        String metricName = getMetadata().getName();
-        MetricsConfig[] configs;
-        if (prometheusConfig.getMetricsConfig(metricName) != null) {
-            configs = new MetricsConfig[]{
-                prometheusConfig.getMetricsConfig(metricName), // highest precedence
-                builder.toConfig(), // second-highest precedence
-                prometheusConfig.getDefaultMetricsConfig(), // third-highest precedence
-                builder.getDefaults() // fallback
-            };
-        } else {
-            configs = new MetricsConfig[]{
-                    builder.toConfig(), // highest precedence
-                    prometheusConfig.getDefaultMetricsConfig(), // second-highest precedence
-                    builder.getDefaults() // fallback
-            };
-        }
-        nativeInitialSchema = getConfigProperty(configs, config -> {
-            if (Boolean.TRUE.equals(config.getHistogramClassicOnly())) {
+        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        nativeInitialSchema = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramClassicOnly())) {
                 return CLASSIC_HISTOGRAM;
+            } else {
+                return props.getHistogramNativeInitialSchema();
             }
-            return config.getHistogramNativeInitialSchema();
         });
-        classicUpperBounds = getConfigProperty(configs, config -> {
-            if (Boolean.TRUE.equals(config.getHistogramNativeOnly())) {
+        classicUpperBounds = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramNativeOnly())) {
                 return new double[]{};
-            }
-            if (config.getHistogramClassicUpperBounds() != null) {
+            } else if (props.getHistogramClassicUpperBounds() != null) {
                 SortedSet<Double> upperBounds = new TreeSet<>();
-                for (double upperBound : config.getHistogramClassicUpperBounds()) {
+                for (double upperBound : props.getHistogramClassicUpperBounds()) {
                     upperBounds.add(upperBound);
                 }
                 upperBounds.add(Double.POSITIVE_INFINITY);
@@ -127,26 +115,21 @@ private Histogram(Histogram.Builder builder, PrometheusConfig prometheusConfig)
                     result[i++] = upperBound;
                 }
                 return result;
+            } else {
+                return null;
             }
-            return null;
         });
-        double max = getConfigProperty(configs, MetricsConfig::getHistogramNativeMaxZeroThreshold);
-        double min = getConfigProperty(configs, MetricsConfig::getHistogramNativeMinZeroThreshold);
+        double max = getConfigProperty(properties, MetricProperties::getHistogramNativeMaxZeroThreshold);
+        double min = getConfigProperty(properties, MetricProperties::getHistogramNativeMinZeroThreshold);
         nativeMaxZeroThreshold = max == builder.DEFAULT_NATIVE_MAX_ZERO_THRESHOLD && min > max ? min : max;
         nativeMinZeroThreshold = Math.min(min, nativeMaxZeroThreshold);
-        nativeMaxBuckets = getConfigProperty(configs, MetricsConfig::getHistogramNativeMaxNumberOfBuckets);
-        nativeResetDurationSeconds = getConfigProperty(configs, MetricsConfig::getHistogramNativeResetDurationSeconds);
+        nativeMaxBuckets = getConfigProperty(properties, MetricProperties::getHistogramNativeMaxNumberOfBuckets);
+        nativeResetDurationSeconds = getConfigProperty(properties, MetricProperties::getHistogramNativeResetDurationSeconds);
     }
 
-    private <T> T getConfigProperty(MetricsConfig[] configs, Function<MetricsConfig, T> getter) {
-        T result;
-        for (MetricsConfig config : configs) {
-            result = getter.apply(config);
-            if (result != null) {
-                return result;
-            }
-        }
-        throw new IllegalStateException("Missing default config. This is a bug in the Prometheus metrics core library.");
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
     }
 
     public class HistogramData extends MetricData<DistributionObserver> implements DistributionObserver {
@@ -615,10 +598,10 @@ protected HistogramData newMetricData() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Builder newBuilder(PrometheusConfig config) {
+    public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 
@@ -632,8 +615,8 @@ public static class Builder extends ObservingMetric.Builder<Histogram.Builder, H
         private final int DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS = 160;
         private final long DEFAULT_NATIVE_RESET_DURATION_SECONDS = 0; // 0 means no reset
 
-        private Boolean nativeHistogramOnly;
-        private Boolean classicHistogramOnly;
+        private Boolean nativeOnly;
+        private Boolean classicOnly;
         private double[] classicUpperBounds;
         private Integer nativeInitialSchema;
         private Double nativeMaxZeroThreshold;
@@ -643,68 +626,64 @@ public static class Builder extends ObservingMetric.Builder<Histogram.Builder, H
 
         @Override
         public Histogram build() {
-            return new Histogram(this, config);
-        }
-
-        private MetricsConfig toConfig() {
-            return new MetricsConfig(
-                    exemplarsEnabled,
-                    nativeHistogramOnly,
-                    classicHistogramOnly,
-                    classicUpperBounds,
-                    nativeInitialSchema,
-                    nativeMinZeroThreshold,
-                    nativeMaxZeroThreshold,
-                    nativeMaxNumberOfBuckets,
-                    nativeResetDurationSeconds,
-                    null,
-                    null,
-                    null
-            );
+            return new Histogram(this, properties);
         }
 
-        private MetricsConfig getDefaults() {
-            return new MetricsConfig(
-                    true,
-                    false,
-                    false,
-                    DEFAULT_CLASSIC_UPPER_BOUNDS,
-                    DEFAULT_NATIVE_INITIAL_SCHEMA,
-                    DEFAULT_NATIVE_MIN_ZERO_THRESHOLD,
-                    DEFAULT_NATIVE_MAX_ZERO_THRESHOLD,
-                    DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS,
-                    DEFAULT_NATIVE_RESET_DURATION_SECONDS,
-                    null,
-                    null,
-                    null
-            );
+        @Override
+        protected MetricProperties toProperties() {
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withHistogramNativeOnly(nativeOnly)
+                    .withHistogramClassicOnly(classicOnly)
+                    .withHistogramClassicUpperBounds(classicUpperBounds)
+                    .withHistogramNativeInitialSchema(nativeInitialSchema)
+                    .withHistogramNativeMinZeroThreshold(nativeMinZeroThreshold)
+                    .withHistogramNativeMaxZeroThreshold(nativeMaxZeroThreshold)
+                    .withHistogramNativeMaxNumberOfBuckets(nativeMaxNumberOfBuckets)
+                    .withHistogramNativeResetDurationSeconds(nativeResetDurationSeconds)
+                    .build();
         }
 
-        private Builder(PrometheusConfig config) {
+        @Override
+        public MetricProperties getDefaultProperties() {
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withHistogramNativeOnly(false)
+                    .withHistogramClassicOnly(false)
+                    .withHistogramClassicUpperBounds(DEFAULT_CLASSIC_UPPER_BOUNDS)
+                    .withHistogramNativeInitialSchema(DEFAULT_NATIVE_INITIAL_SCHEMA)
+                    .withHistogramNativeMinZeroThreshold(DEFAULT_NATIVE_MIN_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxZeroThreshold(DEFAULT_NATIVE_MAX_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxNumberOfBuckets(DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS)
+                    .withHistogramNativeResetDurationSeconds(DEFAULT_NATIVE_RESET_DURATION_SECONDS)
+                    .build();
+        }
+
+        private Builder(PrometheusProperties config) {
             super(Collections.singletonList("le"), config);
         }
 
         /**
          * Use the native histogram representation only, i.e. don't maintain classic histogram buckets.
          * See {@link Histogram} for more info.
          */
-        public Builder nativeHistogramOnly() {
-            if (Boolean.TRUE.equals(classicHistogramOnly)) {
-                throw new IllegalArgumentException("Cannot call nativeHistogramOnly() after calling classicHistogramOnly().");
+        public Builder nativeOnly() {
+            if (Boolean.TRUE.equals(classicOnly)) {
+                throw new IllegalArgumentException("Cannot call nativeOnly() after calling classicOnly().");
             }
-            nativeHistogramOnly = true;
+            nativeOnly = true;
             return this;
         }
 
         /**
          * Use the classic histogram representation only, i.e. don't maintain native histogram buckets.
          * See {@link Histogram} for more info.
          */
-        public Builder classicHistogramOnly() {
-            if (Boolean.TRUE.equals(nativeHistogramOnly)) {
-                throw new IllegalArgumentException("Cannot call classicHistogramOnly() after calling nativeHistogramOnly().");
+        public Builder classicOnly() {
+            if (Boolean.TRUE.equals(nativeOnly)) {
+                throw new IllegalArgumentException("Cannot call classicOnly() after calling nativeOnly().");
             }
-            classicHistogramOnly = true;
+            classicOnly = true;
             return this;
         }
 u}(j-  (5128da21930fa3150b46279fe4f5548277fbbde5j=.  Jprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Info.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FInfo.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FInfo.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FInfo.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.InfoSnapshot;
 import io.prometheus.metrics.model.Label;
 import io.prometheus.metrics.model.Labels;
@@ -35,7 +35,7 @@ public InfoSnapshot collect() {
 
     public static class Builder extends Metric.Builder<Builder, Info> {
 
-        private Builder(PrometheusConfig config) {
+        private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
@@ -63,10 +63,10 @@ protected Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Builder newBuilder(PrometheusConfig config) {
+    public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 }u}(j-  (be1b6ec9fb47a49b63fd1324a740f7d78ad74aa6j=.  Lprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Metric.javaj?.  modifiedj7.  Kj8.  KjA.  K
jB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetric.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetric.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetric.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -1,10 +1,12 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.*;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.function.Function;
 
 public abstract class Metric {
 
@@ -34,15 +36,15 @@ protected MetricMetadata getMetadata() {
 
     static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
         protected final List<String> illegalLabelNames;
-        protected final PrometheusConfig config;
+        protected final PrometheusProperties properties;
         protected String name;
         private Unit unit;
         private String help;
         private Labels constLabels = Labels.EMPTY;
 
-        protected Builder(List<String> illegalLabelNames, PrometheusConfig config) {
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);
-            this.config = config;
+            this.properties = properties;
         }
 
         public B withName(String name) {u}(j-  (6600ab08176ac79fa043d7814ef1091edb357f7bj=.  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/ObservingMetric.javaj?.  modifiedj7.  K2j8.  KjA.  K6jB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.exemplars.DefaultExemplarConfig;
 import io.prometheus.metrics.exemplars.ExemplarConfig;
 import io.prometheus.metrics.model.Labels;
@@ -12,13 +13,14 @@
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
 
 import static java.lang.Boolean.FALSE;
 import static java.lang.Boolean.TRUE;
 
 public abstract class ObservingMetric<O extends Observer, V extends MetricData<O>> extends Metric {
     private final String[] labelNames;
-    private final Boolean exemplarsEnabled;
+    //private final Boolean exemplarsEnabled;
     protected final ExemplarConfig exemplarConfig;
 
     /**
@@ -34,7 +36,7 @@ public abstract class ObservingMetric<O extends Observer, V extends MetricData<O
     protected ObservingMetric(Builder<?, ?> builder) {
         super(builder);
         this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
-        this.exemplarsEnabled = builder.exemplarsEnabled;
+        //this.exemplarsEnabled = builder.exemplarsEnabled;
         this.exemplarConfig = builder.exemplarConfig;
     }
 
@@ -80,13 +82,45 @@ protected V getNoLabels() {
         return noLabels;
     }
 
+    protected MetricProperties[] getMetricProperties(Builder builder, PrometheusProperties prometheusProperties) {
+        String metricName = getMetadata().getName();
+        if (prometheusProperties.getMetricProperties(metricName) != null) {
+            return new MetricProperties[]{
+                    prometheusProperties.getMetricProperties(metricName), // highest precedence
+                    builder.toProperties(), // second-highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // third-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        } else {
+            return new MetricProperties[]{
+                    builder.toProperties(), // highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // second-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        }
+    }
+
+    protected <T> T getConfigProperty(MetricProperties[] properties, Function<MetricProperties, T> getter) {
+        T result;
+        for (MetricProperties props : properties) {
+            result = getter.apply(props);
+            if (result != null) {
+                return result;
+            }
+        }
+        throw new IllegalStateException("Missing default config. This is a bug in the Prometheus metrics core library.");
+    }
+    protected abstract boolean isExemplarsEnabled();
+
+    /*
     protected boolean isExemplarsEnabled() {
         if (exemplarsEnabled != null) {
             return exemplarsEnabled;
         } else {
             return DefaultExemplarConfig.isEnabledByDefault();
         }
     }
+     */
 
     protected boolean hasSpanContextSupplier() {
         return exemplarConfig != null ? exemplarConfig.hasSpanContextSupplier() : DefaultExemplarConfig.hasSpanContextSupplier();
@@ -97,7 +131,7 @@ static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric
         protected Boolean exemplarsEnabled;
         private ExemplarConfig exemplarConfig;
 
-        protected Builder(List<String> illegalLabelNames, PrometheusConfig config) {
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties config) {
             super(illegalLabelNames, config);
         }
 
@@ -124,6 +158,18 @@ public B withoutExemplars() {
             return self();
         }
 
+        protected MetricProperties toProperties() {
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .build();
+        }
+
+        public MetricProperties getDefaultProperties() {
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .build();
+        }
+
         /**
          * Enable exemplars and provide an {@link ExemplarConfig}.
          */u}(j-  (fa30c42c56805bc78e0a641b386eee9ead51037aj=.  Nprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/StateSet.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FStateSet.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FStateSet.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FStateSet.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X	  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.StateSetSnapshot;
 import io.prometheus.metrics.observer.StateObserver;
@@ -13,10 +14,13 @@
 // experimental
 public class StateSet extends ObservingMetric<StateObserver, StateSet.StateSetData> implements StateObserver {
 
+    private final boolean exemplarsEnabled;
     private final String[] names;
 
-    private StateSet(Builder builder) {
+    private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
+        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
             if (this.getMetadata().getName().equals(name)) {
@@ -44,6 +48,11 @@ protected StateSetData newMetricData() {
         return new StateSetData();
     }
 
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
     @Override
     public void setTrue(String state) {
         getNoLabels().setTrue(state);
@@ -92,7 +101,7 @@ public static class Builder extends ObservingMetric.Builder<Builder, StateSet> {
 
         private String[] names;
 
-        private Builder(PrometheusConfig config) {
+        private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
@@ -116,7 +125,7 @@ public StateSet build() {
             if (names == null) {
                 throw new IllegalStateException("State names are required when building a StateSet.");
             }
-            return new StateSet(this);
+            return new StateSet(this, properties);
         }
 
         @Override
@@ -126,10 +135,10 @@ protected Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Builder newBuilder(PrometheusConfig config) {
+    public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 }u}(j-  (56a68c2f2f3eaa8b4d630a47712ad70e06288830j=.  Mprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Summary.javaj?.  modifiedj7.  KEj8.  KjA.  KUjB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FSummary.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FSummary.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FSummary.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.config.PrometheusConfig;
+import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.Quantile;
@@ -17,15 +18,35 @@
 
 public class Summary extends ObservingMetric<DistributionObserver, Summary.SummaryData> implements DistributionObserver {
 
-    final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
-    final long maxAgeSeconds;
-    final int ageBuckets;
+    private final boolean exemplarsEnabled;
+    private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
+    private final long maxAgeSeconds;
+    private final int ageBuckets;
 
-    private Summary(Builder builder) {
+    private Summary(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        this.quantiles = Collections.unmodifiableList(new ArrayList<>(builder.quantiles));
-        this.maxAgeSeconds = builder.maxAgeSeconds;
-        this.ageBuckets = builder.ageBuckets;
+        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        this.exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        this.quantiles = Collections.unmodifiableList(makeQuantiles(properties));
+        this.maxAgeSeconds = getConfigProperty(properties, MetricProperties::getSummaryMaxAgeSeconds);
+        this.ageBuckets = getConfigProperty(properties, MetricProperties::getSummaryNumberOfAgeBuckets);
+    }
+
+    private List<CKMSQuantiles.Quantile> makeQuantiles(MetricProperties[] properties) {
+        List<CKMSQuantiles.Quantile> result = new ArrayList<>();
+        double[] quantiles = getConfigProperty(properties, MetricProperties::getSummaryQuantiles);
+        double[] errors = getConfigProperty(properties, MetricProperties::getSummaryQuantileErrors);
+        if (quantiles != null) {
+            for (int i=0; i<quantiles.length; i++) {
+                result.add(new CKMSQuantiles.Quantile(quantiles[i], errors[i]));
+            }
+        }
+        return result;
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
     }
 
     @Override
@@ -36,7 +57,7 @@ public SummarySnapshot collect() {
     @Override
     protected SummarySnapshot collect(List<Labels> labels, List<SummaryData> metricData) {
         List<SummarySnapshot.SummaryData> data = new ArrayList<>(labels.size());
-        for (int i=0; i<labels.size(); i++) {
+        for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
         return new SummarySnapshot(getMetadata(), data);
@@ -129,12 +150,14 @@ private Quantiles makeQuantiles() {
 
     public static class Builder extends ObservingMetric.Builder<Summary.Builder, Summary> {
 
+        public static final long DEFAULT_MAX_AGE_SECONDS = TimeUnit.MINUTES.toSeconds(5);
+        public static final int DEFAULT_AGE_BUCKETS = 5;
         private final List<CKMSQuantiles.Quantile> quantiles = new ArrayList<>();
-        private long maxAgeSeconds = TimeUnit.MINUTES.toSeconds(10);
-        private int ageBuckets = 5;
+        private Long maxAgeSeconds;
+        private Integer ageBuckets;
 
-        private Builder(PrometheusConfig config) {
-            super(Collections.singletonList("quantile"), config);
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
         }
 
         public Builder quantile(double quantile, double error) {
@@ -164,9 +187,39 @@ public Builder ageBuckets(int ageBuckets) {
             return this;
         }
 
+        @Override
+        protected MetricProperties toProperties() {
+            double[] quantiles = null;
+            double[] quantileErrors = null;
+            if (!this.quantiles.isEmpty()) {
+                quantiles = new double[this.quantiles.size()];
+                quantileErrors = new double[this.quantiles.size()];
+                for (int i = 0; i < this.quantiles.size(); i++) {
+                    quantiles[i] = this.quantiles.get(i).quantile;
+                    quantileErrors[i] = this.quantiles.get(i).epsilon;
+                }
+            }
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withSummaryQuantiles(quantiles)
+                    .withSummaryQuantileErrors(quantileErrors)
+                    .withSummaryNumberOfAgeBuckets(ageBuckets)
+                    .withSummaryMaxAgeSeconds(maxAgeSeconds)
+                    .build();
+        }
+
+        @Override
+        public MetricProperties getDefaultProperties() {
+            return MetricProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withSummaryNumberOfAgeBuckets(DEFAULT_AGE_BUCKETS)
+                    .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)
+                    .build();
+        }
+
         @Override
         public Summary build() {
-            return new Summary(this);
+            return new Summary(this, properties);
         }
 
         @Override
@@ -176,10 +229,10 @@ protected Builder self() {
     }
 
     public static Summary.Builder newBuilder() {
-        return new Builder(PrometheusConfig.getInstance());
+        return new Builder(PrometheusProperties.getInstance());
     }
 
-    public static Summary.Builder newBuilder(PrometheusConfig config) {
+    public static Summary.Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 }u}(j-  (2ec49bd427a827f03f879ef3e1f739ad84beb461j=.  Sprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/HistogramTest.javaj?.  modifiedj7.  Kj8.  KjA.  K2jB.  https://github.com/prometheus/client_java/blob/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.javajD.  https://github.com/prometheus/client_java/raw/bbb7ee9635a6de87478e7aa8e5847bd49612889c/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.javajF.  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.java?ref=bbb7ee9635a6de87478e7aa8e5847bd49612889cjH.  X54  @@ -98,7 +98,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "bucket { cumulative_count: 3 upper_bound: Infinity }",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .classicHistogramOnly()
+                                .classicOnly()
                                 .build(),
                         1.0, 2.0, 3.0),
                 new GolangTestCase("'factor 1.1 results in schema 3' from client_golang",
@@ -115,7 +115,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(3)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -134,7 +134,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -154,7 +154,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: -2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(-1)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -178,7 +178,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: -6",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(-2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -201,7 +201,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -227,7 +227,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -245,7 +245,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMinZeroThreshold(1.4)
                                 .build(),
@@ -290,7 +290,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: -1",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -312,7 +312,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -332,7 +332,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -353,7 +353,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 1",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -376,7 +376,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 1",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -399,7 +399,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -416,7 +416,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMinZeroThreshold(0)
@@ -437,7 +437,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 2",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -457,7 +457,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 1",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -479,7 +479,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 1",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -501,7 +501,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -518,7 +518,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "negative_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -535,7 +535,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(0)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -552,7 +552,7 @@ public void testGolangTests() throws NoSuchFieldException, IllegalAccessExceptio
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(2)
                                 .withNativeMaxZeroThreshold(1.2)
                                 .withNativeMaxNumberOfBuckets(4)
@@ -581,7 +581,7 @@ public void testAdditional() throws NoSuchFieldException, IllegalAccessException
                                 "positive_delta: 0",
                         Histogram.newBuilder()
                                 .withName("test")
-                                .nativeHistogramOnly()
+                                .nativeOnly()
                                 .withNativeInitialSchema(0)
                                 .withNativeMaxZeroThreshold(0)
                                 .build(),
@@ -629,7 +629,7 @@ public void testFindBucketIndex() throws NoSuchMethodException, InvocationTarget
         nativeBucketIndexToUpperBound.setAccessible(true);
         for (int schema = -4; schema <= 8; schema++) {
             Histogram histogram = Histogram.newBuilder()
-                    .nativeHistogramOnly()
+                    .nativeOnly()
                     .withName("test")
                     .withNativeInitialSchema(schema)
                     .build();
@@ -937,7 +937,7 @@ public boolean isSampled() {
         long sampleIntervalMillis = 10;
         Histogram histogram = Histogram.newBuilder()
                 .withName("test")
-                .nativeHistogramOnly()
+                .nativeOnly()
                 .withExemplarConfig(ExemplarConfig.newBuilder()
                         .withSpanContextSupplier(spanContextSupplier)
                         .withSampleInterval(sampleIntervalMillis, TimeUnit.MILLISECONDS)ueu      (9ffe2ac6685c1a0956d19b7b158721c7f97de7a5}(sha(9ffe2ac6685c1a0956d19b7b158721c7f97de7a5node_idEC_kwDOAHoJt9oAKDlmZmUyYWM2Njg1YzFhMDk1NmQxOWI3YjE1ODcyMWM3Zjk3ZGU3YTUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-14T21:39:48Zu	committer}(j
/  Fabian Stäberj/  fabian@fstab.dej/  2023-06-14T21:39:48Zumessage
registry testtree}(j/  (d4036e1edc6f6ee1813a7a71d52175ab776f29a9urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d4036e1edc6f6ee1813a7a71d52175ab776f29a9uj/  hhttps://api.github.com/repos/prometheus/client_java/git/commits/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj/  dhttps://api.github.com/repos/prometheus/client_java/commits/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5html_urlYhttps://github.com/prometheus/client_java/commit/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/commentsj/  }(loginfstabidJ' j/  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j/  "https://api.github.com/users/fstabj&/  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj/  }(j+/  fstabj-/  J' j/  MDQ6VXNlcjMzMDUzNQ==j//  2https://avatars.githubusercontent.com/u/330535?v=4j1/  h3j/  "https://api.github.com/users/fstabj&/  https://github.com/fstabj4/  ,https://api.github.com/users/fstab/followersj6/  9https://api.github.com/users/fstab/following{/other_user}j8/  2https://api.github.com/users/fstab/gists{/gist_id}j:/  9https://api.github.com/users/fstab/starred{/owner}{/repo}j</  0https://api.github.com/users/fstab/subscriptionsj>/  'https://api.github.com/users/fstab/orgsj@/  (https://api.github.com/users/fstab/reposjB/  3https://api.github.com/users/fstab/events{/privacy}jD/  2https://api.github.com/users/fstab/received_eventsjF/  UserjH/  uparents]}(j/  (6f4ff476b27ac96d84ab25f111b5b6f29c4b58acj/  dhttps://api.github.com/repos/prometheus/client_java/commits/6f4ff476b27ac96d84ab25f111b5b6f29c4b58acj&/  Yhttps://github.com/prometheus/client_java/commit/6f4ff476b27ac96d84ab25f111b5b6f29c4b58acuastats}(totalM		additionsM	deletionsKufiles](}(j/  (abb6d88a1de0a66500e28cc08c2b272c3827f69cfilenamepom.xmlstatusmodifiedjb/  Kjc/  K changesKblob_url_https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5patchXP  @@ -45,6 +45,7 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(j/  (88eff9efb40e01a5e9c65b26cc7af36ee629d7c7jh/  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -2,9 +2,9 @@
 
 import io.prometheus.metrics.tracer.common.SpanContext;
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.core.util.Scheduler;
 
 import java.util.ArrayList;u}(j/  (da0f41b6f4e4b0aa339fee684b80f1d2a481ae2ejh/  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,12 +1,14 @@
 package io.prometheus.metrics.core.metrics;
 
+import io.prometheus.metrics.model.snapshots.MetricData;
+
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Supplier;
 
-class Buffer<T extends io.prometheus.metrics.model.MetricData> {
+class Buffer<T extends MetricData> {
 
     private static final long signBit = 1L << 63;
     private final AtomicLong observationCount = new AtomicLong(0);u}(j/  (9fb4be739bdbdc501e112d52da2c55ef4205856djh/  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X'  @@ -4,9 +4,9 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.core.observer.DiscreteEventObserver;
 
 import java.util.ArrayList;
@@ -162,7 +162,7 @@ protected Builder self() {
         }
     }
 
-    public static class FromCallback extends Metric {
+    public static class FromCallback extends MetricWithFixedMetadata {
 
         private final DoubleSupplier callback;
         private final long createdTimeMillis = System.currentTimeMillis();
@@ -182,7 +182,7 @@ public CounterSnapshot collect() {
             )));
         }
 
-        public static class Builder extends Metric.Builder<Counter.FromCallback.Builder, Counter.FromCallback> {
+        public static class Builder extends MetricWithFixedMetadata.Builder<Counter.FromCallback.Builder, Counter.FromCallback> {
 
             private DoubleSupplier callback;
 u}(j/  (f6b6ccd3d21dbeb1bac77148354e263da94840cajh/  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -4,9 +4,9 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.core.observer.GaugingObserver;
 
 import java.util.ArrayList;
@@ -160,7 +160,7 @@ protected Builder self() {
         }
     }
 
-    public static class FromCallback extends Metric {
+    public static class FromCallback extends MetricWithFixedMetadata {
 
         private final DoubleSupplier callback;
 
@@ -176,7 +176,7 @@ public GaugeSnapshot collect() {
             ));
         }
 
-        public static class Builder extends Metric.Builder<Gauge.FromCallback.Builder, Gauge.FromCallback> {
+        public static class Builder extends MetricWithFixedMetadata.Builder<Gauge.FromCallback.Builder, Gauge.FromCallback> {
 
             private DoubleSupplier callback;
 u}(j/  (24e641e41ee721f52f03b72be233eac64f28ff4fjh/  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -5,11 +5,11 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
-import io.prometheus.metrics.model.ClassicHistogramBuckets;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
 import io.prometheus.metrics.core.observer.DistributionObserver;
 import io.prometheus.metrics.core.util.Scheduler;
 u}(j/  (10ccbdaa3c0f1ab109d8f1bfd10de929be4a4d46jh/  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X8  @@ -1,14 +1,14 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Label;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.Unit;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.Collections;
 
-public class Info extends Metric {
+public class Info extends MetricWithFixedMetadata {
 
     private volatile Labels labels = Labels.EMPTY;
 
@@ -33,12 +33,20 @@ public InfoSnapshot collect() {
         return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoData(labels.merge(constLabels))));
     }
 
-    public static class Builder extends Metric.Builder<Builder, Info> {
+    public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {
 
         private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
+        @Override
+        public Builder withName(String name) {
+            if (name != null && name.endsWith("_info")) {
+                name = name.substring(0, name.length() - 5);
+            }
+            return super.withName(name);
+        }
+
         @Override
         public Builder withUnit(Unit unit) {
             throw new UnsupportedOperationException("Info metrics cannot have a unit.");u}(j/  (19b6310930bb2a9f002ea0c43b15f147a8e0881fjh/  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javajj/  modifiedjb/  Kjc/  K)jl/  K-jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  XV
  @@ -1,71 +1,34 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.model.*;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 
 import java.util.ArrayList;
 import java.util.List;
 
 public abstract class Metric {
 
-    private final MetricMetadata metadata;
     protected final Labels constLabels;
 
     protected Metric(Builder<?, ?> builder) {
-        this.metadata = new MetricMetadata(makeName(builder.name, builder.unit), builder.help, builder.unit);
         this.constLabels = builder.constLabels;
     }
 
-    private String makeName(String name, Unit unit) {
-        if (unit != null) {
-            String suffix = "_" + unit;
-            if (!name.endsWith(suffix)) {
-                name = name + suffix;
-            }
-        }
-        return name;
-    }
-
     public abstract MetricSnapshot collect();
 
-    protected MetricMetadata getMetadata() {
-        return metadata;
-    }
+    protected static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
 
-    static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        protected String name;
-        private Unit unit;
-        private String help;
         private Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);
             this.properties = properties;
         }
 
-        public B withName(String name) {
-            if (name.endsWith("_info")) {
-                name = name.substring(0, name.length() - "_info".length());
-            }
-            if (!MetricMetadata.isValidMetricName(name)) {
-                throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
-            }
-            this.name = name;
-            return self();
-        }
-
-        public B withUnit(Unit unit) {
-            this.unit = unit;
-            return self();
-        }
-
-        public B withHelp(String help) {
-            this.help = help;
-            return self();
-        }
-
         // ConstLabels are only used rarely. In particular, do not use them to
         // attach the same labels to all your metrics. Those use cases are
         // better covered by target labels set by the scraping Prometheusu}(j/  (df206f84d9b4aabfc85564523de13af8f349b5eejh/  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajj/  addedjb/  KLjc/  K jl/  KLjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,76 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.util.List;
+
+public abstract class MetricWithFixedMetadata extends Metric {
+
+    private final MetricMetadata metadata;
+
+    protected MetricWithFixedMetadata(Builder<?, ?> builder) {
+        super(builder);
+        this.metadata = new MetricMetadata(makeName(builder.name, builder.unit), builder.help, builder.unit);
+    }
+
+    protected MetricMetadata getMetadata() {
+        return metadata;
+    }
+
+    private String makeName(String name, Unit unit) {
+        if (unit != null) {
+            String suffix = "_" + unit;
+            if (!name.endsWith(suffix)) {
+                name = name + suffix;
+            }
+        }
+        return name;
+    }
+
+    protected static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
+
+        protected String name;
+        private Unit unit;
+        private String help;
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+
+        public B withName(String name) {
+            if (!MetricMetadata.isValidMetricName(name)) {
+                throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
+            }
+            this.name = name;
+            return self();
+        }
+
+        public B withUnit(Unit unit) {
+            this.unit = unit;
+            return self();
+        }
+
+        public B withHelp(String help) {
+            this.help = help;
+            return self();
+        }
+
+        public abstract M build();
+
+        /*
+        public M register() {
+            return register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public M register(PrometheusRegistry registry) {
+            M metric = build();
+            registry.register(metric);
+            return metric;
+        }
+         */
+
+        protected abstract B self();
+    }
+}u}(j/  (8ff3e2c75386af1fcf7a5c8b2ade982409448158jh/  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/ObservingMetric.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -2,8 +2,8 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.core.observer.Observer;
 
 import java.util.ArrayList;
@@ -16,7 +16,7 @@
 import static java.lang.Boolean.FALSE;
 import static java.lang.Boolean.TRUE;
 
-public abstract class ObservingMetric<O extends Observer, V extends MetricData<O>> extends Metric {
+public abstract class ObservingMetric<O extends Observer, V extends MetricData<O>> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
@@ -42,7 +42,7 @@ protected ObservingMetric(Builder<?, ?> builder) {
      */
     protected abstract MetricSnapshot collect(List<Labels> labels, List<V> metricData);
 
-    public io.prometheus.metrics.model.MetricSnapshot collect() {
+    public MetricSnapshot collect() {
         if (labelNames.length == 0 && data.size() == 0) {
             // This is a metric without labels that has not been used yet. Initialize the data on the fly.
             withLabels();
@@ -125,7 +125,7 @@ protected boolean hasSpanContextSupplier() {
     }
      */
 
-    static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?,?>> extends Metric.Builder<B, M> {
+    static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?,?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;
 u}(j/  (5beef66a9d6467acc44ef4e578de7942aaec4eb3jh/  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -2,8 +2,8 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.core.observer.StateObserver;
 
 import java.util.ArrayList;u}(j/  (12e5eccc7db5f451da0c64ddc907a58a9ce166b6jh/  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -2,11 +2,11 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.Quantile;
-import io.prometheus.metrics.model.Quantiles;
-import io.prometheus.metrics.model.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.core.observer.DistributionObserver;
 
 import java.util.ArrayList;u}(j/  (800ae4ea20fbff722453dd7ba29715804f2760abjh/  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DiscreteEventObserver.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.observer;
 
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Labels;
 
 public interface DiscreteEventObserver extends Observer {
 u}(j/  (7112c297c0d6b8566c1950d5597310141559cdf5jh/  cprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DistributionObserver.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.observer;
 
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Labels;
 
 import java.util.concurrent.Callable;
 u}(j/  (b4129c93bf2e7e34a17164671c65dc6f70a7aa06jh/  ^prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/GaugingObserver.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.observer;
 
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Labels;
 
 public interface GaugingObserver extends Observer {
 u}(j/  (937c5959c1c40c70e36ecbdee3bcc9410a198b16jh/  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/registry/Collector.javajj/  removedjb/  K jc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.javajo/  https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjs/  X  @@ -1,17 +0,0 @@
-package io.prometheus.metrics.core.registry;
-
-import io.prometheus.metrics.model.MetricSnapshots;
-
-/**
- * To be registered with the Prometheus collector registry.
- * See <i>Overall Structure</i> on
- * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
- */
-@FunctionalInterface
-public interface Collector {
-
-    /**
-     * Called when the Prometheus server scrapes metrics.
-     */
-    MetricSnapshots collect();
-}u}(j/  (8390b93a8848405a533a49ceed58ddb0a3f16c1bjh/  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/registry/PrometheusRegistry.javajj/  removedjb/  K jc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.javajo/  https://github.com/prometheus/client_java/raw/6f4ff476b27ac96d84ab25f111b5b6f29c4b58ac/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.java?ref=6f4ff476b27ac96d84ab25f111b5b6f29c4b58acjs/  XH  @@ -1,15 +0,0 @@
-package io.prometheus.metrics.core.registry;
-
-import io.prometheus.metrics.core.metrics.Metric;
-import io.prometheus.metrics.model.Labels;
-
-public class PrometheusRegistry {
-    public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
-    public void register(Metric metric) {}
-    public void register(Collector collector) {}
-
-    public void unregister(Metric metric) {}
-    public void unregister(Collector collector) {}
-    public void unregister(String name) {}
-    public void unregister(String name, Labels labels) {}
-}u}(j/  (24882065e45e4858ab4effaa4916b86015ea8c9ejh/  cprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerTest.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,9 +1,9 @@
 package io.prometheus.metrics.core.exemplars;
 
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.Label;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Label;
 import io.prometheus.metrics.core.util.Scheduler;
 import org.junit.After;
 import org.junit.Assert;u}(j/  (e7be758b82c5e25400cb7a0ac9b14a9168760f86jh/  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -6,10 +6,10 @@
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.tracer.common.SpanContext;
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.Unit;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;u}(j/  (1cf0cb14e1e8ad3c644561de0f29dc70c9d377e4jh/  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  Xx  @@ -3,9 +3,9 @@
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.tracer.common.SpanContext;
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.core.observer.Timer;
 import org.junit.After;
 import org.junit.Assert;u}(j/  (1d50e6c90b62ae0fc18f1b6ce3a46107bc15c788jh/  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajj/  modifiedjb/  Kjc/  Kjl/  K
jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X{  @@ -6,11 +6,11 @@
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.tracer.common.SpanContext;
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
-import io.prometheus.metrics.model.ClassicHistogramBucket;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.core.observer.DistributionObserver;
 import org.junit.After;
 import org.junit.Assert;u}(j/  (e287ef69339ac971113afc6ac4b39de4216baee0jh/  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  Xs  @@ -1,8 +1,7 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.core.metrics.Info;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 u}(j/  (64f4056fb4a1f1290c9b5326f62d0f27374288f8jh/  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,8 +1,7 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.core.metrics.StateSet;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 u}(j/  (489bcac335a186d9d220a1b4bd74329e5bbb5d4fjh/  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TestUtil.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplar;
 import org.junit.Assert;
 
 public class TestUtil {u}(j/  (3f2cd8f11cf57f3790c3a37bf51077f8fbd4b84ajh/  .prometheus-metrics-exporter-httpserver/pom.xmljj/  addedjb/  KAjc/  K jl/  KAjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fpom.xmljo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fpom.xmljq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>0.16.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Java Simpleclient Httpserver</name>
+    <description>
+        Httpserver exposition for the simpleclient.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>0.16.1-SNAPSHOT</version>
+        </dependency>
+        <!-- Test Dependencies Follow -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <version>3.23.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.4.0-b180830.0359</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j/  (0a290c7427efd5c34f8b920baea7af3d4251c25ejh/  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajj/  addedjb/  Mjc/  K jl/  Mjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X2T  @@ -0,0 +1,516 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.client.CollectorRegistry;
+import io.prometheus.client.Predicate;
+import io.prometheus.client.SampleNameFilter;
+import io.prometheus.client.Supplier;
+import io.prometheus.client.exporter.common.TextFormat;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.URLDecoder;
+import java.nio.charset.Charset;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Supplier;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = new HTTPServer(1234);
+ * }
+ * </pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue()
+        {
+            return new ByteArrayOutputStream(1 << 20);
+        }
+    }
+
+    /**
+     * Handles Metrics collections from the given registry.
+     */
+    public static class HTTPMetricHandler implements HttpHandler {
+        private final Supplier<MetricSnapshots> registry;
+        private final LocalByteArray response = new LocalByteArray();
+        private final Supplier<Predicate<String>> sampleNameFilterSupplier;
+        private final static String HEALTHY_RESPONSE = "Exporter is Healthy.";
+
+        public HTTPMetricHandler(CollectorRegistry registry) {
+            this(registry, null);
+        }
+
+        public HTTPMetricHandler(CollectorRegistry registry, Supplier<Predicate<String>> sampleNameFilterSupplier) {
+            this.registry = registry;
+            this.sampleNameFilterSupplier = sampleNameFilterSupplier;
+        }
+
+        @Override
+        public void handle(HttpExchange t) throws IOException {
+            String query = t.getRequestURI().getRawQuery();
+            String contextPath = t.getHttpContext().getPath();
+            ByteArrayOutputStream response = this.response.get();
+            response.reset();
+            OutputStreamWriter osw = new OutputStreamWriter(response, Charset.forName("UTF-8"));
+            if ("/-/healthy".equals(contextPath)) {
+                osw.write(HEALTHY_RESPONSE);
+            } else {
+                String contentType = TextFormat.chooseContentType(t.getRequestHeaders().getFirst("Accept"));
+                t.getResponseHeaders().set("Content-Type", contentType);
+                Predicate<String> filter = sampleNameFilterSupplier == null ? null : sampleNameFilterSupplier.get();
+                filter = SampleNameFilter.restrictToNamesEqualTo(filter, parseQuery(query));
+                if (filter == null) {
+                    TextFormat.writeFormat(contentType, osw, registry.metricFamilySamples());
+                } else {
+                    TextFormat.writeFormat(contentType, osw, registry.filteredMetricFamilySamples(filter));
+                }
+            }
+
+            osw.close();
+
+            if (shouldUseCompression(t)) {
+                t.getResponseHeaders().set("Content-Encoding", "gzip");
+                t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
+                final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
+                try {
+                    response.writeTo(os);
+                } finally {
+                    os.close();
+                }
+            } else {
+                long contentLength = response.size();
+                if (contentLength > 0) {
+                    t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
+                }
+                if (t.getRequestMethod().equals("HEAD")) {
+                    contentLength = -1;
+                }
+                t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
+                response.writeTo(t.getResponseBody());
+            }
+            t.close();
+        }
+    }
+
+    protected static boolean shouldUseCompression(HttpExchange exchange) {
+        List<String> encodingHeaders = exchange.getRequestHeaders().get("Accept-Encoding");
+        if (encodingHeaders == null) return false;
+
+        for (String encodingHeader : encodingHeaders) {
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    protected static Set<String> parseQuery(String query) throws IOException {
+        Set<String> names = new HashSet<String>();
+        if (query != null) {
+            String[] pairs = query.split("&");
+            for (String pair : pairs) {
+                int idx = pair.indexOf("=");
+                if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals("name[]")) {
+                    names.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                }
+            }
+        }
+        return names;
+    }
+
+
+    static class NamedDaemonThreadFactory implements ThreadFactory {
+        private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+
+        private final int poolNumber = POOL_NUMBER.getAndIncrement();
+        private final AtomicInteger threadNumber = new AtomicInteger(1);
+        private final ThreadFactory delegate;
+        private final boolean daemon;
+
+        NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+            this.delegate = delegate;
+            this.daemon = daemon;
+        }
+
+        @Override
+        public Thread newThread(Runnable r) {
+            Thread t = delegate.newThread(r);
+            t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+            t.setDaemon(daemon);
+            return t;
+        }
+
+        static ThreadFactory defaultThreadFactory(boolean daemon) {
+            return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    /**
+     * We keep the original constructors of {@link HTTPServer} for compatibility, but new configuration
+     * parameters like {@code sampleNameFilter} must be configured using the Builder.
+     */
+    public static class Builder {
+
+        private int port = 0;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private HttpServer httpServer = null;
+        private ExecutorService executorService = null;
+        private CollectorRegistry registry = CollectorRegistry.defaultRegistry;
+        private boolean daemon = false;
+        private Predicate<String> sampleNameFilter;
+        private Supplier<Predicate<String>> sampleNameFilterSupplier;
+        private Authenticator authenticator;
+        private HttpsConfigurator httpsConfigurator;
+
+        /**
+         * Port to bind to. Must not be called together with {@link #withInetSocketAddress(InetSocketAddress)}
+         * or {@link #withHttpServer(HttpServer)}. Default is 0, indicating that a random port will be selected.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to. Must not be called together with
+         * {@link #withInetAddress(InetAddress)} or {@link #withInetSocketAddress(InetSocketAddress)}
+         * or {@link #withHttpServer(HttpServer)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address. Must not be called together with {@link #withHostname(String)} or
+         * {@link #withInetSocketAddress(InetSocketAddress)} or {@link #withHttpServer(HttpServer)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Listen on this address. Must not be called together with {@link #withPort(int)},
+         * {@link #withHostname(String)}, {@link #withInetAddress(InetAddress)}, or {@link #withHttpServer(HttpServer)}.
+         */
+        public Builder withInetSocketAddress(InetSocketAddress address) {
+            this.inetSocketAddress = address;
+            return this;
+        }
+
+        /**
+         * Use this httpServer. The {@code httpServer} is expected to already be bound to an address.
+         * Must not be called together with {@link #withPort(int)}, or {@link #withHostname(String)},
+         * or {@link #withInetAddress(InetAddress)}, or {@link #withInetSocketAddress(InetSocketAddress)},
+         * or {@link #withExecutorService(ExecutorService)}.
+         */
+        public Builder withHttpServer(HttpServer httpServer) {
+            this.httpServer = httpServer;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         * Must not be called together with the {@link #withHttpServer(HttpServer)}.
+         *
+         * @param executorService
+         * @return
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * By default, the {@link HTTPServer} uses non-daemon threads. Set this to {@code true} to
+         * run the {@link HTTPServer} with daemon threads.
+         */
+        public Builder withDaemonThreads(boolean daemon) {
+            this.daemon = daemon;
+            return this;
+        }
+
+        /**
+         * Optional: Only export time series where {@code sampleNameFilter.test(name)} returns true.
+         * <p>
+         * Use this if the sampleNameFilter remains the same throughout the lifetime of the HTTPServer.
+         * If the sampleNameFilter changes during runtime, use {@link #withSampleNameFilterSupplier(Supplier)}.
+         */
+        public Builder withSampleNameFilter(Predicate<String> sampleNameFilter) {
+            this.sampleNameFilter = sampleNameFilter;
+            return this;
+        }
+
+        /**
+         * Optional: Only export time series where {@code sampleNameFilter.test(name)} returns true.
+         * <p>
+         * Use this if the sampleNameFilter may change during runtime, like for example if you have a
+         * hot reload mechanism for your filter config.
+         * If the sampleNameFilter remains the same throughout the lifetime of the HTTPServer,
+         * use {@link #withSampleNameFilter(Predicate)} instead.
+         */
+        public Builder withSampleNameFilterSupplier(Supplier<Predicate<String>> sampleNameFilterSupplier) {
+            this.sampleNameFilterSupplier = sampleNameFilterSupplier;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link CollectorRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(CollectorRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} to use to support authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} to use to support TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build the HTTPServer
+         * @throws IOException
+         */
+        public HTTPServer build() throws IOException {
+            if (sampleNameFilter != null) {
+                assertNull(sampleNameFilterSupplier, "cannot configure 'sampleNameFilter' and 'sampleNameFilterSupplier' at the same time");
+                sampleNameFilterSupplier = SampleNameFilterSupplier.of(sampleNameFilter);
+            }
+
+            if (httpServer != null) {
+                assertNull(executorService, "cannot configure 'httpServer' and `executorService'");
+                assertZero(port, "cannot configure 'httpServer' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'httpServer' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'httpServer' and 'inetAddress' at the same time");
+                assertNull(inetSocketAddress, "cannot configure 'httpServer' and 'inetSocketAddress' at the same time");
+                assertNull(httpsConfigurator, "cannot configure 'httpServer' and 'httpsConfigurator' at the same time");
+                return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilterSupplier, authenticator);
+            } else if (inetSocketAddress != null) {
+                assertZero(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                inetSocketAddress = new InetSocketAddress(inetAddress, port);
+            } else if (hostname != null) {
+                inetSocketAddress = new InetSocketAddress(hostname, port);
+            } else {
+                inetSocketAddress = new InetSocketAddress(port);
+            }
+
+            HttpServer httpServer = null;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(inetSocketAddress, 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(inetSocketAddress, 3);
+            }
+
+            return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilterSupplier, authenticator);
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+
+        private void assertZero(int i, String msg) {
+            if (i != 0) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+
+    /**
+     * Start an HTTP server serving Prometheus metrics from the given registry using the given {@link HttpServer}.
+     * The {@code httpServer} is expected to already be bound to an address
+     */
+    public HTTPServer(HttpServer httpServer, CollectorRegistry registry, boolean daemon) throws IOException {
+        this(null, httpServer, registry, daemon, null, null);
+    }
+
+    /**
+     * Start an HTTP server serving Prometheus metrics from the given registry.
+     */
+    public HTTPServer(InetSocketAddress addr, CollectorRegistry registry, boolean daemon) throws IOException {
+        this(HttpServer.create(addr, 3), registry, daemon);
+    }
+
+    /**
+     * Start an HTTP server serving Prometheus metrics from the given registry using non-daemon threads.
+     */
+    public HTTPServer(InetSocketAddress addr, CollectorRegistry registry) throws IOException {
+        this(addr, registry, false);
+    }
+
+    /**
+     * Start an HTTP server serving the default Prometheus registry.
+     */
+    public HTTPServer(int port, boolean daemon) throws IOException {
+        this(new InetSocketAddress(port), CollectorRegistry.defaultRegistry, daemon);
+    }
+
+    /**
+     * Start an HTTP server serving the default Prometheus registry using non-daemon threads.
+     */
+    public HTTPServer(int port) throws IOException {
+        this(port, false);
+    }
+
+    /**
+     * Start an HTTP server serving the default Prometheus registry.
+     */
+    public HTTPServer(String host, int port, boolean daemon) throws IOException {
+        this(new InetSocketAddress(host, port), CollectorRegistry.defaultRegistry, daemon);
+    }
+
+    /**
+     * Start an HTTP server serving the default Prometheus registry using non-daemon threads.
+     */
+    public HTTPServer(String host, int port) throws IOException {
+        this(new InetSocketAddress(host, port), CollectorRegistry.defaultRegistry, false);
+    }
+
+    private HTTPServer(ExecutorService executorService, HttpServer httpServer, CollectorRegistry registry, boolean daemon, Supplier<Predicate<String>> sampleNameFilterSupplier, Authenticator authenticator) {
+        if (httpServer.getAddress() == null)
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+
+        server = httpServer;
+        HttpHandler mHandler = new HTTPMetricHandler(registry, sampleNameFilterSupplier);
+        HttpContext mContext = server.createContext("/", mHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        mContext = server.createContext("/metrics", mHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        mContext = server.createContext("/-/healthy", mHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        if (executorService != null) {
+            this.executorService = executorService;
+        } else {
+            ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(daemon));
+            executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+            this.executorService = executor;
+        }
+        server.setExecutor(this.executorService);
+        start(daemon);
+    }
+
+    /**
+     * Start an HTTP server by making sure that its background thread inherit proper daemon flag.
+     */
+    private void start(boolean daemon) {
+        if (daemon == Thread.currentThread().isDaemon()) {
+            server.start();
+        } else {
+            FutureTask<Void> startTask = new FutureTask<Void>(new Runnable() {
+                @Override
+                public void run() {
+                    server.start();
+                }
+            }, null);
+            NamedDaemonThreadFactory.defaultThreadFactory(daemon).newThread(startTask).start();
+            try {
+                startTask.get();
+            } catch (ExecutionException e) {
+                throw new RuntimeException("Unexpected exception on starting HTTPSever", e);
+            } catch (InterruptedException e) {
+                // This is possible only if the current tread has been interrupted,
+                // but in real use cases this should not happen.
+                // In any case, there is nothing to do, except to propagate interrupted flag.
+                Thread.currentThread().interrupt();
+            }
+        }
+    }
+
+    /**
+     * Stop the HTTP server.
+     * @deprecated renamed to close(), so that the HTTPServer can be used in try-with-resources.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+}u      }(j/  (6ac0ec0f91e52441f54473ccc39568617e4901dajh/  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javajj/  addedjb/  KQjc/  K jl/  KQjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,81 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue()
+        {
+            return new ByteArrayOutputStream(1 << 20); // 1 MB
+        }
+    }
+
+    private final Supplier<MetricSnapshots> registry;
+    private final LocalByteArray response = new LocalByteArray();
+    private final Supplier<Predicate<String>> sampleNameFilterSupplier;
+
+    public MetricsHandler(Supplier<MetricSnapshots> registry) {
+        this(registry, null);
+    }
+
+    public MetricsHandler(Supplier<MetricSnapshots> registry, Supplier<Predicate<String>> sampleNameFilterSupplier) {
+        this.registry = registry;
+        this.sampleNameFilterSupplier = sampleNameFilterSupplier;
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        String query = t.getRequestURI().getRawQuery();
+        String contextPath = t.getHttpContext().getPath();
+        ByteArrayOutputStream response = this.response.get();
+        response.reset();
+        OutputStreamWriter osw = new OutputStreamWriter(response, Charset.forName("UTF-8"));
+            String contentType = TextFormat.chooseContentType(t.getRequestHeaders().getFirst("Accept"));
+            t.getResponseHeaders().set("Content-Type", contentType);
+            Predicate<String> filter = sampleNameFilterSupplier == null ? null : sampleNameFilterSupplier.get();
+            filter = SampleNameFilter.restrictToNamesEqualTo(filter, parseQuery(query));
+            if (filter == null) {
+                TextFormat.writeFormat(contentType, osw, registry.metricFamilySamples());
+            } else {
+                TextFormat.writeFormat(contentType, osw, registry.filteredMetricFamilySamples(filter));
+            }
+
+        osw.close();
+
+        if (shouldUseCompression(t)) {
+            t.getResponseHeaders().set("Content-Encoding", "gzip");
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
+            final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
+            try {
+                response.writeTo(os);
+            } finally {
+                os.close();
+            }
+        } else {
+            long contentLength = response.size();
+            if (contentLength > 0) {
+                t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
+            }
+            if (t.getRequestMethod().equals("HEAD")) {
+                contentLength = -1;
+            }
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
+            response.writeTo(t.getResponseBody());
+        }
+        t.close();
+    }
+}u}(j/  (69078be5e8dda8aa8518d2498b2eab781329c021jh/  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/SampleNameFilterSupplier.javajj/  addedjb/  Kjc/  K jl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X6  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import io.prometheus.client.Predicate;
+import io.prometheus.client.Supplier;
+
+/**
+ * For convenience, an implementation of a {@code Supplier<Predicate<String>>} that
+ * always returns the same sampleNameFilter.
+ */
+public class SampleNameFilterSupplier implements Supplier<Predicate<String>> {
+
+    private final Predicate<String> sampleNameFilter;
+
+    public static SampleNameFilterSupplier of(Predicate<String> sampleNameFilter) {
+        return new SampleNameFilterSupplier(sampleNameFilter);
+    }
+
+    private SampleNameFilterSupplier(Predicate<String> sampleNameFilter) {
+        this.sampleNameFilter = sampleNameFilter;
+    }
+
+    @Override
+    public Predicate<String> get() {
+        return sampleNameFilter;
+    }
+}u}(j/  (84c4d15f7facdfa96c6596d9c9305cc0a9a86e94jh/  gprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/ExampleExporter.javajj/  addedjb/  Kjc/  K jl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,24 @@
+package io.prometheus.client.exporter;
+
+import io.prometheus.client.Counter;
+import io.prometheus.client.Gauge;
+import io.prometheus.client.Histogram;
+import io.prometheus.client.Summary;
+
+public class ExampleExporter {
+
+    static final Gauge g = Gauge.build().name("gauge").help("blah").register();
+    static final Counter c = Counter.build().name("counter").help("meh").register();
+    static final Summary s = Summary.build().name("summary").help("meh").register();
+    static final Histogram h = Histogram.build().name("histogram").help("meh").register();
+    static final Gauge l = Gauge.build().name("labels").help("blah").labelNames("l").register();
+
+    public static void main(String[] args) throws Exception {
+        new HTTPServer(1234);
+        g.set(1);
+        c.inc(2);
+        s.observe(3);
+        h.observe(4);
+        l.labels("foo").inc(5);
+    }
+}u}(j/  (5b7865de41003b50caf712ac139cff5b9ea393c9jh/  cprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/HttpRequest.javajj/  addedjb/  Kjc/  K jl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  Xw  @@ -0,0 +1,244 @@
+package io.prometheus.client.exporter;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.xml.bind.DatatypeConverter;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.GeneralSecurityException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+import java.util.Set;
+
+/**
+ * Class to perform HTTP testing
+ */
+public class HttpRequest {
+
+    enum METHOD { GET, HEAD }
+
+    private final Configuration configuration;
+
+    /**
+     * Constructor
+     *
+     * @param configuration configuration
+     */
+    private HttpRequest(Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Method to execute an HTTP request
+     *
+     * @return HttpResponse
+     * @throws IOException
+     */
+    public HttpResponse execute() throws IOException {
+        if (configuration.url.toLowerCase().startsWith("https://") && (configuration.trustManagers != null)) {
+            try {
+                SSLContext sslContext = SSLContext.getInstance("SSL");
+                sslContext.init(null, configuration.trustManagers, new java.security.SecureRandom());
+                HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
+            } catch (GeneralSecurityException e) {
+                throw new IOException(e);
+            }
+
+            if (configuration.hostnameVerifier != null) {
+                HttpsURLConnection.setDefaultHostnameVerifier(configuration.hostnameVerifier);
+            }
+        }
+
+        URLConnection urlConnection = new URL(configuration.url).openConnection();
+        ((HttpURLConnection) urlConnection).setRequestMethod(configuration.method.toString());
+
+        Set<Map.Entry<String, List<String>>> entries = configuration.headers.entrySet();
+        for (Map.Entry<String, List<String>> entry : entries) {
+            for (String value : entry.getValue()) {
+                urlConnection.addRequestProperty(entry.getKey(), value);
+            }
+        }
+
+        urlConnection.setUseCaches(false);
+        urlConnection.setDoInput(true);
+        urlConnection.setDoOutput(true);
+        urlConnection.connect();
+
+        Scanner scanner = new Scanner(urlConnection.getInputStream(), "UTF-8").useDelimiter("\\A");
+
+        return new HttpResponse(
+                ((HttpURLConnection) urlConnection).getResponseCode(),
+                urlConnection.getHeaderFields(),
+                        urlConnection.getContentLength(), scanner.hasNext() ? scanner.next() : "");
+    }
+
+    /**
+     * Class to build an HttpRequest
+     */
+    static class Builder {
+
+        private final Configuration configuration;
+
+        /**
+         * Constructor
+         */
+        public Builder() {
+            configuration = new Configuration();
+        }
+
+        /**
+         * Method to set the HTTP request method
+         *
+         * @param method
+         * @return Builder
+         */
+        public Builder withMethod(METHOD method) {
+            configuration.method = method;
+            return this;
+        }
+
+        /**
+         * Method to set the HTTP request URL
+         *
+         * @param url
+         * @return Builder
+         */
+        public Builder withURL(String url) {
+            configuration.url = url;
+            return this;
+        }
+
+        /**
+         * Method to add an HTTP request header
+         *
+         * @param name
+         * @param value
+         * @return Builder
+         */
+        public Builder withHeader(String name, String value) {
+            configuration.addHeader(name, value);
+            return this;
+        }
+
+        /**
+         * Method to set the HTTP request "Authorization" header
+         *
+         * @param username
+         * @param password
+         * @return Builder
+         */
+        public Builder withAuthorization(String username, String password) {
+            configuration.setHeader("Authorization", encodeCredentials(username, password));
+            return this;
+        }
+
+        /**
+         * Method to set the HTTP request trust managers when using an SSL URL
+         *
+         * @param trustManagers
+         * @return Builder
+         */
+        public Builder withTrustManagers(TrustManager[] trustManagers) {
+            configuration.trustManagers = trustManagers;
+            return this;
+        }
+
+        /**
+         * Method to set the HTTP request hostname verifier when using an SSL URL
+         *
+         * @param hostnameVerifier
+         * @return Builder
+         */
+        public Builder withHostnameVerifier(HostnameVerifier hostnameVerifier) {
+            configuration.hostnameVerifier = hostnameVerifier;
+            return this;
+        }
+
+        /**
+         * Method to build the HttpRequest
+         *
+         * @return HttpRequest
+         */
+        public HttpRequest build() {
+            return new HttpRequest(configuration);
+        }
+    }
+
+    /**
+     * Class used for Builder configuration
+     */
+    private static class Configuration {
+
+        public METHOD method;
+        public String url;
+        public Map<String, List<String>> headers;
+        public TrustManager[] trustManagers;
+        public HostnameVerifier hostnameVerifier;
+
+        /**
+         * Constructor
+         */
+        Configuration() {
+            method = METHOD.GET;
+            headers = new HashMap<String, List<String>>();
+        }
+
+        /**
+         * Method to add (append) an HTTP request header
+         *
+         * @param name
+         * @param value
+         * @return Configuration
+         */
+        void addHeader(String name, String value) {
+            name = name.toLowerCase();
+            List<String> values = headers.get(name);
+            if (values == null) {
+                values = new LinkedList<String>();
+                headers.put(name, values);
+            }
+
+            values.add(value);
+        }
+
+        /**
+         * Method to set (overwrite) an HTTP request header, removing all previous header values
+         *
+         * @param name
+         * @param value
+         * @return Configuration
+         */
+        void setHeader(String name, String value) {
+            List<String> values = new LinkedList<String>();
+            values.add(value);
+            headers.put(name, values);
+        }
+    }
+
+    /**
+     * Method to encode "Authorization" credentials
+     *
+     * @param username
+     * @param password
+     * @return String
+     */
+    private final static String encodeCredentials(String username, String password) {
+        // Per RFC4648 table 2. We support Java 6, and java.util.Base64 was only added in Java 8,
+        try {
+            byte[] credentialsBytes = (username + ":" + password).getBytes("UTF-8");
+            return "Basic " + DatatypeConverter.printBase64Binary(credentialsBytes);
+        } catch (UnsupportedEncodingException e) {
+            throw new IllegalArgumentException(e);
+        }
+    }
+}u}(j/  (9ad49be415c755fc3f16d1c2926a9feae5b9eae9jh/  dprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/HttpResponse.javajj/  addedjb/  Kmjc/  K jl/  Kmjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,109 @@
+package io.prometheus.client.exporter;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Class to perform HTTP testing
+ */
+class HttpResponse {
+
+    private int responseCode;
+    private Map<String, List<String>> headers;
+    private long contentLength = -1;
+    private String body;
+
+    /**
+     * Constructor
+     *
+     * @param responseCode
+     * @param headers
+     * @param contentLength
+     * @param body
+     */
+    HttpResponse(int responseCode, Map<String, List<String>> headers, long contentLength, String body) throws IOException {
+        this.responseCode = responseCode;
+        this.body = body;
+        this.contentLength = contentLength;
+        this.headers = new HashMap<String, List<String>>();
+
+        Set<Map.Entry<String, List<String>>> headerSet = headers.entrySet();
+        for (String header : headers.keySet()) {
+            if (header != null) {
+                List<String> values = headers.get(header);
+                this.headers.put(header.toLowerCase(), values);
+            }
+        }
+
+        if (getHeader("content-length") != null && getHeader("transfer-encoding") != null) {
+            throw new IOException("Invalid HTTP response, should only contain Connect-Length or Transfer-Encoding");
+        }
+    }
+
+    /**
+     * Method to get the HTTP response code
+     *
+     * @return int
+     */
+    public int getResponseCode() {
+        return this.responseCode;
+    }
+
+    /**
+     * Method to get a list of HTTP response headers values
+     *
+     * @param name
+     * @return List<String>
+     */
+    public List<String> getHeaderList(String name) {
+        return headers.get(name.toLowerCase());
+    }
+
+    /**
+     * Method to get the first HTTP response header value
+     *
+     * @param name
+     * @return String
+     */
+    public String getHeader(String name) {
+        String value = null;
+
+        List<String> valueList = getHeaderList(name);
+        if (valueList != null && (valueList.size() >= 0)) {
+            value = valueList.get(0);
+        }
+
+        return value;
+    }
+
+    /**
+     * Method to get the first HTTP response header value as a Long.
+     * Returns null of the header doesn't exist
+     *
+     * @param name
+     * @return Long
+     */
+    public Long getHeaderAsLong(String name) {
+        String value = getHeader(name);
+        if (value != null) {
+            try {
+                return Long.valueOf(value);
+            } catch (Exception e) {
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Method to get the HTTP response body
+     *
+     * @return String
+     */
+    public String getBody() {
+        return body;
+    }
+}u}(j/  (aaddd5e2239c79e0806c4ecf0745bd1ce3e05831jh/  gprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/TestDaemonFlags.javajj/  addedjb/  K+jc/  K jl/  K+jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,43 @@
+package io.prometheus.client.exporter;
+
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.FutureTask;
+
+import static org.assertj.core.api.Java6Assertions.assertThat;
+
+public class TestDaemonFlags {
+
+    @Test
+    public void testDefaultIsNotDaemon() throws IOException, ExecutionException, InterruptedException {
+        assertThat(usesDaemonExecutor(new HTTPServer(0))).isFalse();
+    }
+
+    @Test
+    public void testDaemon() throws IOException, ExecutionException, InterruptedException {
+        assertThat(usesDaemonExecutor(new HTTPServer(0, true))).isTrue();
+    }
+
+    @Test
+    public void testNonDaemon() throws IOException, ExecutionException, InterruptedException {
+        assertThat(usesDaemonExecutor(new HTTPServer(0, false))).isFalse();
+    }
+
+    private boolean usesDaemonExecutor(HTTPServer httpServer) throws IOException, InterruptedException, ExecutionException {
+        try {
+            FutureTask<Boolean> task = new FutureTask<Boolean>(new Callable<Boolean>() {
+                @Override
+                public Boolean call() throws Exception {
+                    return Thread.currentThread().isDaemon();
+                }
+            });
+            httpServer.server.getExecutor().execute(task);
+            return task.get();
+        } finally {
+            httpServer.stop();
+        }
+    }
+}u}(j/  (2b18f4e829c4c65de610cdf23149e52c8410bb50jh/  fprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/TestHTTPServer.javajj/  addedjb/  Mbjc/  K jl/  Mbjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  XS  @@ -0,0 +1,610 @@
+package io.prometheus.client.exporter;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.BasicAuthenticator;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsParameters;
+import io.prometheus.client.CollectorRegistry;
+import io.prometheus.client.Gauge;
+import io.prometheus.client.SampleNameFilter;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+import javax.xml.bind.DatatypeConverter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.InetSocketAddress;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.cert.X509Certificate;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import static org.assertj.core.api.Java6Assertions.assertThat;
+
+public class TestHTTPServer {
+
+  CollectorRegistry registry;
+
+  private final static SSLContext SSL_CONTEXT;
+
+  private final static HttpsConfigurator HTTPS_CONFIGURATOR;
+
+  // Code put in a static block due to possible Exceptions
+  static {
+    try {
+      SSL_CONTEXT = createSSLContext(
+              "SSL",
+              "PKCS12",
+              "./src/test/resources/keystore.pkcs12",
+              "changeit");
+    } catch (GeneralSecurityException e) {
+      throw new RuntimeException("Exception creating SSL_CONTEXT", e);
+    } catch (IOException e) {
+      throw new RuntimeException("Exception creating SSL_CONTEXT", e);
+    }
+
+    HTTPS_CONFIGURATOR = createHttpsConfigurator(SSL_CONTEXT);
+  }
+
+  /**
+   * TrustManager[] that trusts all certificates
+   */
+  private final static TrustManager[] TRUST_ALL_CERTS_TRUST_MANAGERS = new TrustManager[]{
+          new X509TrustManager() {
+            public X509Certificate[] getAcceptedIssuers() {
+              return new X509Certificate[0];
+            }
+
+            public void checkClientTrusted(X509Certificate[] certs, String authType) {
+            }
+
+            public void checkServerTrusted(X509Certificate[] certs, String authType) {
+            }
+          }
+  };
+
+  /**
+   * HostnameVerifier that accepts any hostname
+   */
+  private final static HostnameVerifier TRUST_ALL_HOSTS_HOSTNAME_VERIFIER = new HostnameVerifier() {
+    @Override
+    public boolean verify(String hostname, SSLSession session) {
+      return true;
+    }
+  };
+
+  HttpRequest.Builder createHttpRequestBuilder(HTTPServer httpServer, String urlPath) {
+    return new HttpRequest.Builder().withURL("http://localhost:" + httpServer.getPort() + urlPath);
+  }
+
+  HttpRequest.Builder createHttpRequestBuilderWithSSL(HTTPServer httpServer, String urlPath) {
+    return new HttpRequest.Builder().withURL("https://localhost:" + httpServer.getPort() + urlPath)
+            .withTrustManagers(TRUST_ALL_CERTS_TRUST_MANAGERS)
+            .withHostnameVerifier(TRUST_ALL_HOSTS_HOSTNAME_VERIFIER);
+  }
+
+  HttpRequest.Builder createHttpRequestBuilder(HttpServer httpServer, String urlPath) {
+    return new HttpRequest.Builder().withURL("http://localhost:" + httpServer.getAddress().getPort() + urlPath);
+  }
+
+  @Before
+  public void init() throws IOException {
+    registry = new CollectorRegistry();
+    Gauge.build("a", "a help").register(registry);
+    Gauge.build("b", "a help").register(registry);
+    Gauge.build("c", "a help").register(registry);
+  }
+
+  @Test(expected = IllegalArgumentException.class)
+  public void testRefuseUsingUnbound() throws IOException {
+    CollectorRegistry registry = new CollectorRegistry();
+    HTTPServer httpServer = new HTTPServer(HttpServer.create(), registry, true);
+    httpServer.close();
+  }
+
+  @Test
+  public void testSimpleRequest() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testBadParams() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?x").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testSingleName() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).doesNotContain("b 0.0");
+      assertThat(body).doesNotContain("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testMultiName() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).doesNotContain("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testSampleNameFilter() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withSampleNameFilter(new SampleNameFilter.Builder()
+                    .nameMustNotStartWith("a")
+                    .build())
+            .build();
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
+      assertThat(body).doesNotContain("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).doesNotContain("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testSampleNameFilterEmptyBody() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withSampleNameFilter(new SampleNameFilter.Builder()
+                    .nameMustNotStartWith("a")
+                    .nameMustNotStartWith("b")
+                    .build())
+            .build();
+
+    try {
+      HttpResponse httpResponse = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute();
+      assertThat(httpResponse.getBody()).isEmpty();
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testDecoding() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?n%61me[]=%61").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).doesNotContain("b 0.0");
+      assertThat(body).doesNotContain("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testGzipCompression() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics")
+              .withHeader("Accept", "gzip")
+              .withHeader("Accept", "deflate")
+              .build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testOpenMetrics() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics")
+              .withHeader("Accept", "application/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1")
+              .build().execute().getBody();
+      assertThat(body).contains("# EOF");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHealth() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/-/healthy").build().execute().getBody();
+      assertThat(body).contains("Exporter is Healthy");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHealthGzipCompression() throws IOException {
+    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/-/healthy")
+              .withHeader("Accept", "gzip")
+              .withHeader("Accept", "deflate")
+              .build().execute().getBody();
+      assertThat(body).contains("Exporter is Healthy");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testBasicAuthSuccess() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
+              .withAuthorization("user", "secret")
+              .build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testBasicAuthCredentialsMissing() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
+      Assert.fail("expected IOException with HTTP 401");
+    } catch (IOException e) {
+      Assert.assertTrue(e.getMessage().contains("401"));
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testBasicAuthWrongCredentials() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
+              .withAuthorization("user", "wrong")
+              .build().execute().getBody();
+      Assert.fail("expected IOException with HTTP 401");
+    } catch (IOException e) {
+      Assert.assertTrue(e.getMessage().contains("401"));
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHEADRequest() throws IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .build();
+
+    try {
+      HttpResponse httpResponse = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
+              .withMethod(HttpRequest.METHOD.HEAD)
+              .build().execute();
+      Assert.assertNotNull(httpResponse);
+      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
+      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
+      assertThat(httpResponse.getBody()).isEmpty();
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHEADRequestWithSSL() throws GeneralSecurityException, IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
+            .build();
+
+    try {
+      HttpResponse httpResponse = createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
+              .withMethod(HttpRequest.METHOD.HEAD)
+              .build().execute();
+      Assert.assertNotNull(httpResponse);
+      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
+      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
+      assertThat(httpResponse.getBody()).isEmpty();
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testSimpleRequestHttpServerWithHTTPMetricHandler() throws IOException {
+    InetSocketAddress inetSocketAddress = new InetSocketAddress("localhost", 0);
+    HttpServer httpServer = HttpServer.create(inetSocketAddress, 0);
+    httpServer.createContext("/metrics", new HTTPServer.HTTPMetricHandler(registry));
+    httpServer.start();
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.stop(0);
+    }
+  }
+
+  @Test
+  public void testHEADRequestWithSSLAndBasicAuthSuccess() throws GeneralSecurityException, IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      HttpResponse httpResponse = createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
+              .withMethod(HttpRequest.METHOD.HEAD)
+              .withAuthorization("user", "secret")
+              .build().execute();
+      Assert.assertNotNull(httpResponse);
+      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
+      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
+      assertThat(httpResponse.getBody()).isEmpty();
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHEADRequestWithSSLAndBasicAuthCredentialsMissing() throws GeneralSecurityException, IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
+              .withMethod(HttpRequest.METHOD.HEAD)
+              .build().execute();
+      Assert.fail("expected IOException with HTTP 401");
+    } catch (IOException e) {
+      Assert.assertTrue(e.getMessage().contains("401"));
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testHEADRequestWithSSLAndBasicAuthWrongCredentials() throws GeneralSecurityException, IOException {
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withRegistry(registry)
+            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
+            .withAuthenticator(createAuthenticator("/", "user", "secret"))
+            .build();
+
+    try {
+      createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
+              .withMethod(HttpRequest.METHOD.HEAD)
+              .withAuthorization("user", "wrong")
+              .build().execute();
+      Assert.fail("expected IOException with HTTP 401");
+    } catch (IOException e) {
+      Assert.assertTrue(e.getMessage().contains("401"));
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test
+  public void testExecutorService() throws IOException {
+    ExecutorService executorService = Executors.newFixedThreadPool(20);
+
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withExecutorService(executorService)
+            .withRegistry(registry)
+            .build();
+
+    Assert.assertEquals(httpServer.executorService, executorService);
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  @Test(expected = IllegalStateException.class)
+  public void testExecutorServiceWithHttpServer() throws IOException {
+    InetSocketAddress inetSocketAddress = new InetSocketAddress("localhost", 0);
+
+    HttpServer externalHttpServer = HttpServer.create(inetSocketAddress, 0);
+    externalHttpServer.createContext("/metrics", new HTTPServer.HTTPMetricHandler(registry));
+    externalHttpServer.start();
+
+    ExecutorService executorService = Executors.newFixedThreadPool(20);
+
+    HTTPServer httpServer = new HTTPServer.Builder()
+            .withExecutorService(executorService)
+            .withHttpServer(externalHttpServer)
+            .withRegistry(registry)
+            .build();
+
+    try {
+      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
+      assertThat(body).contains("a 0.0");
+      assertThat(body).contains("b 0.0");
+      assertThat(body).contains("c 0.0");
+    } finally {
+      httpServer.close();
+    }
+  }
+
+  /**
+   * Encodes authorization credentials
+   *
+   * @param username
+   * @param password
+   * @return String
+   */
+  private final static String encodeCredentials(String username, String password) {
+    // Per RFC4648 table 2. We support Java 6, and java.util.Base64 was only added in Java 8,
+    try {
+      byte[] credentialsBytes = (username + ":" + password).getBytes("UTF-8");
+      return "Basic " +  DatatypeConverter.printBase64Binary(credentialsBytes);
+    } catch (UnsupportedEncodingException e) {
+      throw new IllegalArgumentException(e);
+    }
+  }
+
+  /**
+   * Create an SSLContext
+   *
+   * @param sslContextType
+   * @param keyStoreType
+   * @param keyStorePath
+   * @param keyStorePassword
+   * @return SSLContext
+   * @throws GeneralSecurityException
+   * @throws IOException
+   */
+  private final static SSLContext createSSLContext(String sslContextType, String keyStoreType, String keyStorePath, String keyStorePassword)
+          throws GeneralSecurityException, IOException {
+    SSLContext sslContext = null;
+    FileInputStream fileInputStream = null;
+
+    try {
+      File file = new File(keyStorePath);
+
+      if ((file.exists() == false) || (file.isFile() == false) || (file.canRead() == false)) {
+        throw new IllegalArgumentException("cannot read 'keyStorePath', path = [" + file.getAbsolutePath() + "]");
+      }
+
+      fileInputStream = new FileInputStream(keyStorePath);
+
+      KeyStore keyStore = KeyStore.getInstance(keyStoreType);
+      keyStore.load(fileInputStream, keyStorePassword.toCharArray());
+
+      KeyManagerFactory keyManagerFactor = KeyManagerFactory.getInstance("SunX509");
+      keyManagerFactor.init(keyStore, keyStorePassword.toCharArray());
+
+      TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
+      trustManagerFactory.init(keyStore);
+
+      sslContext = SSLContext.getInstance(sslContextType);
+      sslContext.init(keyManagerFactor.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
+    } finally {
+      if (fileInputStream != null) {
+        try {
+          fileInputStream.close();
+        } catch (IOException e) {
+          // IGNORE
+        }
+      }
+    }
+
+    return sslContext;
+  }
+
+  /**
+   * Creates an Authenticator
+   *
+   * @param realm
+   * @param validUsername
+   * @param validPassword
+   * @return Authenticator
+   */
+  private final static Authenticator createAuthenticator(String realm, final String validUsername, final String validPassword) {
+    return new BasicAuthenticator(realm) {
+      @Override
+      public boolean checkCredentials(String username, String password) {
+        return validUsername.equals(username) && validPassword.equals(password);
+      }
+    };
+  }
+
+  /**
+   * Creates an HttpsConfiguration
+   * 
+   * @param sslContext
+   * @return HttpsConfigurator
+   */
+  private static HttpsConfigurator createHttpsConfigurator(SSLContext sslContext) {
+    return new HttpsConfigurator(sslContext) {
+      @Override
+      public void configure(HttpsParameters params) {
+        try {
+          SSLContext c = getSSLContext();
+          SSLEngine engine = c.createSSLEngine();
+          params.setNeedClientAuth(false);
+          params.setCipherSuites(engine.getEnabledCipherSuites());
+          params.setProtocols(engine.getEnabledProtocols());
+          SSLParameters sslParameters = c.getSupportedSSLParameters();
+          params.setSSLParameters(sslParameters);
+        } catch (Exception e) {
+          throw new RuntimeException("Exception creating HttpsConfigurator", e);
+        }
+      }
+    };
+  }
+}u}(j/  (4e635ac82d941565f32321e720aead0c1fde9fb9jh/  Iprometheus-metrics-exporter-httpserver/src/test/resources/keystore.pkcs12jj/  addedjb/  K jc/  K jl/  K jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12jo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12jq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5u}(j/  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjh/  8prometheus-metrics-exporter-httpserver/version-rules.xmljj/  addedjb/  Kjc/  K jl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j/  (2a61ce0893137cb9ae5b19af56e16dc584577607jh/  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajj/  modifiedjb/  Kjc/  Kjl/  K"jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,22 +1,22 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.model.ClassicHistogramBuckets;
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.DistributionData;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.MetricData;
-import io.prometheus.metrics.model.MetricMetadata;
-import io.prometheus.metrics.model.MetricSnapshot;
-import io.prometheus.metrics.model.MetricSnapshots;
-import io.prometheus.metrics.model.Quantile;
-import io.prometheus.metrics.model.StateSetSnapshot;
-import io.prometheus.metrics.model.SummarySnapshot;
-import io.prometheus.metrics.model.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DistributionData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 
 import java.io.IOException;
 import java.io.OutputStream;u}(j/  (042e26ade6a4d69bede874a8879288b6820ffa3cjh/  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajj/  modifiedjb/  Kjc/  Kjl/  K"jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,23 +1,23 @@
 package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.model.ClassicHistogramBuckets;
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.MetricData;
-import io.prometheus.metrics.model.MetricMetadata;
-import io.prometheus.metrics.model.MetricSnapshot;
-import io.prometheus.metrics.model.MetricSnapshots;
-import io.prometheus.metrics.model.NativeHistogramBuckets;
-import io.prometheus.metrics.model.Quantiles;
-import io.prometheus.metrics.model.StateSetSnapshot;
-import io.prometheus.metrics.model.SummarySnapshot;
-import io.prometheus.metrics.model.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 
 import java.io.IOException;
 import java.io.OutputStream;u}(j/  (2eb576f9b5e348387d709b7ba9b6868ddecb1693jh/  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,19 +1,19 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.ClassicHistogramBuckets;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.MetricData;
-import io.prometheus.metrics.model.MetricMetadata;
-import io.prometheus.metrics.model.MetricSnapshot;
-import io.prometheus.metrics.model.MetricSnapshots;
-import io.prometheus.metrics.model.Quantile;
-import io.prometheus.metrics.model.StateSetSnapshot;
-import io.prometheus.metrics.model.SummarySnapshot;
-import io.prometheus.metrics.model.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 
 import java.io.IOException;
 import java.io.OutputStream;u}(j/  (5bb15c3125a289df669735841e1f8458ed9b3950jh/  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javajj/  modifiedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.model.snapshots.Labels;
 
 import java.io.IOException;
 import java.io.OutputStreamWriter;u}(j/  (d99b31515246fd564b2094ea49a4d007feb1ccc4jh/  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajj/  modifiedjb/  Kjc/  Kjl/  K+jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X1  @@ -1,30 +1,27 @@
 package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
-import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
-import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
-import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.model.CounterSnapshot;
-import io.prometheus.metrics.model.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.ClassicHistogramBuckets;
-import io.prometheus.metrics.model.GaugeSnapshot;
-import io.prometheus.metrics.model.GaugeSnapshot.GaugeData;
-import io.prometheus.metrics.model.HistogramSnapshot;
-import io.prometheus.metrics.model.InfoSnapshot;
-import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.model.MetricSnapshot;
-import io.prometheus.metrics.model.MetricSnapshots;
-import io.prometheus.metrics.model.NativeHistogramBuckets;
-import io.prometheus.metrics.model.Quantiles;
-import io.prometheus.metrics.model.StateSetSnapshot;
-import io.prometheus.metrics.model.SummarySnapshot;
-import io.prometheus.metrics.model.SummarySnapshot.SummaryData;
-import io.prometheus.metrics.model.Unit;
-import io.prometheus.metrics.model.UnknownSnapshot;
-import io.prometheus.metrics.model.UnknownSnapshot.UnknownData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryData;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownData;
 import org.junit.Assert;
 import org.junit.Test;
 u}(j/  (7966ac0f5da5181dca46ddd5f044ca45a808a122jh/  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajj/  addedjb/  K*jc/  K jl/  K*jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+
+/**
+ * To be registered with the Prometheus collector registry.
+ * See <i>Overall Structure</i> on
+ * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
+ */
+@FunctionalInterface
+public interface Collector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshot collect();
+
+    /**
+     * Like {@link #collect()}, but returns {@code null} if {@code excludedNames.test(name)} is {@code true}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting the snapshot and then discarding it.
+     */
+    default MetricSnapshot collect(Predicate<String> excludedNames) {
+        MetricSnapshot result = collect();
+        if (excludedNames.test(result.getMetadata().getName())) {
+            return null;
+        } else {
+            return result;
+        }
+    }
+
+    /**
+     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     */
+    default String getName() {
+        return collect().getMetadata().getName();
+    }
+}u}(j/  (16dca86dad0515130faa365f3b0c574cc43b6c26jh/  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javajj/  addedjb/  K.jc/  K jl/  K.jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * To be registered with the Prometheus collector registry.
+ * See <i>Overall Structure</i> on
+ * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
+ */
+@FunctionalInterface
+public interface MultiCollector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshots collect();
+
+    /**
+     * Like {@link #collect()}, but returns only the snapshots where {@code excludedNames.test(name)} is {@code false}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting all snapshot and then discarding the excluded ones.
+     */
+    default MetricSnapshots collect(Predicate<String> excludedNames) {
+        MetricSnapshots allSnapshots = collect();
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (MetricSnapshot snapshot : allSnapshots) {
+            if (!excludedNames.test(snapshot.getMetadata().getName())) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    /**
+     * Override this and return an empty list if the MultiCollector does not return a constant list of names
+     * (names may be added / removed between scrapes).
+     */
+    default List<String> getNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    }
+}u}(j/  (659d6b4cbc63aff6c62efb15dbd3a35983ae4336jh/  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajj/  addedjb/  K\jc/  K jl/  K\jm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5      js/  X
  @@ -0,0 +1,92 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.function.Predicate;
+
+public class PrometheusRegistry {
+
+    public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
+
+    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final List<Collector> collectors = new CopyOnWriteArrayList<>();
+    private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
+
+    public void register(Collector collector) {
+        String name = collector.getName();
+        if (!names.add(name)) {
+            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        }
+        collectors.add(collector);
+    }
+
+    public void register(MultiCollector collector) {
+        for (String name : collector.getNames()) {
+            if (!names.add(name)) {
+                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+            }
+        }
+        multiCollectors.add(collector);
+    }
+
+    public void unregister(Collector collector) {
+        collectors.remove(collector);
+        names.remove(collector.getName());
+    }
+
+    public void unregister(MultiCollector collector) {
+        multiCollectors.remove(collector);
+        for (String name : collector.getNames()) {
+            names.remove(name);
+        }
+    }
+
+    public MetricSnapshots scrape() {
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            result.addMetricSnapshot(collector.collect());
+        }
+        for (MultiCollector collector : multiCollectors) {
+            for (MetricSnapshot snapshot : collector.collect()) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    public MetricSnapshots scrape(Predicate<String> excludedNames) {
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            String name = collector.getName();
+            if (name == null || !excludedNames.test(name)) {
+                MetricSnapshot snapshot = collector.collect();
+                if (!excludedNames.test(snapshot.getMetadata().getName())) {
+                    result.addMetricSnapshot(snapshot);
+                }
+            }
+        }
+        for (MultiCollector collector : multiCollectors) {
+            List<String> names = collector.getNames();
+            boolean excluded = true;
+            for (String name : names) {
+                if (!excludedNames.test(name)) {
+                    excluded = false;
+                    break;
+                }
+            }
+            if (!excluded) {
+                for (MetricSnapshot snapshot : collector.collect()) {
+                    if (!excludedNames.test(snapshot.getMetadata().getName())) {
+                        result.addMetricSnapshot(snapshot);
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+}u}(j/  (6ca2f90ec13b9342a600f207a28dad041ebedd23jh/  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucket.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Helper class for iterating over {@link ClassicHistogramBuckets}.previous_filename^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/ClassicHistogramBucket.javau}(j/  (cd20eb4e873decfca673399bdedf94d06ba15597jh/  iprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBuckets.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/ClassicHistogramBuckets.javau}(j/  (8451fe9faefe56f977a75b2f4fac816a1eb0a296jh/  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;j0  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/CounterSnapshot.javau}(j/  (bf5579ede66ebbfb464e38652798ca312925950cjh/  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionData.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionData.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionData.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionData.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Common base class for histogram and summary data.j0  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/DistributionData.javau}(j/  (c9865aac5db7099759f9ccfcad05e3309cd1d938jh/  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplar.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Immutable representation of an Exemplar.j0  Pprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Exemplar.javau}(j/  (02888ba2efb005c223ee9aa1cc71dd00f9b25424jh/  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplars.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  Qprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Exemplars.javau}(j/  (032239ece232a618bb2963f287d11dc4b344e0f9jh/  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;j0  Uprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/GaugeSnapshot.javau}(j/  (0683e7c9e96e756785f8e5bd4aa3a85aca53b559jh/  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;j0  Yprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/HistogramSnapshot.javau}(j/  (8a50aa250de9293200bd62b9829a63076095c47bjh/  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;j0  Tprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/InfoSnapshot.javau}(j/  (c31a8b1af0581223dd974d8b6f9675b2b931dfb3jh/  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Label.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Utility for iterating over {@link Labels}.j0  Mprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Label.javau}(j/  (05797e2d5e211878d192713f82262cc36c73bc9fjh/  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  Nprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Labels.javau}(j/  (7e0f45505d4767a45afe6232ff3a85aa708f594bjh/  \prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricData.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricData.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricData.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricData.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 public abstract class MetricData {
     private final Labels labels;j0  Rprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/MetricData.javau}(j/  (4840a1b3870fd696e44f99651ca2774813db0720jh/  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.regex.Pattern;
 j0  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/MetricMetadata.javau}(j/  (660af714364e1c43c40cabbca2eae97d85aa1965jh/  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/MetricSnapshot.javau}(j/  (98200461feaab64ff0e98b76200cf345b2d6e7c2jh/  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/MetricSnapshots.javau}(j/  (e7af0e6e84a44c3ea7fccf50dfafbdaabc40ed84jh/  gprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucket.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * For iterating over {@link NativeHistogramBuckets}.j0  ]prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/NativeHistogramBucket.javau}(j/  (75dc4ed9ff006517beea303ddc7cb926677c19f9jh/  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/NativeHistogramBuckets.javau}(j/  (7d5c1c1666c69ee595b2f175281cf23955de87d8jh/  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantile.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Immutable representation of a Quantile.j0  Pprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Quantile.javau}(j/  (1ad7002d2cfd9235e6a28470bdc300736a631574jh/  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantiles.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  ~@@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.*;
 j0  Qprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Quantiles.javau}(j/  (1885c6ec42f0b28bff39a30dc8037d6ccd3438b0jh/  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Arrays;j0  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/StateSetSnapshot.javau}(j/  (6852643ef4155adf0d417c0b2fb41e7e513ef954jh/  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;j0  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/SummarySnapshot.javau}(j/  (26221db9afdcc69e0b7bd721594b25f8b787f7a2jh/  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Unit.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 /**
  * Some pre-defined units for convenience. You can create your own units withj0  Lprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/Unit.javau}(j/  (ef27a29282dc3746bd2be5ac52a4def9576f8242jh/  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,7 +1,6 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 j0  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/UnknownSnapshot.javau}(j/  (04801e13348836168fd156919907c6916d94ad6ajh/  mprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucketsTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X(  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import org.junit.Assert;
 import org.junit.Test;
 j0  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/ClassicHistogramBucketsTest.javau}(j/  (51a1af83680ef46fed84c9e11d8b6ecf6e575f94jh/  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X'  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
 import org.junit.Assert;
 import org.junit.Test;
 j0  [prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/CounterSnapshotTest.javau}(j/  (385ceb029e4068bdf74659dac9278727b2aed46djh/  ^prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X	  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Tprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/ExemplarTest.javau}(j/  (3ef9447a7e48775181063bccea044170d8b0d563jh/  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarsTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Uprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/ExemplarsTest.javau}(j/  (7067ed4671da8b3ec63cb3ab86036886bb1c1c29jh/  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X5  @@ -1,13 +1,11 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
 import org.junit.Assert;
 import org.junit.Test;
 
-import javax.xml.crypto.Data;
 import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
 
 public class GaugeSnapshotTest {
 j0  Yprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/GaugeSnapshotTest.javau}(j/  (8842726a4cdde2722ab87995205955b7042ae6e7jh/  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X/  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.HistogramSnapshot.HistogramData;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramData;
 import org.junit.Assert;
 import org.junit.Test;
 j0  ]prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/HistogramSnapshotTest.javau}(j/  (d5bd1d11a593b65dd848fc85592a13947ba8ea93jh/  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X
  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Xprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/InfoSnapshotTest.javau}(j/  (8eaa8333a65d7157b364c52e20bbb1a74a20117fjh/  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,5 +1,6 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Rprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/LabelsTest.javau}(j/  (a655954f7c35a987d073e1fce0e46661c84ed336jh/  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X
  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Zprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/MetricMetadataTest.javau}(j/  (3dc998f8655f46d4b1aa1d6f0decd2e883923c3ejh/  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,5 +1,9 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Zprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/MetricSnapshotTest.javau}(j/  (7fc34ce29e9a4833c2bc13abb8ec0b14142170fajh/  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,5 +1,9 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import org.junit.Assert;
 import org.junit.Test;
 j0  [prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/MetricSnapshotsTest.javau}(j/  (2797be5565791a7f41bfa01176390c8a275d323ejh/  lprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucketsTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X&  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.NativeHistogramBucket;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
 import org.junit.Assert;
 import org.junit.Test;
 j0  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/NativeHistogramBucketsTest.javau}(j/  (43b586119205de3dc0f50eae664fe44b1a6c2499jh/  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/QuantilesTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  X  @@ -1,5 +1,7 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
 import org.junit.Assert;
 import org.junit.Test;
 j0  Uprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/QuantilesTest.javau}(j/  (54766debdca65622d507c6f1365900e54f2b0809jh/  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SnapshotTestUtil.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,5 +1,6 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import org.junit.Assert;
 
 public class SnapshotTestUtil {j0  Xprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/SnapshotTestUtil.javau}(j/  (d2065b7bf6300134586a7874fca8b1cec7c7879cjh/  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import org.junit.Assert;
 import org.junit.Test;j0  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/StateSetSnapshotTest.javau}(j/  (64c5e831e76370e4333b64d7355bb6070a87299ajh/  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import org.junit.Assert;
 import org.junit.Test;j0  [prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/SummarySnapshotTest.javau}(j/  (9ceaebc957de97db25422ec4f42a524bb1219fffjh/  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javajj/  renamedjb/  Kjc/  Kjl/  Kjm/  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajo/  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajq/  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5js/  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.model;
+package io.prometheus.metrics.model.snapshots;
 
 import org.junit.Assert;
 import org.junit.Test;j0  [prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/UnknownSnapshotTest.javaueu(de20057419d811cc00b1b70476c7f0cc2253c2ee}(sha(de20057419d811cc00b1b70476c7f0cc2253c2eenode_idEC_kwDOAHoJt9oAKGRlMjAwNTc0MTlkODExY2MwMGIxYjcwNDc2YzdmMGNjMjI1M2MyZWUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T20:48:31Zu	committer}(j72  Fabian Stäberj92  fabian@fstab.dej;2  2023-08-29T20:48:31Zumessage:Temporarily add shaded dependencies to prepare for releasetree}(j/2  (c9d5386e4b39b2cea221059ad26709462c3ea01burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c9d5386e4b39b2cea221059ad26709462c3ea01bujG2  hhttps://api.github.com/repos/prometheus/client_java/git/commits/de20057419d811cc00b1b70476c7f0cc2253c2ee
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujG2  dhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2eehtml_urlYhttps://github.com/prometheus/client_java/commit/de20057419d811cc00b1b70476c7f0cc2253c2eecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2ee/commentsj52  }(loginfstabidJ' j12  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jG2  "https://api.github.com/users/fstabjS2  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj=2  }(jX2  fstabjZ2  J' j12  MDQ6VXNlcjMzMDUzNQ==j\2  2https://avatars.githubusercontent.com/u/330535?v=4j^2  h3jG2  "https://api.github.com/users/fstabjS2  https://github.com/fstabja2  ,https://api.github.com/users/fstab/followersjc2  9https://api.github.com/users/fstab/following{/other_user}je2  2https://api.github.com/users/fstab/gists{/gist_id}jg2  9https://api.github.com/users/fstab/starred{/owner}{/repo}ji2  0https://api.github.com/users/fstab/subscriptionsjk2  'https://api.github.com/users/fstab/orgsjm2  (https://api.github.com/users/fstab/reposjo2  3https://api.github.com/users/fstab/events{/privacy}jq2  2https://api.github.com/users/fstab/received_eventsjs2  Userju2  uparents]}(j/2  (b68c124c817df7697c06c5e67aee66a1c22c4ba1jG2  dhttps://api.github.com/repos/prometheus/client_java/commits/b68c124c817df7697c06c5e67aee66a1c22c4ba1jS2  Yhttps://github.com/prometheus/client_java/commit/b68c124c817df7697c06c5e67aee66a1c22c4ba1uastats}(totalK	additionsK	deletionsKufiles]}(j/2  (47c3ccc61ae6fddd1992b57c523e9462530abdaefilenamepom.xmlstatusmodifiedj2  Kj2  KchangesKblob_url_https://github.com/prometheus/client_java/blob/de20057419d811cc00b1b70476c7f0cc2253c2ee/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/de20057419d811cc00b1b70476c7f0cc2253c2ee/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=de20057419d811cc00b1b70476c7f0cc2253c2eepatchX  @@ -56,7 +56,7 @@
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
         <module>prometheus-metrics-exporter-opentelemetry</module>
-        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
+        <module>prometheus-metrics-shaded-dependencies</module>
         <module>examples</module>
         <module>integration-tests</module>
 uau(53ceb5831f588553f9cb1e46bdccce2151084a65}(sha(53ceb5831f588553f9cb1e46bdccce2151084a65node_idEC_kwDOAHoJt9oAKDUzY2ViNTgzMWY1ODg1NTNmOWNiMWU0NmJkY2NjZTIxNTEwODRhNjUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T06:01:45Zu	committer}(j2  Fabian Stäberj2  fabian@fstab.dej2  2023-06-29T06:01:45Zumessagedata point tmptree}(j2  (b697a0d14c2067b2657a5324ce5a165bd12d9518urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/b697a0d14c2067b2657a5324ce5a165bd12d9518uj2  hhttps://api.github.com/repos/prometheus/client_java/git/commits/53ceb5831f588553f9cb1e46bdccce2151084a65
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj2  dhttps://api.github.com/repos/prometheus/client_java/commits/53ceb5831f588553f9cb1e46bdccce2151084a65html_urlYhttps://github.com/prometheus/client_java/commit/53ceb5831f588553f9cb1e46bdccce2151084a65comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/53ceb5831f588553f9cb1e46bdccce2151084a65/commentsj2  }(loginfstabidJ' j2  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j2  "https://api.github.com/users/fstabj2  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj2  }(j2  fstabj2  J' j2  MDQ6VXNlcjMzMDUzNQ==j2  2https://avatars.githubusercontent.com/u/330535?v=4j2  h3j2  "https://api.github.com/users/fstabj2  https://github.com/fstabj2  ,https://api.github.com/users/fstab/followersj2  9https://api.github.com/users/fstab/following{/other_user}j2  2https://api.github.com/users/fstab/gists{/gist_id}j2  9https://api.github.com/users/fstab/starred{/owner}{/repo}j2  0https://api.github.com/users/fstab/subscriptionsj2  'https://api.github.com/users/fstab/orgsj2  (https://api.github.com/users/fstab/reposj2  3https://api.github.com/users/fstab/events{/privacy}j2  2https://api.github.com/users/fstab/received_eventsj2  Userj2  uparents]}(j2  (1e32584be1a687e73b48be40bc1769b4b2ac25c3j2  dhttps://api.github.com/repos/prometheus/client_java/commits/1e32584be1a687e73b48be40bc1769b4b2ac25c3j2  Yhttps://github.com/prometheus/client_java/commit/1e32584be1a687e73b48be40bc1769b4b2ac25c3uastats}(totalK	additionsKy	deletionsK?ufiles](}(j2  (01e1e644d75314eb79f8f69350f53a2aebebaae3filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedj3  Kj3  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65patchXS  @@ -8,7 +8,7 @@
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.DiscreteEventObserver;
+import io.prometheus.metrics.core.observer.CounterDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -17,7 +17,7 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
-public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver, Collector {
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.CounterData> implements CounterDataPoint, Collector {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -97,7 +97,7 @@ private static String normalizeName(String name) {
         return name;
     }
 
-    class CounterData extends MetricData<DiscreteEventObserver> implements DiscreteEventObserver {
+    class CounterData extends MetricData<CounterDataPoint> implements CounterDataPoint {
 
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
@@ -174,12 +174,12 @@ private CounterSnapshot.CounterData collect(Labels labels) {
         }
 
         @Override
-        public DiscreteEventObserver toObserver() {
+        public CounterDataPoint toObserver() {
             return this;
         }
     }
 
-    public static class Builder extends ObservingMetric.Builder<Builder, Counter> {
+    public static class Builder extends StatefulMetric.Builder<Builder, Counter> {
 
         private Builder(PrometheusProperties properties) {
             super(Collections.emptyList(), properties);u}(j2  (9b3c80eed57a73e6bf1cdfeeeb35353e5526ca22j
3  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javaj3  modifiedj3  Kj3  Kj3  K
j3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X  @@ -7,15 +7,15 @@
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.GaugingObserver;
+import io.prometheus.metrics.core.observer.GaugeDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.DoubleSupplier;
 
-public class Gauge extends ObservingMetric<GaugingObserver, Gauge.GaugeData> implements GaugingObserver {
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.GaugeData> implements GaugeDataPoint {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -79,7 +79,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    class GaugeData extends MetricData<GaugingObserver> implements GaugingObserver {
+    class GaugeData extends MetricData<GaugeDataPoint> implements GaugeDataPoint {
 
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
@@ -138,12 +138,12 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
         }
 
         @Override
-        public GaugingObserver toObserver() {
+        public GaugeDataPoint toObserver() {
             return this;
         }
     }
 
-    public static class Builder extends ObservingMetric.Builder<Builder, Gauge> {
+    public static class Builder extends StatefulMetric.Builder<Builder, Gauge> {
 
         private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);u}(j2  (ab34b681528f6845ff8bad0699f7e3a3063026b7j
3  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javaj3  modifiedj3  Kj3  Kj3  K
j3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X	  @@ -10,7 +10,7 @@
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
-import io.prometheus.metrics.core.observer.DistributionObserver;
+import io.prometheus.metrics.core.observer.DistributionDataPoint;
 import io.prometheus.metrics.core.util.Scheduler;
 
 import java.math.BigDecimal;
@@ -40,7 +40,7 @@
  * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
  * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
  */
-public class Histogram extends ObservingMetric<DistributionObserver, Histogram.HistogramData> implements DistributionObserver {
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.HistogramData> implements DistributionDataPoint {
 
     // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
     private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
@@ -139,7 +139,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    public class HistogramData extends MetricData<DistributionObserver> implements DistributionObserver {
+    public class HistogramData extends MetricData<DistributionDataPoint> implements DistributionDataPoint {
         private final LongAdder[] classicBuckets;
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
@@ -270,7 +270,7 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
         }
 
         @Override
-        public DistributionObserver toObserver() {
+        public DistributionDataPoint toObserver() {
             return this;
         }
 
@@ -623,7 +623,7 @@ public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 
-    public static class Builder extends ObservingMetric.Builder<Histogram.Builder, Histogram> {
+    public static class Builder extends StatefulMetric.Builder<Histogram.Builder, Histogram> {
 
         private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
         public static final double[] DEFAULT_CLASSIC_UPPER_BOUNDS = new double[]{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10};u}(j2  (7177157c6c58511e86cd330afb61d5a19e14ae09J     j
3  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricData.javaj3  modifiedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  XG  @@ -1,9 +1,9 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.core.observer.Observer;
+import io.prometheus.metrics.core.observer.DataPoint;
 
 // package private
-abstract class MetricData<T extends Observer> {
+abstract class MetricData<T extends DataPoint> {
 
     abstract T toObserver();
 }u}(j2  (777644a1e2ef1fc1dafe217dad4f5315d1510167j
3  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj3  modifiedj3  Kj3  Kj3  K
j3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X9  @@ -4,15 +4,15 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
-import io.prometheus.metrics.core.observer.StateObserver;
+import io.prometheus.metrics.core.observer.StateSetDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Stream;
 
 // experimental
-public class StateSet extends ObservingMetric<StateObserver, StateSet.StateSetData> implements StateObserver {
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.StateSetData> implements StateSetDataPoint {
 
     private final boolean exemplarsEnabled;
     private final String[] names;
@@ -63,15 +63,15 @@ public void setFalse(String state) {
         getNoLabels().setFalse(state);
     }
 
-    class StateSetData extends MetricData<StateObserver> implements StateObserver {
+    class StateSetData extends MetricData<StateSetDataPoint> implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
         private StateSetData() {
         }
 
         @Override
-        StateObserver toObserver() {
+        StateSetDataPoint toObserver() {
             return this;
         }
 
@@ -97,7 +97,7 @@ private void set(String name, boolean value) {
     }
 
 
-    public static class Builder extends ObservingMetric.Builder<Builder, StateSet> {
+    public static class Builder extends StatefulMetric.Builder<Builder, StateSet> {
 
         private String[] names;
 u}(j2  (a6f63550b48d134cea03ac49196c7cfb27d26439j
3  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  Xv	  @@ -4,7 +4,7 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.core.observer.Observer;
+import io.prometheus.metrics.core.observer.DataPoint;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -16,7 +16,18 @@
 import static java.lang.Boolean.FALSE;
 import static java.lang.Boolean.TRUE;
 
-public abstract class ObservingMetric<O extends Observer, V extends MetricData<O>> extends MetricWithFixedMetadata {
+/**
+ * There are two kinds of metrics:
+ * <ul>
+ *     <li>A {@code StatefulMetric} actively maintains its current value, e.g. a stateful counter actively stores its current count.</li>
+ *     <li>A {@code CallbackMetric} gets its value on demand when it is collected, e.g. a callback gauge representing the current heap size has
+ *     a callback for calling JMX when it's collected.</li>
+ * </ul>
+ * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
+ * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
+ * but this has nothing to do with multi-threading.
+ */
+abstract class StatefulMetric<O extends DataPoint, V extends MetricData<O>> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
@@ -30,7 +41,7 @@ public abstract class ObservingMetric<O extends Observer, V extends MetricData<O
      */
     private volatile V noLabels;
 
-    protected ObservingMetric(Builder<?, ?> builder) {
+    protected StatefulMetric(Builder<?, ?> builder) {
         super(builder);
         this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
         //this.exemplarsEnabled = builder.exemplarsEnabled;
@@ -130,7 +141,7 @@ protected boolean hasSpanContextSupplier() {
     }
      */
 
-    static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
+    static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;
 previous_filename]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/ObservingMetric.javau}(j2  (366ff865aff82bca59ee89f6f70fe073c3daba82j
3  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaj3  modifiedj3  Kj3  Kj3  K
j3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X  @@ -7,7 +7,7 @@
 import io.prometheus.metrics.model.snapshots.Quantile;
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.core.observer.DistributionObserver;
+import io.prometheus.metrics.core.observer.DistributionDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -16,7 +16,7 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
-public class Summary extends ObservingMetric<DistributionObserver, Summary.SummaryData> implements DistributionObserver {
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.SummaryData> implements DistributionDataPoint {
 
     private final boolean exemplarsEnabled;
     private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
@@ -79,7 +79,7 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
 
-    public class SummaryData extends MetricData<DistributionObserver> implements DistributionObserver {
+    public class SummaryData extends MetricData<DistributionDataPoint> implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
@@ -129,7 +129,7 @@ public SummarySnapshot.SummaryData collect(Labels labels) {
         }
 
         @Override
-        public DistributionObserver toObserver() {
+        public DistributionDataPoint toObserver() {
             return this;
         }
 
@@ -148,7 +148,7 @@ private Quantiles makeQuantiles() {
     }
 
 
-    public static class Builder extends ObservingMetric.Builder<Summary.Builder, Summary> {
+    public static class Builder extends StatefulMetric.Builder<Summary.Builder, Summary> {
 
         public static final long DEFAULT_MAX_AGE_SECONDS = TimeUnit.MINUTES.toSeconds(5);
         public static final int DEFAULT_AGE_BUCKETS = 5;u}(j2  (0e47e91e2042e7f66ecf0238c490ce9f72e2989cj
3  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/CounterDataPoint.javaj3  addedj3  KEj3  K j3  KEj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FCounterDataPoint.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X  @@ -0,0 +1,69 @@
+package io.prometheus.metrics.core.observer;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single counter time series, i.e. a single line in the Prometheus text format.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter counter = Counter.newBuilder()
+ *     .withName("tasks_total")
+ *     .withLabelNames("status")
+ *     .register();
+ * CounterDataPoint newTasks = counter.withLabelValues("new");
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * CounterDataPoint completedTasks = counter.withLabelValues("completed");
+ * }</pre>
+ * <p>
+ * Using {@code DataPoint} directly improves performance. If you increment a counter like this:
+ * <pre>{@code
+ * counter.withLabelValues("pending").inc();
+ * }</pre>
+ * the label value {@code "pending"} needs to be looked up every single time.
+ * Using the {@code CounterDataPoint} like this:
+ * <pre>{@code
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * pendingTasks.inc();
+ * }</pre>
+ * allows you to look up the label value only once, and then use the {@code CounterDataPoint} directly.
+ * This is a worthwhile performance improvement when instrumenting a performance-critical code path.
+ * <p>
+ * If you have a counter without labels like this:
+ * <pre>{@code
+ * Counter counterWithoutLabels = Counter.newBuilder()
+ *     .withName("events_total")
+ *     .register();
+ * }</pre>
+ * You can use it as a {@code CounterDataPoint} directly. So the following:
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels.withLabels();
+ * }</pre>
+ * is equivalent to
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels;
+ * }</pre>
+ */
+public interface CounterDataPoint extends DataPoint {
+
+    default void inc() {
+        inc(1L);
+    }
+
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
+
+    void inc(double amount);
+
+    default void inc(long amount) {
+        inc((double) amount);
+    }
+
+    void incWithExemplar(double amount, Labels labels);
+
+    default void incWithExemplar(long amount, Labels labels) {
+        inc((double) amount);
+    }
+}u}(j2  (915174abc8eaecbf04b33d0e2b9987631368e265j
3  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DataPoint.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  }@@ -1,4 +1,4 @@
 package io.prometheus.metrics.core.observer;
 
-public interface Observer {
+public interface DataPoint {
 }j?3  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/Observer.javau}(j2  (1550cbd142d983efbdaa817d370321674cb14045j
3  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DiscreteEventObserver.javaj3  removedj3  K j3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/1e32584be1a687e73b48be40bc1769b4b2ac25c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javaj3  https://github.com/prometheus/client_java/raw/1e32584be1a687e73b48be40bc1769b4b2ac25c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.java?ref=1e32584be1a687e73b48be40bc1769b4b2ac25c3j3  XT  @@ -1,21 +0,0 @@
-package io.prometheus.metrics.core.observer;
-
-import io.prometheus.metrics.model.snapshots.Labels;
-
-public interface DiscreteEventObserver extends Observer {
-
-    default void inc() {
-        inc(1L);
-    }
-    default void incWithExemplar(Labels labels) {
-        incWithExemplar(1.0, labels);
-    }
-    void inc(double amount);
-    default void inc(long amount) {
-        inc((double) amount);
-    }
-    void incWithExemplar(double amount, Labels labels);
-    default void incWithExemplar(long amount, Labels labels) {
-        inc((double) amount);
-    }
-}u}(j2  (83eed8b1ec9e1f042f82a237f18a3fc546d334bdj
3  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DistributionDataPoint.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionDataPoint.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionDataPoint.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionDataPoint.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X=  @@ -4,7 +4,7 @@
 
 import java.util.concurrent.Callable;
 
-public interface DistributionObserver extends Observer {
+public interface DistributionDataPoint extends DataPoint {
     void observe(double amount);
     default void observeWithExemplar(double amount) {
         observeWithExemplar(amount, Labels.EMPTY);j?3  cprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DistributionObserver.javau}(j2  (b0a1a795aa32faad23d3993977ed0496a3b962fcj
3  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/GaugeDataPoint.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugeDataPoint.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugeDataPoint.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugeDataPoint.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  @@ -2,7 +2,7 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 
-public interface GaugingObserver extends Observer {
+public interface GaugeDataPoint extends DataPoint {
 
     default void inc() {
         inc(1.0);j?3  ^prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/GaugingObserver.javau}(j2  (53b8cf807122a4071be6753a1893aecd96b986a2j
3  `prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/StateSetDataPoint.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateSetDataPoint.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateSetDataPoint.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateSetDataPoint.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.observer;
 
-public interface StateObserver extends Observer {
+public interface StateSetDataPoint extends DataPoint {
     void setTrue(String state);
     void setFalse(String state);
 j?3  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/StateObserver.javau}(j2  (785aa88ef45df2dbc706c2fbdc288e0d63027a48j
3  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj3  modifiedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X  @@ -11,7 +11,7 @@
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.DistributionObserver;
+import io.prometheus.metrics.core.observer.DistributionDataPoint;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -1240,7 +1240,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
                 .withLabelNames("status")
                 .build();
         int nThreads = 8;
-        DistributionObserver obs = histogram.withLabelValues("200");
+        DistributionDataPoint obs = histogram.withLabelValues("200");
         ExecutorService executor = Executors.newFixedThreadPool(nThreads);
         CompletionService<List<HistogramSnapshot>> completionService = new ExecutorCompletionService<>(executor);
         CountDownLatch startSignal = new CountDownLatch(nThreads);u}(j2  (3b947e73e91e7464b7db1ac75c0a90462277241cj
3  `prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StatefulMetricTest.javaj3  renamedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javaj3  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  @@ -6,7 +6,7 @@
 import java.lang.reflect.Field;
 import java.util.Map;
 
-public class ObservingMetricTest {
+public class StatefulMetricTest {
 
     @Test
     public void testLabelRemoveWhileCollecting() throws Exception {j?3  aprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/ObservingMetricTest.javau}(j2  (d78680ff94ac283daec256ccdc84b190d505ff20j
3  /tmp_example/src/main/java/com/example/Main.javaj3  modifiedj3  Kj3  Kj3  Kj3  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javaj3  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javaj3  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65j3  X  @@ -1,9 +1,8 @@
 package com.example;
 
 import io.prometheus.metrics.core.metrics.Counter;
-import io.prometheus.metrics.core.observer.DiscreteEventObserver;
+import io.prometheus.metrics.core.observer.CounterDataPoint;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
 
 import java.io.IOException;
 
@@ -14,8 +13,8 @@ public static void main(String[] args) throws IOException {
                 .withLabelNames("path", "status")
                 .withName("events_total")
                 .register();
-        DiscreteEventObserver goodCase = counter.withLabelValues("/get", "200");
-        DiscreteEventObserver errorCase = counter.withLabelValues("/get", "500");
+        CounterDataPoint goodCase = counter.withLabelValues("/get", "200");
+        CounterDataPoint errorCase = counter.withLabelValues("/get", "500");
         goodCase.inc();
         errorCase.inc();
         HTTPServer.newBuilder().withPort(9000).build();ueu(0816bafbb3febeebf5126704cd2f1dc77a51f16a}(sha(0816bafbb3febeebf5126704cd2f1dc77a51f16anode_idEC_kwDOAHoJt9oAKDA4MTZiYWZiYjNmZWJlZWJmNTEyNjcwNGNkMmYxZGM3N2E1MWYxNmEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T11:24:29Zu	committer}(j3  Fabian Stäberj3  fabian@fstab.dej3  2023-07-27T11:24:29Zumessage*Allow dots in metric names and label namestree}(j3  (97d9358ac605a4bb6145b6a4a63736d6651b6aeburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/97d9358ac605a4bb6145b6a4a63736d6651b6aebuj3  hhttps://api.github.com/repos/prometheus/client_java/git/commits/0816bafbb3febeebf5126704cd2f1dc77a51f16a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj3  dhttps://api.github.com/repos/prometheus/client_java/commits/0816bafbb3febeebf5126704cd2f1dc77a51f16ahtml_urlYhttps://github.com/prometheus/client_java/commit/0816bafbb3febeebf5126704cd2f1dc77a51f16acomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/0816bafbb3febeebf5126704cd2f1dc77a51f16a/commentsj3  }(loginfstabidJ' j3  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j3  "https://api.github.com/users/fstabj3  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj3  }(j3  fstabj3  J' j3  MDQ6VXNlcjMzMDUzNQ==j3  2https://avatars.githubusercontent.com/u/330535?v=4j3  h3j3  "https://api.github.com/users/fstabj3  https://github.com/fstabj3  ,https://api.github.com/users/fstab/followersj3  9https://api.github.com/users/fstab/following{/other_user}j3  2https://api.github.com/users/fstab/gists{/gist_id}j3  9https://api.github.com/users/fstab/starred{/owner}{/repo}j3  0https://api.github.com/users/fstab/subscriptionsj3  'https://api.github.com/users/fstab/orgsj3  (https://api.github.com/users/fstab/reposj3  3https://api.github.com/users/fstab/events{/privacy}j3  2https://api.github.com/users/fstab/received_eventsj3  Userj3  uparents]}(j3  (4db5d6ae4cf9a3a44c8b00261859cce581e0d521j3  dhttps://api.github.com/repos/prometheus/client_java/commits/4db5d6ae4cf9a3a44c8b00261859cce581e0d521j3  Yhttps://github.com/prometheus/client_java/commit/4db5d6ae4cf9a3a44c8b00261859cce581e0d521uastats}(totalM	additionsM[	deletionsKufiles](}(j3  (a1046e2a2cdfe14bf863778640d998f79536d655filenameexamples/example-exemplars-tail-sampling/example-greeting-service/src/main/java/io/prometheus/metrics/examples/otel_exemplars/greeting/GreetingServlet.javastatusmodifiedj3  Kj3  KchangesKblob_urlX  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javaraw_urlX
  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16apatchX  @@ -27,7 +27,7 @@ public GreetingServlet() {
             .withUnit(Unit.SECONDS)
             .withLabelNames("http_status")
             .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j3  (cabedbce594acc78d89aaf5e6792997d4550fed4j3  examples/example-exemplars-tail-sampling/example-hello-world-app/src/main/java/io/prometheus/metrics/examples/otel_exemplars/app/HelloWorldServlet.javaj 4  modifiedj3  Kj3  Kj4  Kj4  X  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javaj4  X  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javaj4  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -34,7 +34,7 @@ public HelloWorldServlet() {
                 .withUnit(Unit.SECONDS)
                 .withLabelNames("http_status")
                 .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j3  (7a95e36da299e8ce780ea5f0d2f2751765754afcj3  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj 4  modifiedj3  Kj3  K j4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj4  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -32,6 +32,11 @@ public class HelloWorldServlet extends HttpServlet {
             .withLabelNames("http_status")
             .register();
 
+    public HelloWorldServlet() {
+        counter.initLabelValues("200");
+        histogram.initLabelValues("200");
+    }
+
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
         long start = System.nanoTime();u}(j3  (caf2cf8548342e5fb17046a95acbb18e13bf2315j3  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -113,7 +113,7 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
     }
 
     static String stripTotalSuffix(String name) {
-        if (name != null && prometheusName(name).endsWith("_total")) {
+        if (name != null && (name.endsWith("_total") || name.endsWith(".total"))) {
             name = name.substring(0, name.length() - 6);
         }
         return name;
@@ -234,7 +234,7 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Overrideu}(j3  (b4d7bc7619b07a80158b44f817a2e3b28e1c7f79j3  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  XW  @@ -80,7 +80,7 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Overrideu}(j3  (5731e28435a190d82cd3ae1416fe81f7c301c29bj3  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -90,7 +90,7 @@ private Builder(PrometheusProperties config) {
          * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
@@ -110,7 +110,7 @@ public Builder withUnit(Unit unit) {
         }
 
         private static String stripInfoSuffix(String name) {
-            if (name != null && prometheusName(name).endsWith("_info")) {
+            if (name != null && (name.endsWith("_info") || name.endsWith(".info"))) {
                 name = name.substring(0, name.length() - 5);
             }
             return name;u}(j3  (6f963c299dad6c6c2b8a733d876725960d0f03bej3  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -34,9 +34,8 @@ protected MetricMetadata getMetadata() {
 
     private String makeName(String name, Unit unit) {
         if (unit != null) {
-            String suffix = "_" + unit;
-            if (!prometheusName(name).endsWith(suffix)) {
-                name = name + suffix;
+            if (!name.endsWith(unit.toString())) {
+                name = name + "_" + unit;
             }
         }
         return name;u}(j3  (7348c04101650d22ceae1186a8822f60e29ac846j3  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -61,7 +61,7 @@ private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
-            if (prometheusName(this.getMetadata().getName()).equals(prometheusName(name))) {
+            if (this.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                 throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
             }
         }u}(j3  (17d8da246cccd484c9d26753c930dfd67f3221c6j3  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  XB  @@ -62,6 +62,34 @@ public MetricSnapshot collect() {
         return collect(labels, metricData);
     }
 
+    /**
+     * Initialize label values.
+     * <p>
+     * Example: Imagine you have a counter for payments as follows
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 7.0
+     * payment_transactions_total{payment_type="paypal"} 3.0
+     * </pre>
+     * Now, the data points for the {@code payment_type} label values get initialized when they are
+     * first used, i.e. the first time you call
+     * <pre>{@code
+     * counter.withLabelValues("paypal").inc();
+     * }</pre>
+     * the data point with label {@code payment_type="paypal"} will go from non-existent to having value {@code 1.0}.
+     * <p>
+     * In some cases this is confusing, and you want to have data points initialized on application start
+     * with an initial value of {@code 0.0}:
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 0.0
+     * payment_transactions_total{payment_type="paypal"} 0.0
+     * </pre>
+     * {@code initLabelValues(...)} can be used to initialize label value, so that the data points
+     * show up in the exposition format with an initial value of zero.
+     */
+    public void initLabelValues(String... labelValues) {
+        withLabelValues(labelValues);
+    }
+
     public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
@@ -73,7 +101,6 @@ public D withLabelValues(String... labelValues) {
         return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
-    // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }u}(j3  (a967a8d64a8b6693885910148cbdfb625550e06aj3  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  Xc  @@ -109,18 +109,18 @@ public void testLabels() {
 
     @Test
     public void testTotalStrippedFromName() {
-        Counter counter = Counter.newBuilder()
-                .withName("my_counter_total")
-                .withUnit(Unit.SECONDS)
-                .build();
-        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
-
-        counter = Counter.newBuilder()
-                .withName("my_counter")
-                .build();
-        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        for (String name : new String[]{
+                "my_counter_total", "my.counter.total",
+                "my_counter_seconds_total", "my.counter.seconds.total",
+                "my_counter", "my.counter",
+                "my_counter_seconds", "my.counter.seconds"}) {
+            Counter counter = Counter.newBuilder()
+                    .withName(name)
+                    .withUnit(Unit.SECONDS)
+                    .build();
+            Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+            assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        }
     }
 
     @Testu}(j3  (5b1bbf991003f2e68f994ac87b8368d397691ce0j3  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj 4  modifiedj3  Kj3  Kj4  K!j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -1,23 +1,28 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import org.junit.Assert;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+
 public class InfoTest {
 
     @Test
-    public void testIncrement() {
-        Info info = Info.newBuilder()
-                .withName("target_info")
-                .withLabelNames("key")
-                .build();
-        info.infoLabelValues("value");
-        InfoSnapshot snapshot = info.collect();
-        Assert.assertEquals("target", snapshot.getMetadata().getName());
-        Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
-        Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
+    public void testInfoStrippedFromName() {
+        for (String name : new String[]{
+                "jvm.runtime", "jvm_runtime",
+                "jvm.runtime.info", "jvm_runtime_info"}) {
+            for (String labelName : new String[]{"my.key", "my_key"}) {
+                Info info = Info.newBuilder()
+                        .withName(name)
+                        .withLabelNames(labelName)
+                        .build();
+                info.infoLabelValues("value");
+                Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
+                assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
+            }
+        }
     }
 }u}(j3  (fa131335ef7fabb86de2a3b1ae5e5e3c3a9fc525j3  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X[!  @@ -90,7 +90,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
         for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_total", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
             writeCreated(writer, metadata, data);
@@ -101,7 +101,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
                 writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -129,7 +129,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 Exemplar exemplar;
                 if (i == 0) {
@@ -177,7 +177,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
             // quantiles, all indexes modulo exemplars.length.
             int exemplarIndex = 1;
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
                     exemplarIndex = (exemplarIndex + 1) % exemplars.size();
@@ -196,7 +196,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
         }
@@ -207,21 +207,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "stateset", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(prometheusName(metadata.getName()));
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(prometheusName(data.getLabels().getName(j)));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(prometheusName(metadata.getName()));
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -239,7 +239,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -252,7 +252,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
     private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), countSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), countSuffix, data.getLabels());
             writeLong(writer, data.getCount());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -262,7 +262,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
             }
         }
         if (data.hasSum()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), sumSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), sumSuffix, data.getLabels());
             writeDouble(writer, data.getSum());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -274,7 +274,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
 
     private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_created", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
             if (data.hasScrapeTimestamp()) {
                 writer.write(' ');
@@ -320,20 +320,20 @@ private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPoin
 
     private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
         writer.write("# TYPE ");
-        writer.write(prometheusName(metadata.getName()));
+        writer.write(metadata.getPrometheusName());
         writer.write(' ');
         writer.write(typeName);
         writer.write('\n');
         if (metadata.getUnit() != null) {
             writer.write("# UNIT ");
-            writer.write(prometheusName(metadata.getName()));
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getUnit().toString());
             writer.write('\n');
         }
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(prometheusName(metadata.getName()));
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getHelp());
             writer.write('\n');u}(j3  (6f4eb6e6756990ee3101a7afbcd095ba63c911d3j3  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj 4  modifiedj3  Kj3  Kj4  K
j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -104,7 +104,7 @@ public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         } else if (snapshot instanceof StateSetSnapshot) {
             for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
-                    builder.addMetric(convert(data, prometheusName(snapshot.getMetadata().getName()), i));
+                    builder.addMetric(convert(data, snapshot.getMetadata().getPrometheusName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
@@ -122,9 +122,9 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
             return;
         }
         if (nameSuffix == null) {
-            builder.setName(prometheusName(metadata.getName()));
+            builder.setName(metadata.getPrometheusName());
         } else {
-            builder.setName(prometheusName(metadata.getName()) + nameSuffix);
+            builder.setName(metadata.getPrometheusName() + nameSuffix);
         }
         if (metadata.getHelp() != null) {
             builder.setHelp(metadata.getHelp());
@@ -336,7 +336,7 @@ private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot
     private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(prometheusName(labels.getName(i)))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }
@@ -345,7 +345,7 @@ private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
     private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(prometheusName(labels.getName(i)))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }u}(j3  (bc187a88648e66fb17a2269fe11bcb0a9959a764j3  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javaj 4  modifiedj3  Kj3  Kj4  K$j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X%  @@ -103,7 +103,7 @@ public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) thr
                         writeMetadata(writer, "_created", "gauge", metadata);
                         metadataWritten = true;
                     }
-                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_created", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
                     writeTimestamp(writer, data.getCreatedTimestampMillis());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -116,7 +116,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
             for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_total", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -127,7 +127,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -141,18 +141,18 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (!snapshot.isGaugeHistogram()) {
                 if (data.hasCount()) {
-                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_count", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                     writeLong(writer, data.getCount());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
                 if (data.hasSum()) {
-                    writeNameAndLabels(writer, prometheusName(metadata.getName()), "_sum", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                     writeDouble(writer, data.getSum());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -184,7 +184,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gcount", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_gcount", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gcount", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -196,7 +196,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gsum", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_gsum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gsum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -215,17 +215,17 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
                 metadataWritten = true;
             }
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasCount()) {
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_count", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasSum()) {
-                writeNameAndLabels(writer, prometheusName(metadata.getName()), "_sum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -236,7 +236,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -247,21 +247,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "", "gauge", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(prometheusName(metadata.getName()));
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(prometheusName(data.getLabels().getName(j)));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(prometheusName(metadata.getName()));
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -279,7 +279,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, prometheusName(metadata.getName()), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -304,7 +304,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
     private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(prometheusName(metadata.getName()));
+            writer.write(metadata.getPrometheusName());
             if (suffix != null) {
                 writer.write(suffix);
             }
@@ -313,7 +313,7 @@ private void writeMetadata(OutputStreamWriter writer, String suffix, String type
             writer.write('\n');
         }
         writer.write("# TYPE ");
-        writer.write(prometheusName(metadata.getName()));
+        writer.write(metadata.getPrometheusName());
         if (suffix != null) {
             writer.write(suffix);
         }u     }(j3  (423fa6692c6c56240886d572fe3adb3373168ddaj3  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -63,7 +63,7 @@ static void writeLabels(OutputStreamWriter writer, Labels labels, String additio
             if (i > 0) {
                 writer.write(",");
             }
-            writer.write(prometheusName(labels.getName(i)));
+            writer.write(labels.getPrometheusName(i));
             writer.write("=\"");
             writeEscapedLabelValue(writer, labels.getValue(i));
             writer.write("\"");u}(j3  (7c9e714dfd905aa92e79a30c50ea424411a53bc5j3  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj 4  modifiedj3  M	j3  K j4  M	j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X%=  @@ -23,6 +23,7 @@
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -686,6 +687,49 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, summary);
     }
 
+    @Test
+    public void testSummaryWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "summary { sample_count: 1 sample_sum: 0.03 } " +
+                "}";
+                //@formatter:on
+
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(1)
+                        .withSum(0.03)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
     @Test
     public void testClassicHistogramComplete() throws Exception {
         String openMetricsText = "" +
@@ -1137,6 +1181,57 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
     }
 
+    @Test
+    public void testClassicHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "sample_sum: 0.01 " +
+                        "bucket { cumulative_count: 130 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(0.01)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
     @Test
     public void testNativeHistogramComplete() throws IOException {
         String openMetricsText = "" +
@@ -1334,6 +1429,64 @@ public void testNativeHistogramMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
     }
 
+    @Test
+    public void testNativeHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 4 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 1 " +
+                        "positive_span { offset: 2 length: 1 } " +
+                        "positive_delta: 3 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withSum(3.2)
+                        .withNativeSchema(5)
+                        .withNativeZeroCount(1)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(2, 3)
+                                .build()
+                        )
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
     // TODO: Gauge Native Histogram
 
     @Test
@@ -1360,6 +1513,39 @@ public void testInfo() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, info);
     }
 
+    @Test
+    public void testInfoWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE jvm_status info\n" +
+                "# HELP jvm_status JVM status info\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP jvm_status_info JVM status info\n" +
+                "# TYPE jvm_status_info gauge\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"jvm_status_info\" " +
+                "help: \"JVM status info\" " +
+                "type: GAUGE " +
+                "metric { " + "" +
+                    "label { name: \"jvm_version\" value: \"1.2.3\" } " +
+                    "gauge { value: 1.0 } " +
+                "}";
+                //@formatter:on
+        InfoSnapshot info = InfoSnapshot.newBuilder()
+                .withName("jvm.status")
+                .withHelp("JVM status info")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("jvm.version", "1.2.3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, info);
+        assertPrometheusText(prometheusText, info);
+        assertPrometheusProtobuf(prometheusProtobuf, info);
+    }
+
     @Test
     public void testStateSetComplete() throws IOException {
         String openMetrics = "" +
@@ -1423,6 +1609,48 @@ public void testStateSetMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, stateSet);
     }
 
+    @Test
+    public void testStateSetWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_application_state stateset\n" +
+                "# HELP my_application_state My application state\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_application_state My application state\n" +
+                "# TYPE my_application_state gauge\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_application_state\" " +
+                "help: \"My application state\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"feature.enabled\" } " +
+                    "gauge { value: 1.0 } " +
+                "} metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"is.alpha.version\" } " +
+                    "gauge { value: 0.0 } " +
+                "}";
+                //@formatter:on
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("my.application.state")
+                .withHelp("My application state")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("data.center", "us east"))
+                        .addState("feature.enabled", true)
+                        .addState("is.alpha.version", false)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, stateSet);
+        assertPrometheusText(prometheusText, stateSet);
+        assertPrometheusProtobuf(prometheusProtobuf, stateSet);
+    }
+
     @Test
     public void testUnknownComplete() throws IOException {
         String openMetrics = "" +
@@ -1481,6 +1709,43 @@ public void testUnknownMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, unknown);
     }
 
+    @Test
+    public void testUnknownWithDots() throws IOException {
+        String openMetrics = "" +
+                "# TYPE some_unknown_metric unknown\n" +
+                "# UNIT some_unknown_metric bytes\n" +
+                "# HELP some_unknown_metric help message\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP some_unknown_metric help message\n" +
+                "# TYPE some_unknown_metric untyped\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"some_unknown_metric\" " +
+                "help: \"help message\" " +
+                "type: UNTYPED " +
+                "metric { " +
+                    "label { name: \"test_env\" value: \"7\" } " +
+                    "untyped { value: 0.7 } " +
+                "}";
+                //@formatter:on
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("some.unknown.metric")
+                .withHelp("help message")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.of("test.env", "7"))
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertPrometheusProtobuf(prometheusProtobuf, unknown);
+    }
+
     @Test
     public void testHelpEscape() throws IOException {
         String openMetrics = "" +u}(j3  (349ebda602c544d46c02baee1d84ddc4694cc561j3  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X:  @@ -26,7 +26,7 @@ public interface Collector {
      */
     default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (includedNames.test(prometheusName(result.getMetadata().getName()))) {
+        if (includedNames.test(result.getMetadata().getPrometheusName())) {
             return result;
         } else {
             return null;
@@ -36,7 +36,7 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     /**
      * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
      */
-    default String getName() {
-        return collect().getMetadata().getName();
+    default String getPrometheusName() {
+        return collect().getMetadata().getPrometheusName();
     }
 }u}(j3  (8e5aff15f740e5e75a7a2e6119704cede91b5f5fj3  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  XX  @@ -29,7 +29,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
         MetricSnapshots allSnapshots = collect();
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (MetricSnapshot snapshot : allSnapshots) {
-            if (includedNames.test(prometheusName(snapshot.getMetadata().getName()))) {
+            if (includedNames.test(snapshot.getMetadata().getPrometheusName())) {
                 result.addMetricSnapshot(snapshot);
             }
         }
@@ -40,7 +40,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
      * Override this and return an empty list if the MultiCollector does not return a constant list of names
      * (names may be added / removed between scrapes).
      */
-    default List<String> getNames() {
-        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    default List<String> getPrometheusNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getPrometheusName()).collect(Collectors.toList());
     }
 }u}(j3  (373d32a89dc675a3b0fdb08c511c5b30b31bf9f6j3  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj 4  modifiedj3  Kj3  Kj4  K"j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -20,33 +20,33 @@ public class PrometheusRegistry {
     private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
 
     public void register(Collector collector) {
-        String name = collector.getName();
-        if (name != null) {
-            if (!prometheusNames.add(prometheusName(name))) {
-                throw new IllegalStateException("Can't register " + prometheusName(name) + " because a metric with that name is already registered.");
+        String prometheusName = collector.getPrometheusName();
+        if (prometheusName != null) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because a metric with that name is already registered.");
             }
         }
         collectors.add(collector);
     }
 
     public void register(MultiCollector collector) {
-        for (String name : collector.getNames()) {
-            if (!prometheusNames.add(prometheusName(name))) {
-                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        for (String prometheusName : collector.getPrometheusNames()) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because that name is already registered.");
             }
         }
         multiCollectors.add(collector);
     }
 
     public void unregister(Collector collector) {
         collectors.remove(collector);
-        prometheusNames.remove(prometheusName(collector.getName()));
+        prometheusNames.remove(collector.getPrometheusName());
     }
 
     public void unregister(MultiCollector collector) {
         multiCollectors.remove(collector);
-        for (String name : collector.getNames()) {
-            prometheusNames.remove(prometheusName(name));
+        for (String prometheusName : collector.getPrometheusNames()) {
+            prometheusNames.remove(prometheusName(prometheusName));
         }
     }
 
@@ -56,15 +56,15 @@ public MetricSnapshots scrape() {
             MetricSnapshot snapshot = collector.collect();
             if (snapshot != null) {
                 if (result.containsMetricName(snapshot.getMetadata().getName())) {
-                    throw new IllegalStateException(prometheusName(snapshot.getMetadata().getName()) + ": duplicate metric name.");
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
                 }
                 result.addMetricSnapshot(snapshot);
             }
         }
         for (MultiCollector collector : multiCollectors) {
             for (MetricSnapshot snapshot : collector.collect()) {
                 if (result.containsMetricName(snapshot.getMetadata().getName())) {
-                    throw new IllegalStateException(prometheusName(snapshot.getMetadata().getName()) + ": duplicate metric name.");
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
                 }
                 result.addMetricSnapshot(snapshot);
             }
@@ -78,19 +78,19 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            String name = collector.getName();
-            if (name == null || includedNames.test(prometheusName(name))) {
+            String prometheusName = collector.getPrometheusName();
+            if (prometheusName == null || includedNames.test(prometheusName)) {
                 MetricSnapshot snapshot = collector.collect(includedNames);
                 if (snapshot != null) {
                     result.addMetricSnapshot(snapshot);
                 }
             }
         }
         for (MultiCollector collector : multiCollectors) {
-            List<String> names = collector.getNames();
+            List<String> prometheusNames = collector.getPrometheusNames();
             boolean excluded = true; // the multi-collector is excluded unless at least one name matches
-            for (String name : names) {
-                if (includedNames.test(prometheusName(name))) {
+            for (String prometheusName : prometheusNames) {
+                if (includedNames.test(prometheusName)) {
                     excluded = false;
                     break;
                 }u}(j3  (60b1b58be1cab789e16cfeaeba13d7d505fce545j3  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javaj 4  modifiedj3  Kkj3  K j4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  Xc/  @@ -8,20 +8,34 @@
 import java.util.stream.Stream;
 
 import static io.prometheus.metrics.model.snapshots.PrometheusNaming.isValidLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Immutable set of name/value pairs, sorted by name.
  */
 public class Labels implements Comparable<Labels>, Iterable<Label> {
 
-    public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
+    public static final Labels EMPTY;
 
-    private final String[] names; // sorted
+    static {
+        String[] names = new String[]{};
+        String[] values = new String[]{};
+        EMPTY = new Labels(names, names, values);
+    }
+
+    // prometheusNames is the same as names, but dots are replaced with underscores.
+    // Labels is sorted by prometheusNames.
+    // If names[i] does not contain a dot, prometheusNames[i] references the same String as names[i]
+    // so that we don't have unnecessary duplicates of strings.
+    // If none of the names contains a dot, then prometheusNames references the same array as names
+    // so that we don't have unnecessary duplicate arrays.
+    private final String[] prometheusNames;
+    private final String[] names;
     private final String[] values;
 
-    private Labels(String[] names, String[] values) {
-        // names and values are already sorted and validated
+    private Labels(String[] names, String[] prometheusNames, String[] values) {
         this.names = names;
+        this.prometheusNames = prometheusNames;
         this.values = values;
     }
 
@@ -52,8 +66,23 @@ public static Labels of(String... keyValuePairs) {
             names[i] = keyValuePairs[2 * i];
             values[i] = keyValuePairs[2 * i + 1];
         }
-        sortAndValidate(names, values);
-        return new Labels(names, values);
+        String[] prometheusNames = makePrometheusNames(names);
+        sortAndValidate(names, prometheusNames, values);
+        return new Labels(names, prometheusNames, values);
+    }
+
+    // package private for testing
+    static String[] makePrometheusNames(String[] names) {
+        String[] prometheusNames = names;
+        for (int i=0; i<names.length; i++) {
+            if (names[i].contains(".")) {
+                if (prometheusNames == names) {
+                    prometheusNames = Arrays.copyOf(names, names.length);
+                }
+                prometheusNames[i] = PrometheusNaming.prometheusName(names[i]);
+            }
+        }
+        return prometheusNames;
     }
 
     /**
@@ -75,8 +104,9 @@ public static Labels of(List<String> names, List<String> values) {
         }
         String[] namesCopy = names.toArray(new String[0]);
         String[] valuesCopy = values.toArray(new String[0]);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
@@ -98,58 +128,67 @@ public static Labels of(String[] names, String[] values) {
         }
         String[] namesCopy = Arrays.copyOf(names, names.length);
         String[] valuesCopy = Arrays.copyOf(values, values.length);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
      * Test if these labels contain a specific label name.
+     * <p>
+     * Dots are treated as underscores, so {@code contains("my.label")} and {@code contains("my_label")} are the same.
      */
     public boolean contains(String labelName) {
-        for (String name : names) {
+        labelName = prometheusName(labelName);
+        for (String name : prometheusNames) {
             if (name.equals(labelName)) {
                 return true;
             }
         }
         return false;
     }
 
-    private static void sortAndValidate(String[] names, String[] values) {
-        sort(names, values);
-        validateNames(names);
+    private static void sortAndValidate(String[] names, String[] prometheusNames, String[] values) {
+        sort(names, prometheusNames, values);
+        validateNames(names, prometheusNames);
     }
 
-    private static void validateNames(String[] names) {
+    private static void validateNames(String[] names, String[] prometheusNames) {
         for (int i = 0; i < names.length; i++) {
             if (!isValidLabelName(names[i])) {
                 throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
             }
-            // names are sorted, so duplicates are next to each other
-            if (i > 0 && names[i - 1].equals(names[i])) {
+            // The arrays are sorted, so duplicates are next to each other
+            if (i > 0 && prometheusNames[i - 1].equals(prometheusNames[i])) {
                 throw new IllegalArgumentException(names[i] + ": duplicate label name");
             }
         }
     }
 
-    private static void sort(String[] names, String[] values) {
+    private static void sort(String[] names, String[] prometheusNames, String[] values) {
         // bubblesort
-        int n = names.length;
+        int n = prometheusNames.length;
         for (int i = 0; i < n - 1; i++) {
             for (int j = 0; j < n - i - 1; j++) {
-                if (names[j].compareTo(names[j + 1]) > 0) {
-                    swap(j, j + 1, names, values);
+                if (prometheusNames[j].compareTo(prometheusNames[j + 1]) > 0) {
+                    swap(j, j + 1, names, prometheusNames, values);
                 }
             }
         }
     }
 
-    private static void swap(int i, int j, String[] names, String[] values) {
+    private static void swap(int i, int j, String[] names, String[] prometheusNames, String[] values) {
         String tmp = names[j];
         names[j] = names[i];
         names[i] = tmp;
         tmp = values[j];
         values[j] = values[i];
         values[i] = tmp;
+        if (prometheusNames != names) {
+            tmp = prometheusNames[j];
+            prometheusNames[j] = prometheusNames[i];
+            prometheusNames[i] = tmp;
+        }
     }
 
     @Override
@@ -169,6 +208,15 @@ public String getName(int i) {
         return names[i];
     }
 
+    /**
+     * Like {@link #getName(int)}, but dots are replaced with underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName(int i) {
+        return prometheusNames[i];
+    }
+
     public String getValue(int i) {
         return values[i];
     }
@@ -178,32 +226,54 @@ public String getValue(int i) {
      * This and other must not contain the same label name.
      */
     public Labels merge(Labels other) {
+        if (this.isEmpty()) {
+            return other;
+        }
+        if (other.isEmpty()) {
+            return this;
+        }
         String[] names = new String[this.names.length + other.names.length];
+        String[] prometheusNames = names;
+        if (this.names != this.prometheusNames || other.names != other.prometheusNames) {
+            prometheusNames = new String[names.length];
+        }
         String[] values = new String[names.length];
         int thisPos = 0;
         int otherPos = 0;
         while (thisPos + otherPos < names.length) {
             if (thisPos >= this.names.length) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else if (otherPos >= other.names.length) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) < 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) < 0) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) > 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) > 0) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else {
                 throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
             }
         }
-        return new Labels(names, values);
+        return new Labels(names, prometheusNames, values);
     }
 
     /**
@@ -228,12 +298,13 @@ public Labels merge(String[] names, String[] values) {
         System.arraycopy(this.values, 0, mergedValues, 0, this.values.length);
         System.arraycopy(names, 0, mergedNames, this.names.length, names.length);
         System.arraycopy(values, 0, mergedValues, this.values.length, values.length);
-        sortAndValidate(mergedNames, mergedValues);
-        return new Labels(mergedNames, mergedValues);
+        String[] prometheusNames = makePrometheusNames(mergedNames);
+        sortAndValidate(mergedNames, prometheusNames, mergedValues);
+        return new Labels(mergedNames, prometheusNames, mergedValues);
     }
 
     public boolean hasSameNames(Labels other) {
-        return Arrays.equals(names, other.names);
+        return Arrays.equals(prometheusNames, other.prometheusNames);
     }
 
     public boolean hasSameValues(Labels other) {
@@ -242,7 +313,7 @@ public boolean hasSameValues(Labels other) {
 
     @Override
     public int compareTo(Labels other) {
-        int result = compare(names, other.names);
+        int result = compare(prometheusNames, other.prometheusNames);
         if (result != 0) {
             return result;
         }
@@ -275,6 +346,11 @@ private List<Label> asList() {
         return Collections.unmodifiableList(result);
     }
 
+    /**
+     * This must not be used in Prometheus exposition formats because names may contain dots.
+     * <p>
+     * However, for debugging it's better to show the original names rather than the Prometheus names.
+     */
     @Override
     public String toString() {
         StringBuilder b = new StringBuilder();
@@ -311,18 +387,17 @@ private void appendEscapedLabelValue(StringBuilder b, String value) {
         }
     }
 
-    // as labels are sorted by name, equals is insensitive to the order
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         Labels labels = (Labels) o;
-        return Arrays.equals(names, labels.names) && Arrays.equals(values, labels.values);
+        return labels.hasSameNames(this) && labels.hasSameValues(this);
     }
 
     @Override
     public int hashCode() {
-        int result = Arrays.hashCode(names);
+        int result = Arrays.hashCode(prometheusNames);
         result = 31 * result + Arrays.hashCode(values);
         return result;
     }u}(j3  (366805ddf9954e2b90078d43f8fdcadf4c88df76j3  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X_  @@ -18,7 +18,20 @@ public final class MetricMetadata {
      * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
      */
     private final String name;
+
+    /**
+     * Same as name, except if name contains dots, then the prometheusName is {@code name.replace(".", "_")}.
+     */
+    private final String prometheusName;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final String help;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final Unit unit;
 
     /**
@@ -48,19 +61,29 @@ public MetricMetadata(String name, String help, Unit unit) {
         this.help = help;
         this.unit = unit;
         validate();
+        this.prometheusName = name.contains(".") ? PrometheusNaming.prometheusName(name) : name;
     }
 
     /**
      * The name does not include the {@code _total} suffix for counter metrics
      * or the {@code _info} suffix for Info metrics.
      * <p>
-     * The name may contain dots. However, dots are automatically replaced by underscores
-     * in Prometheus exposition formats.
+     * The name may contain dots. Use {@link #getPrometheusName()} to get the name in Prometheus format,
+     * i.e. with dots replaced by underscores.
      */
     public String getName() {
         return name;
     }
 
+    /**
+     * Same as {@link #getName()} but with dots replaced by underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName() {
+        return prometheusName;
+    }
+
     public String getHelp() {
         return help;
     }u}(j3  (7faaa63998c19f3127cb26208547237fdd5548bfj3  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -59,7 +59,7 @@ public static abstract class Builder<T extends Builder<T>> {
         /**
          * The name is required.
          * If the name is missing or invalid, {@code build()} will throw an {@link IllegalArgumentException}.
-         * See {@link MetricMetadata#isValidMetricName(String)} for info on valid metric names.
+         * See {@link PrometheusNaming#isValidMetricName(String)} for info on valid metric names.
          */
         public T withName(String name) {
             this.name = name;u}(j3  (5308e6f9822dbf2060d3bc890378147102554514j3  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -37,10 +37,10 @@ public MetricSnapshots(MetricSnapshot... snapshots) {
      */
     public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
         List<MetricSnapshot> list = new ArrayList<>(snapshots);
-        list.sort(comparing(s -> prometheusName(s.getMetadata().getName())));
+        list.sort(comparing(s -> s.getMetadata().getPrometheusName()));
         for (int i = 0; i < snapshots.size() - 1; i++) {
-            if (prometheusName(list.get(i).getMetadata().getName()).equals(prometheusName(list.get(i + 1).getMetadata().getName()))) {
-                throw new IllegalArgumentException(prometheusName(list.get(i).getMetadata().getName()) + ": duplicate metric name");
+            if (list.get(i).getMetadata().getPrometheusName().equals(list.get(i + 1).getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException(list.get(i).getMetadata().getPrometheusName() + ": duplicate metric name");
             }
         }
         this.snapshots = unmodifiableList(list);
@@ -80,7 +80,7 @@ private Builder() {
 
         public boolean containsMetricName(String name) {
             for (MetricSnapshot snapshot : snapshots) {
-                if (prometheusName(snapshot.getMetadata().getName()).equals(prometheusName(name))) {
+                if (snapshot.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                     return true;
                 }
             }u}(j3  (58de0c814385d31a732df26926a3fe56d2377a9ej3  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/PrometheusNaming.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X)  @@ -45,9 +45,10 @@ public class PrometheusNaming {
      * <li>The name must match {@link #METRIC_NAME_PATTERN}.</li>
      * <li>The name MUST NOT end with one of the {@link #RESERVED_METRIC_NAME_SUFFIXES}.</li>
      * </ul>
-     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
-     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but the {@code prometheus-metrics-model}
-     * does not enforce Unit suffixes).
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix.
+     * Note that <a href="https://openmetrics.io/">OpenMetrics</a> requires metric names to have their unit as suffix,
+     * and we implement this in {@code prometheus-metrics-core}. However, {@code prometheus-metrics-model}
+     * does not enforce Unit suffixes.
      * <p>
      * Example: If you create a Counter for a processing time with Unit {@link Unit#SECONDS SECONDS},
      * the name should be {@code processing_time_seconds}. When exposed in OpenMetrics Text format,
@@ -78,7 +79,8 @@ static String validateMetricName(String name) {
     }
 
     public static boolean isValidLabelName(String name) {
-        return LABEL_NAME_PATTERN.matcher(name).matches() && !prometheusName(name).startsWith("__");
+        return LABEL_NAME_PATTERN.matcher(name).matches() &&
+                !(name.startsWith("__") || name.startsWith("._") || name.startsWith("..") || name.startsWith("_."));
     }
 
     /**
@@ -127,7 +129,7 @@ public static String sanitizeLabelName(String labelName) {
             throw new IllegalArgumentException("Cannot convert an empty string to a valid label name.");
         }
         String sanitizedName = replaceIllegalCharsInLabelName(labelName);
-        while (prometheusName(sanitizedName).startsWith("__")) {
+        while (sanitizedName.startsWith("__") || sanitizedName.startsWith("_.") || sanitizedName.startsWith("._") || sanitizedName.startsWith("..")) {
             sanitizedName = sanitizedName.substring(1);
         }
         return sanitizedName;u}(j3  (9b0c4f07d7f0601545a394b4f9082ec3194aeeebj3  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  Xt  @@ -30,8 +30,8 @@ private void validate() {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
         for (StateSetDataPointSnapshot entry : getData()) {
-            if (entry.getLabels().contains(getMetadata().getName())) {
-                throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
+            if (entry.getLabels().contains(getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException("Label name " + getMetadata().getPrometheusName() + " is reserved.");
             }
         }
     }u}(j3  (8519f5f277ee317712db90c768f587c3091c09d6j3  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/PrometheusRegistryTest.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  @@ -18,7 +18,7 @@ public MetricSnapshot collect() {
         }
 
         @Override
-        public String getName() {
+        public String getPrometheusName() {
             return null;
         }
     };u}(j3  (d7a3e8b3e4bca4ac75de0f7b9a390dc602ce10bfj3  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javaj 4  modifiedj3  K6j3  K j4  K6j4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X	  @@ -49,6 +49,20 @@ public void testCompareDifferentNumberOfLabels() {
         assertNotEquals(labels2, labels1);
     }
 
+    @Test
+    public void testComparePrometheusNames() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.b", "val");
+        assertLessThan(labels1, labels2); // this is true because it compares "my_a" to "my_b".
+    }
+
+    @Test
+    public void testEqualsHashcodeDots() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.a", "val");
+        Assert.assertEquals(labels1, labels2);
+        Assert.assertEquals(labels1.hashCode(), labels2.hashCode());
+    }
 
     @Test
     public void testCompareEquals() {
@@ -74,4 +88,44 @@ public void testReservedLabelName() {
     public void testDuplicateLabelName() {
         Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
     }
+
+    @Test
+    public void testMakePrometheusNames() {
+        String[] names = new String[]{};
+        String[] prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"no_dots", "at_all"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"dots", "here.it.is"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertNotSame(names, prometheusNames);
+        Assert.assertSame(names[0], prometheusNames[0]);
+        Assert.assertEquals("here.it.is", names[1]);
+        Assert.assertEquals("here_it_is", prometheusNames[1]);
+    }
+
+    @Test
+    public void testMerge() {
+        Labels labels1 = Labels.of("key.1", "value 1", "key.3", "value 3");
+        Labels labels2 = Labels.of("key_2", "value 2");
+        Labels merged = labels2.merge(labels1);
+        Assert.assertEquals("key.1", merged.getName(0));
+        Assert.assertEquals("key_2", merged.getName(1));
+        Assert.assertEquals("key.3", merged.getName(2));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testMergeDuplicateName() {
+        Labels labels1 = Labels.of("key_one", "v1");
+        Labels labels2 = Labels.of("key.one", "v2");
+        labels2.merge(labels1);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateName() {
+        Labels.of("key_one", "v1", "key.one", "v2");
+    }
 }u}(j3  (6e76f724a29dcaadcae96d15cf691cae4b8f302fj3  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javaj 4  modifiedj3  Kj3  Kj4  Kj4  https://github.com/prometheus/client_java/blob/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj4  https://github.com/prometheus/client_java/raw/0816bafbb3febeebf5126704cd2f1dc77a51f16a/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj4  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=0816bafbb3febeebf5126704cd2f1dc77a51f16aj	4  X  @@ -27,7 +27,7 @@ public void testIllegalName() {
     public void testSanitizationIllegalCharacters() {
         MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_namespace/http.server.duration"), "help string", Unit.SECONDS);
         Assert.assertEquals("my_namespace_http.server.duration", metadata.getName());
-        Assert.assertEquals("my_namespace_http_server_duration", prometheusName(metadata.getName()));
+        Assert.assertEquals("my_namespace_http_server_duration", metadata.getPrometheusName());
         Assert.assertEquals("help string", metadata.getHelp());
         Assert.assertEquals("seconds", metadata.getUnit().toString());
     }ueu(d516e835c45fa29e0dc102a24d37ac255b94f8fe}(sha(d516e835c45fa29e0dc102a24d37ac255b94f8fenode_idEC_kwDOAHoJt9oAKGQ1MTZlODM1YzQ1ZmEyOWUwZGMxMDJhMjRkMzdhYzI1NWI5NGY4ZmUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-05-11T14:13:08Zu	committer}(j4  Fabian Stäberj4  fabian@fstab.dej4  2023-07-16T21:56:42ZumessageZPrometheus Metrics 1.0.x - Initial Commit

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j4  (0a61c25875cfd8022c18e5c23b8b1ef4f028ee0eurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/0a61c25875cfd8022c18e5c23b8b1ef4f028ee0euj4  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d516e835c45fa29e0dc102a24d37ac255b94f8fe
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj4  dhttps://api.github.com/repos/prometheus/client_java/commits/d516e835c45fa29e0dc102a24d37ac255b94f8fehtml_urlYhttps://github.com/prometheus/client_java/commit/d516e835c45fa29e0dc102a24d37ac255b94f8fecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d516e835c45fa29e0dc102a24d37ac255b94f8fe/commentsj4  }(loginfstabidJ' j4  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j4  "https://api.github.com/users/fstabj	5  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj4  }(j5  fstabj5  J' j4  MDQ6VXNlcjMzMDUzNQ==j5  2https://avatars.githubusercontent.com/u/330535?v=4j5  h3j4  "https://api.github.com/users/fstabj	5  https://github.com/fstabj5  ,https://api.github.com/users/fstab/followersj5  9https://api.github.com/users/fstab/following{/other_user}j5  2https://api.github.com/users/fstab/gists{/gist_id}j5  9https://api.github.com/users/fstab/starred{/owner}{/repo}j5  0https://api.github.com/users/fstab/subscriptionsj!5  'https://api.github.com/users/fstab/orgsj#5  (https://api.github.com/users/fstab/reposj%5  3https://api.github.com/users/fstab/events{/privacy}j'5  2https://api.github.com/users/fstab/received_eventsj)5  Userj+5  uparents]}(j4  (98967b8367216f4107ad5621f260ed895c930262j4  dhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262j	5  Yhttps://github.com/prometheus/client_java/commit/98967b8367216f4107ad5621f260ed895c930262uastats}(totalM~	additionsM=}	deletionsMufiles](}(j4  (8e864014bfb4e6534f90514124e41b5544b006b3filename.circleci/config.ymlstatusmodifiedjE5  KjF5  K changesKblob_urlnhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fepatchX  @@ -16,6 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
+      - run: cd protobuf-shaded && ../mvnw install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(j4  (db455570b12cd7b9ff47bbf1afeb9e0cdd38584fjK5  benchmarks/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  lhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/benchmarks%2Fpom.xmljR5  khttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/benchmarks%2Fpom.xmljT5  ~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X9  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j4  (fb53876ed4e255583338681850c3fe83632258e6jK5  examples/pom.xmljM5  addedjE5  K'jF5  K jO5  K'jP5  jhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Fpom.xmljR5  ihttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Fpom.xmljT5  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>examples</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Prometheus Metrics Examples</name>
+    <description>
+        Example projects for the Prometheus Metrics Library.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>tomcat-servlet-example</module>
+    </modules>
+
+</project>u}(j4  (0688b6045eb0b65a1275f54dcfa287b780ba7c24jK5  'examples/tomcat-servlet-example/pom.xmljM5  addedjE5  KLjF5  K jO5  KLjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tomcat-servlet-example</artifactId>
+
+    <name>Tomcat Servlet Example</name>
+    <description>
+        Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.tomcat_servlet.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u     }(j4  (97d4161ef49a383d7bf918acb98fcbd6eea26ee6jK5  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javajM5  addedjE5  K/jF5  K jO5  K/jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajT5  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.examples.tomcat_servlet;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.model.snapshots.Unit;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.Random;
+
+import static io.prometheus.metrics.model.snapshots.Unit.nanosToSeconds;
+
+public class HelloWorldServlet extends HttpServlet {
+
+    private final Random random = new Random(0);
+
+    private final Counter counter = Counter.newBuilder()
+            .withName("requests_total")
+            .withHelp("total number of requests")
+            .withLabelNames("http_status")
+            .register();
+
+    private final Histogram histogram = Histogram.newBuilder()
+            .withName("request_duration_seconds")
+            .withHelp("request duration in seconds")
+            .withUnit(Unit.SECONDS)
+            .withLabelNames("http_status")
+            .register();
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        long start = System.nanoTime();
+        try {
+            Thread.sleep((long) (Math.abs((random.nextGaussian() + 1.0) * 100.0)));
+            resp.setStatus(200);
+            resp.setContentType("text/plain");
+            resp.getWriter().println("Hello, World!");
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        } finally {
+            counter.withLabelValues("200").inc();
+            histogram.withLabelValues("200").observe(nanosToSeconds(System.nanoTime() - start));
+        }
+    }
+}u}(j4  (759b88cb9bc8fadf1b0140bad4f789f6af8baee3jK5  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajM5  addedjE5  K"jF5  K jO5  K"jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajT5  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xw  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.examples.tomcat_servlet;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+/**
+ * Simple example using embedded Tomcat an the {@link PrometheusMetricsServlet}.
+ */
+public class Main {
+
+    public static void main(String[] args) throws LifecycleException {
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(8080);
+
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+
+        Tomcat.addServlet(ctx, "hello", new HelloWorldServlet());
+        ctx.addServletMappingDecoded("/*", "hello");
+
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+}u}(j4  (44758744c4f0ad45f6722d4d54792c1ddad04f5fjK5  #integration_tests/it_common/pom.xmljM5  modifiedjE5  KjF5  K	jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_common%2Fpom.xmljR5  ~https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_common%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>
@@ -32,14 +32,6 @@
       </testResource>
     </testResources>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>u}(j4  (80a97e549f0ce7481a2d485584c655245de3358djK5  1integration_tests/it_exemplars_otel_agent/pom.xmljM5  modifiedjE5  KjF5  K	jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>
@@ -85,14 +85,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j4  (90c99c15596b192de324a53de84b880afe94dec7jK5  /integration_tests/it_exemplars_otel_sdk/pom.xmljM5  modifiedjE5  KjF5  K	jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>
@@ -63,14 +63,6 @@
   <build>
     <finalName>example-open-telemetry-app</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j4  (3e6287a1352b9b9f6660258165c2d354c167dfc8jK5  }integration_tests/it_exemplars_otel_sdk/src/test/java/io/prometheus/client/it/exemplars_otel/ExemplarsOpenTelemetrySdkIT.javajM5  modifiedjE5  KjF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.javajT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -16,7 +16,7 @@
 
 /**
  * Test if traces from the OpenTelemetry SDK are picked up as Exemplars.
- * <p/>
+ * <p>
  * In addition, we make sure that missing OpenTelemetry dependencies do not cause client_java to crash the application.
  **/
 public class ExemplarsOpenTelemetrySdkIT {
@@ -65,7 +65,7 @@ public void testGoodCase() throws IOException {
     /**
      * The dependency simpleclient_tracer_otel_agent is for getting the trace context from the OpenTelemetry Java agent.
      * As we are getting the trace context from the OpenTelemetry SDK and not from the agent, Exemplars should work.
-     * <p/>
+     * <p>
      * We test this because if a user excludes simpleclient_tracer_otel_agent from the transitive dependencies for some reason
      * we don't want client_java to break.
      */
@@ -78,7 +78,7 @@ public void testOtelAgentMissing() throws IOException, URISyntaxException {
     /**
      * The dependency simpleclient_tracer_otel is for getting the trace context from the OpenTelemetry SDK.
      * If this dependency is missing, Exemplars will be missing, but metrics should still work.
-     * <p/>
+     * <p>
      * We test this because users may exclude simpleclient_tracer_otel as a way to disable OpenTelemetry Exemplars.
      */
     @Testu}(j4  (64441aee0be4d8e126583ea74ca23cb67dddfeefjK5  *integration_tests/it_java_versions/pom.xmljM5  modifiedjE5  KjF5  K)jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_java_versions%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_java_versions%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>
@@ -72,53 +72,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j4  (e854ed193574f7ef12b6e71638be38eb9c7e5305jK5  jintegration_tests/it_java_versions/src/test/java/io/prometheus/client/it/java_versions/JavaVersionsIT.javajM5  modifiedjE5  KjF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javajT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -1,5 +1,6 @@
 package io.prometheus.client.it.java_versions;
 
+import com.github.dockerjava.api.model.Ulimit;
 import io.prometheus.client.it.common.LogConsumer;
 import io.prometheus.client.it.common.Scraper;
 import io.prometheus.client.it.common.Version;
@@ -35,9 +36,7 @@ public static String[] images() {
             "openjdk:8-jre",
             "openjdk:11-jre",
             "openjdk:17",
-            "ticketfly/java:6",
             "adoptopenjdk/openjdk16:ubi-minimal-jre",
-            "azul/zulu-openjdk:6",
 
             // OpenJ9
             "ibmjava:8-jre",
@@ -50,6 +49,7 @@ public JavaVersionsIT(String image) throws IOException, URISyntaxException {
     exampleApplicationDir = Volume.create("it-java-versions")
             .copyFromTargetDirectory(exampleApplicationJar);
     javaContainer = new GenericContainer<>(image)
+            .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
             .withFileSystemBind(exampleApplicationDir.getHostPath(), "/app", BindMode.READ_ONLY)
             .withWorkingDirectory("/app")
             .withLogConsumer(LogConsumer.withPrefix(image))u}(j4  (3090704cdb55be24a678bc5725c15ba5fbff8fbejK5  #integration_tests/it_log4j2/pom.xmljM5  modifiedjE5  KjF5  K,jO5  K-jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_log4j2%2Fpom.xmljR5  ~https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_log4j2%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>
@@ -88,56 +88,13 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <!-- We compile this for Java 6, but as log4j 2.15.0 requires Java >= 7 at runtime it will not run on -->
-                    <!-- Java 6 with the latest log4j version. However, let's keep Java 6 here to make it easy to manually -->
-                    <!-- downgrade to log4j 2.3 to run a quick test with Java 6. -->
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
 
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j4  (8272880ba0c03be2b269001fe9aac4a7b4526ef7jK5  Vintegration_tests/it_log4j2/src/test/java/io/prometheus/client/it/log4j2/Log4j2IT.javajM5  modifiedjE5  K jF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javajT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X]  @@ -24,8 +24,6 @@
 public class Log4j2IT {
 
     private final String image = "openjdk:8-jre";
-    // This test is green with a Java 6 image, but you need to downgrade the log4j version in pom.xml.
-    // private final String image = "azul/zulu-openjdk:6";
     private final Volume volume;
     private final GenericContainer<?> javaContainer;
 u}(j4  (aa17740a1a38769a29bdff94c1e4a80af68f5053jK5  (integration_tests/it_pushgateway/pom.xmljM5  modifiedjE5  KjF5  K)jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_pushgateway%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_pushgateway%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>
@@ -69,53 +69,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j4  (d0fb6dac38a5c5ce33a641e43636b8636d5c3decjK5  eintegration_tests/it_pushgateway/src/test/java/io/prometheus/client/it/pushgateway/PushGatewayIT.javajM5  modifiedjE5  KjF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javajT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -1,5 +1,6 @@
 package io.prometheus.client.it.pushgateway;
 
+import com.github.dockerjava.api.model.Ulimit;
 import io.prometheus.client.it.common.LogConsumer;
 import io.prometheus.client.it.common.Scraper;
 import io.prometheus.client.it.common.Version;
@@ -33,8 +34,6 @@ public class PushGatewayIT {
     @Parameterized.Parameters(name = "{0}")
     public static String[] images() {
         return new String[] {
-                "azul/zulu-openjdk:6",
-                "openjdk:7",
                 "ibmjava:8-jre",
                 "openjdk:11-slim",
                 "openjdk:17"
@@ -47,13 +46,15 @@ public PushGatewayIT(String image) throws IOException, URISyntaxException {
                 .copyFromTargetDirectory(batchJobJar);
         Network network = Network.newNetwork();
         pushGatewayContainer = new GenericContainer<>("prom/pushgateway")
+                .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
                 .withCopyFileToContainer(MountableFile.forClasspathResource("web-config.yml", 0644), "/")
                 .withNetwork(network)
                 .withNetworkAliases("pushgateway")
                 .withLogConsumer(LogConsumer.withPrefix("prom/pushgateway"))
                 .withCommand("--web.config.file=/web-config.yml")
                 .withExposedPorts(9091);
         javaContainer = new GenericContainer<>(image)
+                .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
                 .withFileSystemBind(batchJobDir.getHostPath(), "/app", BindMode.READ_ONLY)
                 .withNetwork(network)
                 .withWorkingDirectory("/app")u}(j4  (487dba31d5597ce66a658992b8b9977871160b73jK5  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljM5  modifiedjE5  KjF5  K	jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>
@@ -58,14 +58,6 @@
   <build>
     <finalName>${project.artifactId}</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j4  (05a56956fc66fe059485a69aef350171c78564c1jK5  integration_tests/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  shttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fpom.xmljR5  rhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/integration_tests%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X@  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j4  (49a6cc19b6905ac7e4858c5f5ecd3122fa177380jK5  pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  _https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/pom.xmljR5  ^https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/pom.xmljT5  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -4,8 +4,8 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>io.prometheus</groupId>
-    <artifactId>parent</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
 
     <name>Prometheus Java Suite</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -37,6 +37,18 @@
     </developers>
 
     <modules>
+        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
+        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
+        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
+        <module>prometheus-metrics-core</module>
+        <module>prometheus-metrics-config</module>
+        <module>prometheus-metrics-model</module>
+        <module>prometheus-metrics-tracer</module>
+        <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>examples</module>
+        <!-- <module>tmp_example</module> -->
+
         <module>simpleclient</module>
         <module>simpleclient_common</module>
         <module>simpleclient_caffeine</module>
@@ -54,7 +66,7 @@
         <module>simpleclient_servlet_common</module>
         <module>simpleclient_servlet_jakarta</module>
         <module>simpleclient_spring_web</module>
-        <module>simpleclient_spring_boot</module>
+        <!-- <module>simpleclient_spring_boot</module> --> <!-- requires Java <= 11 to compile. removing to enable compilation with Java 17 -->
         <module>simpleclient_jetty</module>
         <module>simpleclient_jetty_jdk8</module>
         <module>simpleclient_tracer</module>
@@ -206,6 +218,7 @@
                     <linksource>true</linksource>
                     <source>8</source>
                     <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
+                    <sourcepath>src/main/java;src/main/generated</sourcepath>
                 </configuration>
                 <executions>
                     <execution>
@@ -218,11 +231,10 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>u}(j4  (5810c19b79e0ad001fbcb0acc455f4e7f7e0d629jK5  !prometheus-metrics-config/pom.xmljM5  addedjE5  K-jF5  K jO5  K-jP5  {https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fpom.xmljR5  zhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-config</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Config</name>
+    <description>
+        Configuration for Prometheus metrics and exposition formats.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j4  (7d996f6a560211062ec448f454682020914a5295jK5  ]prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarsProperties.javajM5  addedjE5  KrjF5  K jO5  KrjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,114 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exemplars
+ */
+public class ExemplarsProperties {
+
+    private static final String MIN_RETENTION_PERIOD_SECONDS = "minRetentionPeriodSeconds";
+    private static final String MAX_RETENTION_PERIOD_SECONDS = "maxRetentionPeriodSeconds";
+    private static final String SAMPLE_INTERVAL_MILLISECONDS = "sampleIntervalMilliseconds";
+
+    private final Integer minRetentionPeriodSeconds;
+    private final Integer maxRetentionPeriodSeconds;
+    private final Integer sampleIntervalMilliseconds;
+
+    private ExemplarsProperties(
+            Integer minRetentionPeriodSeconds,
+            Integer maxRetentionPeriodSeconds,
+            Integer sampleIntervalMilliseconds) {
+        this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
+        this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
+        this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
+    }
+
+    /**
+     * Minimum time how long Exemplars are kept before they may be replaced by new Exemplars.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MIN_RETENTION_PERIOD_SECONDS}
+     */
+    public Integer getMinRetentionPeriodSeconds() {
+        return minRetentionPeriodSeconds;
+    }
+
+    /**
+     * Maximum time how long Exemplars are kept before they are evicted.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MAX_RETENTION_PERIOD_SECONDS}
+     */
+    public Integer getMaxRetentionPeriodSeconds() {
+        return maxRetentionPeriodSeconds;
+    }
+
+    /**
+     * Time between attempts to sample new Exemplars. This is a performance improvement for high-frequency
+     * applications, because with the sample interval we make sure that the exemplar sampler is not called
+     * for every single request.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_SAMPLE_INTERVAL_MILLISECONDS}
+     */
+    public Integer getSampleIntervalMilliseconds() {
+        return sampleIntervalMilliseconds;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExemplarsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
+        Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
+        Integer sampleIntervalMilliseconds = Util.loadInteger(prefix + "." + SAMPLE_INTERVAL_MILLISECONDS, properties);
+
+        Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MIN_RETENTION_PERIOD_SECONDS);
+        Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MAX_RETENTION_PERIOD_SECONDS);
+        Util.assertValue(sampleIntervalMilliseconds, t -> t > 0, "Expecting value > 0.", prefix, SAMPLE_INTERVAL_MILLISECONDS);
+
+        if (minRetentionPeriodSeconds != null && maxRetentionPeriodSeconds != null) {
+            if (minRetentionPeriodSeconds > maxRetentionPeriodSeconds) {
+                throw new PrometheusPropertiesException(prefix + "." + MIN_RETENTION_PERIOD_SECONDS + " must not be greater than " + prefix + "." + MAX_RETENTION_PERIOD_SECONDS + ".");
+            }
+        }
+
+        return new ExemplarsProperties(
+                minRetentionPeriodSeconds,
+                maxRetentionPeriodSeconds,
+                sampleIntervalMilliseconds
+        );
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer minRetentionPeriodSeconds;
+        private Integer maxRetentionPeriodSeconds;
+        private Integer sampleIntervalMilliseconds;
+
+        private Builder() {
+        }
+
+        public Builder withMinRetentionPeriodSeconds(int minRetentionPeriodSeconds) {
+            this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withMaxRetentionPeriodSeconds(int maxRetentionPeriodSeconds) {
+            this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withSampleIntervalMilliseconds(int sampleIntervalMilliseconds) {
+            this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
+            return this;
+        }
+
+        public ExemplarsProperties builder() {
+            return new ExemplarsProperties(minRetentionPeriodSeconds, maxRetentionPeriodSeconds, sampleIntervalMilliseconds);
+        }
+    }
+}u}(j4  (2509853293246174435bd8a8fc49bb074363eeb8jK5  bprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterFilterProperties.javajM5  addedjE5  KujF5  K jO5  KujP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,117 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter.filter
+ */
+public class ExporterFilterProperties {
+
+    public static final String NAME_MUST_BE_EQUAL_TO = "nameMustBeEqualTo";
+    public static final String NAME_MUST_NOT_BE_EQUAL_TO = "nameMustNotBeEqualTo";
+    public static final String NAME_MUST_START_WITH = "nameMustStartWith";
+    public static final String NAME_MUST_NOT_START_WITH = "nameMustNotStartWith";
+
+    private final List<String> allowedNames;
+    private final List<String> excludedNames;
+    private final List<String> allowedPrefixes;
+    private final List<String> excludedPrefixes;
+
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes) {
+        this(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, "");
+    }
+
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes, String prefix) {
+        this.allowedNames = allowedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedNames));
+        this.excludedNames = excludedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedNames));
+        this.allowedPrefixes = allowedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedPrefixes));
+        this.excludedPrefixes = excludedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedPrefixes));
+        validate(prefix);
+    }
+
+    public List<String> getAllowedNames() {
+        return allowedNames;
+    }
+
+    public List<String> getExcludedNames() {
+        return excludedNames;
+    }
+
+    public List<String> getAllowedPrefixes() {
+        return allowedPrefixes;
+    }
+
+    public List<String> getExcludedPrefixes() {
+        return excludedPrefixes;
+    }
+
+    private void validate(String prefix) throws PrometheusPropertiesException {
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterFilterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        List<String> allowedNames = Util.loadStringList(prefix + "." + NAME_MUST_BE_EQUAL_TO, properties);
+        List<String> excludedNames = Util.loadStringList(prefix + "." + NAME_MUST_NOT_BE_EQUAL_TO, properties);
+        List<String> allowedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_START_WITH, properties);
+        List<String> excludedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_NOT_START_WITH, properties);
+        return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, prefix);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private List<String> allowedNames;
+        private List<String> excludedNames;
+        private List<String> allowedPrefixes;
+        private List<String> excludedPrefixes;
+
+        private Builder() {
+        }
+
+        /**
+         * Only allowed metric names will be exposed.
+         */
+        public Builder withAllowedNames(String... allowedNames) {
+            this.allowedNames = Arrays.asList(allowedNames);
+            return this;
+        }
+
+        /**
+         * Excluded metric names will not be exposed.
+         */
+        public Builder withExcludedNames(String... excludedNames) {
+            this.excludedNames = Arrays.asList(excludedNames);
+            return this;
+        }
+
+        /**
+         * Only metrics with a name starting with an allowed prefix will be exposed.
+         */
+        public Builder withAllowedPrefixes(String... allowedPrefixes) {
+            this.allowedPrefixes = Arrays.asList(allowedPrefixes);
+            return this;
+        }
+
+        /**
+         * Metrics with a name starting with an excluded prefix will not be exposed.
+         */
+        public Builder withExcludedPrefixes(String... excludedPrefixes) {
+            this.excludedPrefixes = Arrays.asList(excludedPrefixes);
+            return this;
+        }
+
+        public ExporterFilterProperties build() {
+            return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes);
+        }
+    }
+}u}(j4  (8c9d7aa3913d66d7b5a2140f5d49acd93d1eff7fjK5  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javajM5  addedjE5  K2jF5  K jO5  K2jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,50 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter.httpServer
+ */
+public class ExporterHttpServerProperties {
+
+    // TODO: Not used yet, will be used when we port the simpleclient_httpserver module to the new data model.
+
+    private static final String PORT = "port";
+    private final Integer port;
+
+    private ExporterHttpServerProperties(Integer port) {
+        this.port = port;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterHttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Integer port = Util.loadInteger(prefix + "." + PORT, properties);
+        Util.assertValue(port, t -> t > 0, "Expecting value > 0", prefix, PORT);
+        return new ExporterHttpServerProperties(port);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer port;
+
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        public ExporterHttpServerProperties build() {
+            return new ExporterHttpServerProperties(port);
+        }
+    }
+}u}(j4  (016d399f044544938a5a34bee32e3d429e9dd35fjK5  \prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterProperties.javajM5  addedjE5  KNjF5  K jO5  KNjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,78 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter
+ */
+public class ExporterProperties {
+
+    private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
+    private static final String EXEMPLARS_ON_ALL_METRIC_TYPES = "exemplarsOnAllMetricTypes";
+
+    private final Boolean includeCreatedTimestamps;
+    private final Boolean exemplarsOnAllMetricTypes;
+
+    private ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
+        this.includeCreatedTimestamps = includeCreatedTimestamps;
+        this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
+    }
+
+    /**
+     * Include the {@code _created} timestamps in text format? Default is {@code false}.
+     */
+    public boolean getIncludeCreatedTimestamps() {
+        return includeCreatedTimestamps != null && includeCreatedTimestamps;
+    }
+
+    /**
+     * Allow Exemplars on all metric types in OpenMetrics format?
+     * Default is {@code false}, which means Exemplars will only be added for Counters and Histograms.
+     */
+    public boolean getExemplarsOnAllMetricTypes() {
+        return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
+        Boolean exemplarsOnAllMetricTypes = Util.loadBoolean(prefix + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
+        return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Boolean includeCreatedTimestamps;
+        private Boolean exemplarsOnAllMetricTypes;
+
+        private Builder() {
+        }
+
+        /**
+         * See {@link #getIncludeCreatedTimestamps()}
+         */
+        public Builder withIncludeCreatedTimestamps(boolean includeCreatedTimestamps) {
+            this.includeCreatedTimestamps = includeCreatedTimestamps;
+            return this;
+        }
+
+        /**
+         * See {@link #getExemplarsOnAllMetricTypes()}.
+         */
+        public Builder withExemplarsOnAllMetricTypes(boolean exemplarsOnAllMetricTypes) {
+            this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
+            return this;
+        }
+
+        public ExporterProperties build() {
+            return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+        }
+    }
+}u}(j4  (10966b3c8215159c783db7b3476d360bde26b707jK5  [prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsProperties.javajM5  addedjE5  MjF5  K jO5  MjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XK  @@ -0,0 +1,432 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static java.util.Collections.unmodifiableList;
+
+/**
+ * Properties starting with io.prometheus.metrics
+ */
+public class MetricsProperties {
+
+    private static final String EXEMPLARS_ENABLED = "exemplarsEnabled";
+    private static final String HISTOGRAM_NATIVE_ONLY = "histogramNativeOnly";
+    private static final String HISTOGRAM_CLASSIC_ONLY = "histogramClassicOnly";
+    private static final String HISTOGRAM_CLASSIC_UPPER_BOUNDS = "histogramClassicUpperBounds";
+    private static final String HISTOGRAM_NATIVE_INITIAL_SCHEMA = "histogramNativeInitialSchema";
+    private static final String HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD = "histogramNativeMinZeroThreshold";
+    private static final String HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD = "histogramNativeMaxZeroThreshold";
+    private static final String HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS = "histogramNativeMaxNumberOfBuckets"; // 0 means unlimited number of buckets
+    private static final String HISTOGRAM_NATIVE_RESET_DURATION_SECONDS = "histogramNativeResetDurationSeconds"; // 0 means no reset
+    private static final String SUMMARY_QUANTILES = "summaryQuantiles";
+    private static final String SUMMARY_QUANTILE_ERRORS = "summaryQuantileErrors";
+    private static final String SUMMARY_MAX_AGE_SECONDS = "summaryMaxAgeSeconds";
+    private static final String SUMMARY_NUMBER_OF_AGE_BUCKETS = "summaryNumberOfAgeBuckets";
+
+    private final Boolean exemplarsEnabled;
+    private final Boolean histogramNativeOnly;
+    private final Boolean histogramClassicOnly;
+    private final List<Double> histogramClassicUpperBounds;
+    private final Integer histogramNativeInitialSchema;
+    private final Double histogramNativeMinZeroThreshold;
+    private final Double histogramNativeMaxZeroThreshold;
+    private final Integer histogramNativeMaxNumberOfBuckets;
+    private final Long histogramNativeResetDurationSeconds;
+    private final List<Double> summaryQuantiles;
+    private final List<Double> summaryQuantileErrors;
+    private final Long summaryMaxAgeSeconds;
+    private final Integer summaryNumberOfAgeBuckets;
+
+    public MetricsProperties(
+            Boolean exemplarsEnabled,
+            Boolean histogramNativeOnly,
+            Boolean histogramClassicOnly,
+            List<Double> histogramClassicUpperBounds,
+            Integer histogramNativeInitialSchema,
+            Double histogramNativeMinZeroThreshold,
+            Double histogramNativeMaxZeroThreshold,
+            Integer histogramNativeMaxNumberOfBuckets,
+            Long histogramNativeResetDurationSeconds,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
+            Long summaryMaxAgeSeconds,
+            Integer summaryNumberOfAgeBuckets) {
+        this(exemplarsEnabled,
+                histogramNativeOnly,
+                histogramClassicOnly,
+                histogramClassicUpperBounds,
+                histogramNativeInitialSchema,
+                histogramNativeMinZeroThreshold,
+                histogramNativeMaxZeroThreshold,
+                histogramNativeMaxNumberOfBuckets,
+                histogramNativeResetDurationSeconds,
+                summaryQuantiles,
+                summaryQuantileErrors,
+                summaryMaxAgeSeconds,
+                summaryNumberOfAgeBuckets,
+                "");
+    }
+
+    private MetricsProperties(
+            Boolean exemplarsEnabled,
+            Boolean histogramNativeOnly,
+            Boolean histogramClassicOnly,
+            List<Double> histogramClassicUpperBounds,
+            Integer histogramNativeInitialSchema,
+            Double histogramNativeMinZeroThreshold,
+            Double histogramNativeMaxZeroThreshold,
+            Integer histogramNativeMaxNumberOfBuckets,
+            Long histogramNativeResetDurationSeconds,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
+            Long summaryMaxAgeSeconds,
+            Integer summaryNumberOfAgeBuckets,
+            String configPropertyPrefix) {
+        this.exemplarsEnabled = exemplarsEnabled;
+        this.histogramNativeOnly = isHistogramNativeOnly(histogramClassicOnly, histogramNativeOnly);
+        this.histogramClassicOnly = isHistogramClassicOnly(histogramClassicOnly, histogramNativeOnly);
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds == null ? null : unmodifiableList(new ArrayList<>(histogramClassicUpperBounds));
+        this.histogramNativeInitialSchema = histogramNativeInitialSchema;
+        this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
+        this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
+        this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
+        this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
+        this.summaryQuantiles = summaryQuantiles == null ? null : unmodifiableList(new ArrayList<>(summaryQuantiles));
+        this.summaryQuantileErrors = summaryQuantileErrors == null ? null : unmodifiableList(new ArrayList<>(summaryQuantileErrors));
+        this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
+        this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
+        validate(configPropertyPrefix);
+    }
+
+
+    private Boolean isHistogramClassicOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) {
+        if (histogramClassicOnly == null && histogramNativeOnly == null) {
+            return null;
+        }
+        if (histogramClassicOnly != null) {
+            return histogramClassicOnly;
+        }
+        return !histogramNativeOnly;
+    }
+
+    private Boolean isHistogramNativeOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) {
+        if (histogramClassicOnly == null && histogramNativeOnly == null) {
+            return null;
+        }
+        if (histogramNativeOnly != null) {
+            return histogramNativeOnly;
+        }
+        return !histogramClassicOnly;
+    }
+
+    private void validate(String prefix) throws PrometheusPropertiesException {
+        Util.assertValue(histogramNativeInitialSchema, s -> s >= -4 && s <= 8, "Expecting number between -4 and +8.", prefix, HISTOGRAM_NATIVE_INITIAL_SCHEMA);
+        Util.assertValue(histogramNativeMinZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD);
+        Util.assertValue(histogramNativeMaxZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
+        Util.assertValue(histogramNativeMaxNumberOfBuckets, n -> n >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS);
+        Util.assertValue(histogramNativeResetDurationSeconds, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_RESET_DURATION_SECONDS);
+        Util.assertValue(summaryMaxAgeSeconds, t -> t > 0, "Expecting value > 0", prefix, SUMMARY_MAX_AGE_SECONDS);
+        Util.assertValue(summaryNumberOfAgeBuckets, t -> t > 0, "Expecting value > 0", prefix, SUMMARY_NUMBER_OF_AGE_BUCKETS);
+
+        if (Boolean.TRUE.equals(histogramNativeOnly) && Boolean.TRUE.equals(histogramClassicOnly)) {
+            throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_ONLY + " and " + prefix + "." + HISTOGRAM_CLASSIC_ONLY + " cannot both be true");
+        }
+
+        if (histogramNativeMinZeroThreshold != null && histogramNativeMaxZeroThreshold != null) {
+            if (histogramNativeMinZeroThreshold > histogramNativeMaxZeroThreshold) {
+                throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD + " cannot be greater than " + prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
+            }
+        }
+
+        if (summaryQuantiles != null) {
+            for (double quantile : summaryQuantiles) {
+                if (quantile < 0 || quantile > 1) {
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILES + ": Expecting 0.0 <= quantile <= 1.0");
+                }
+            }
+        }
+
+        if (summaryQuantileErrors != null) {
+            if (summaryQuantiles == null) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Can't configure " + SUMMARY_QUANTILE_ERRORS + " without configuring " + SUMMARY_QUANTILES);
+            }
+            if (summaryQuantileErrors.size() != summaryQuantiles.size()) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": must have the same length as " + SUMMARY_QUANTILES);
+            }
+            for (double error : summaryQuantileErrors) {
+                if (error < 0 || error > 1) {
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Expecting 0.0 <= error <= 1.0");
+                }
+            }
+        }
+    }
+
+    /**
+     * This is the only configuration property that can be applied to all metric types.
+     * You can use it to turn Exemplar support off. Default is {@code true}.
+     */
+    public Boolean getExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    /**
+     * See {@code Histogram.Builder.nativeOnly()}
+     */
+    public Boolean getHistogramNativeOnly() {
+        return histogramNativeOnly;
+    }
+
+    /**
+     * See {@code Histogram.Builder.classicOnly()}
+     */
+    public Boolean getHistogramClassicOnly() {
+        return histogramClassicOnly;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withClassicBuckets()}
+     */
+    public List<Double> getHistogramClassicUpperBounds() {
+        return histogramClassicUpperBounds;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeInitialSchema()}
+     */
+    public Integer getHistogramNativeInitialSchema() {
+        return histogramNativeInitialSchema;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMinZeroThreshold()}
+     */
+    public Double getHistogramNativeMinZeroThreshold() {
+        return histogramNativeMinZeroThreshold;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMaxZeroThreshold()}
+     */
+    public Double getHistogramNativeMaxZeroThreshold() {
+        return histogramNativeMaxZeroThreshold;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMaxNumberOfBuckets()}
+     */
+    public Integer getHistogramNativeMaxNumberOfBuckets() {
+        return histogramNativeMaxNumberOfBuckets;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeResetDuration()}
+     */
+    public Long getHistogramNativeResetDurationSeconds() {
+        return histogramNativeResetDurationSeconds;
+    }
+
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     */
+    public List<Double> getSummaryQuantiles() {
+        return summaryQuantiles;
+    }
+
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     * <p>
+     * Returns {@code null} only if {@link #getSummaryQuantiles()} is also {@code null}.
+     * Returns an empty list if {@link #getSummaryQuantiles()} are specified without specifying errors.
+     * If the list is not empty, it has the same size as {@link #getSummaryQuantiles()}.
+     */
+    public List<Double> getSummaryQuantileErrors() {
+        if (summaryQuantiles != null) {
+            if (summaryQuantileErrors == null) {
+                return Collections.emptyList();
+            }
+        }
+        return summaryQuantileErrors;
+    }
+
+    /**
+     * See {@code Summary.Builder.withMaxAgeSeconds()}
+     */
+    public Long getSummaryMaxAgeSeconds() {
+        return summaryMaxAgeSeconds;
+    }
+
+    /**
+     * See {@code Summary.Builder.withNumberOfAgeBuckets()}
+     */
+    public Integer getSummaryNumberOfAgeBuckets() {
+        return summaryNumberOfAgeBuckets;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static MetricsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return new MetricsProperties(
+                Util.loadBoolean(prefix + "." + EXEMPLARS_ENABLED, properties),
+                Util.loadBoolean(prefix + "." + HISTOGRAM_NATIVE_ONLY, properties),
+                Util.loadBoolean(prefix + "." + HISTOGRAM_CLASSIC_ONLY, properties),
+                Util.loadDoubleList(prefix + "." + HISTOGRAM_CLASSIC_UPPER_BOUNDS, properties),
+                Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_INITIAL_SCHEMA, properties),
+                Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD, properties),
+                Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD, properties),
+                Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS, properties),
+                Util.loadLong(prefix + "." + HISTOGRAM_NATIVE_RESET_DURATION_SECONDS, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILES, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILE_ERRORS, properties),
+                Util.loadLong(prefix + "." + SUMMARY_MAX_AGE_SECONDS, properties),
+                Util.loadInteger(prefix + "." + SUMMARY_NUMBER_OF_AGE_BUCKETS, properties),
+                prefix);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private Boolean exemplarsEnabled;
+        private Boolean histogramNativeOnly;
+        private Boolean histogramClassicOnly;
+        private List<Double> histogramClassicUpperBounds;
+        private Integer histogramNativeInitialSchema;
+        private Double histogramNativeMinZeroThreshold;
+        private Double histogramNativeMaxZeroThreshold;
+        private Integer histogramNativeMaxNumberOfBuckets;
+        private Long histogramNativeResetDurationSeconds;
+        private List<Double> summaryQuantiles;
+        private List<Double> summaryQuantileErrors;
+        private Long summaryMaxAgeSeconds;
+        private Integer summaryNumberOfAgeBuckets;
+
+        private Builder() {
+        }
+
+        public MetricsProperties build() {
+            return new MetricsProperties(exemplarsEnabled,
+                    histogramNativeOnly,
+                    histogramClassicOnly,
+                    histogramClassicUpperBounds,
+                    histogramNativeInitialSchema,
+                    histogramNativeMinZeroThreshold,
+                    histogramNativeMaxZeroThreshold,
+                    histogramNativeMaxNumberOfBuckets,
+                    histogramNativeResetDurationSeconds,
+                    summaryQuantiles,
+                    summaryQuantileErrors,
+                    summaryMaxAgeSeconds,
+                    summaryNumberOfAgeBuckets);
+        }
+
+        /**
+         * See {@link MetricsProperties#getExemplarsEnabled()}
+         */
+        public Builder withExemplarsEnabled(Boolean exemplarsEnabled) {
+            this.exemplarsEnabled = exemplarsEnabled;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeOnly()}
+         */
+        public Builder withHistogramNativeOnly(Boolean histogramNativeOnly) {
+            this.histogramNativeOnly = histogramNativeOnly;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramClassicOnly()}
+         */
+        public Builder withHistogramClassicOnly(Boolean histogramClassicOnly) {
+            this.histogramClassicOnly = histogramClassicOnly;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramClassicUpperBounds()}
+         */
+        public Builder withHistogramClassicUpperBounds(double... histogramClassicUpperBounds) {
+            this.histogramClassicUpperBounds = Util.toList(histogramClassicUpperBounds);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeInitialSchema()}
+         */
+        public Builder withHistogramNativeInitialSchema(Integer histogramNativeInitialSchema) {
+            this.histogramNativeInitialSchema = histogramNativeInitialSchema;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMinZeroThreshold()}
+         */
+        public Builder withHistogramNativeMinZeroThreshold(Double histogramNativeMinZeroThreshold) {
+            this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMaxZeroThreshold()}
+         */
+        public Builder withHistogramNativeMaxZeroThreshold(Double histogramNativeMaxZeroThreshold) {
+            this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMaxNumberOfBuckets()}
+         */
+        public Builder withHistogramNativeMaxNumberOfBuckets(Integer histogramNativeMaxNumberOfBuckets) {
+            this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeResetDurationSeconds()}
+         */
+        public Builder withHistogramNativeResetDurationSeconds(Long histogramNativeResetDurationSeconds) {
+            this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryQuantiles()}
+         */
+        public Builder withSummaryQuantiles(double... summaryQuantiles) {
+            this.summaryQuantiles = Util.toList(summaryQuantiles);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryQuantileErrors()}
+         */
+        public Builder withSummaryQuantileErrors(double... summaryQuantileErrors) {
+            this.summaryQuantileErrors = Util.toList(summaryQuantileErrors);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryMaxAgeSeconds()}
+         */
+        public Builder withSummaryMaxAgeSeconds(Long summaryMaxAgeSeconds) {
+            this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryNumberOfAgeBuckets()}
+         */
+        public Builder withSummaryNumberOfAgeBuckets(Integer summaryNumberOfAgeBuckets) {
+            this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
+            return this;
+        }
+    }
+}u,	     }(j4  (9341c5988aa532d3de9b2288cae7de65b5916514jK5  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajM5  addedjE5  KOjF5  K jO5  KOjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,79 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The Prometheus Java client library can be configured at runtime (e.g. using a properties file).
+ * <p>
+ * This class represents the runtime configuration.
+ */
+public class PrometheusProperties {
+
+    private static final PrometheusProperties instance = PrometheusPropertiesLoader.load();
+
+    private final MetricsProperties defaultMetricsProperties;
+    private final Map<String, MetricsProperties> metricProperties = new HashMap<>();
+    private final ExemplarsProperties exemplarProperties;
+    private final ExporterProperties exporterProperties;
+    private final ExporterFilterProperties exporterFilterProperties;
+    private final ExporterHttpServerProperties httpServerConfig;
+
+    /**
+     * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
+     * <ul>
+     *     <li>{@code prometheus.properties} file found in the classpath.</li>
+     *     <li>Properties file specified in the {@code PROMETHEUS_CONFIG} environment variable or the {@code prometheus.config} system property.</li>
+     *     <li>Individual properties from system properties.</li>
+     * </ul>
+     */
+    public static PrometheusProperties get() throws PrometheusPropertiesException {
+        return instance;
+    }
+
+    public PrometheusProperties(
+            MetricsProperties defaultMetricsProperties,
+            Map<String, MetricsProperties> metricProperties,
+            ExemplarsProperties exemplarProperties,
+            ExporterProperties exporterProperties,
+            ExporterFilterProperties exporterFilterProperties,
+            ExporterHttpServerProperties httpServerConfig) {
+        this.defaultMetricsProperties = defaultMetricsProperties;
+        this.metricProperties.putAll(metricProperties);
+        this.exemplarProperties = exemplarProperties;
+        this.exporterProperties = exporterProperties;
+        this.exporterFilterProperties = exporterFilterProperties;
+        this.httpServerConfig = httpServerConfig;
+    }
+
+    /**
+     * The default metric properties apply for metrics where {@link #getMetricProperties(String)} is {@code null}.
+     */
+    public MetricsProperties getDefaultMetricProperties() {
+        return defaultMetricsProperties;
+    }
+
+    /**
+     * Properties specific for one metric. Should be merged with {@link #getDefaultMetricProperties()}.
+     * May return {@code null} if no metric-specific properties are configured for a metric name.
+     */
+    public MetricsProperties getMetricProperties(String metricName) {
+        return metricProperties.get(metricName);
+    }
+
+    public ExemplarsProperties getExemplarProperties() {
+        return exemplarProperties;
+    }
+
+    public ExporterProperties getExporterProperties() {
+        return exporterProperties;
+    }
+
+    public ExporterFilterProperties getExporterFilterProperties() {
+        return exporterFilterProperties;
+    }
+
+    public ExporterHttpServerProperties getExporterHttpServerProperties() {
+        return httpServerConfig;
+    }
+}u}(j4  (e41009ca2765dcc7aad02e95de7282ab08ed45e7jK5  gprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesException.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XG  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.config;
+
+public class PrometheusPropertiesException extends RuntimeException {
+
+    public PrometheusPropertiesException(String msg) {
+        super(msg);
+    }
+
+    public PrometheusPropertiesException(String msg, Exception cause) {
+        super(msg, cause);
+    }
+}u}(j4  (ba52372e5010e517d9e84b39236bdc5c067724c6jK5  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajM5  addedjE5  KijF5  K jO5  KijP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xb  @@ -0,0 +1,105 @@
+package io.prometheus.metrics.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * The Properties Loader is early stages.
+ * <p>
+ * It would be great to implement a subset of
+ * <a href="https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/features.html#features.external-config">Spring Boot's Externalized Configuration</a>,
+ * like support for YAML, Properties, and env vars, or support for Spring's naming conventions for properties.
+ */
+public class PrometheusPropertiesLoader {
+
+    /**
+     * See {@link PrometheusProperties#get()}.
+     */
+    public static PrometheusProperties load() throws PrometheusPropertiesException {
+        Map<Object, Object> properties = loadProperties();
+        Map<String, MetricsProperties> metricsConfigs = loadMetricsConfigs(properties);
+        MetricsProperties defaultMetricsProperties = MetricsProperties.load("io.prometheus.metrics", properties);
+        ExemplarsProperties exemplarConfig = ExemplarsProperties.load("io.prometheus.exemplars", properties);
+        ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
+        ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
+        ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        validateAllPropertiesProcessed(properties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+    }
+
+    // This will remove entries from properties when they are processed.
+    private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
+        Map<String, MetricsProperties> result = new HashMap<>();
+        Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
+        // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
+        // because entries are removed when MetricsConfig.load(...) is called.
+        Set<String> propertyNames = new HashSet<>();
+        for (Object key : properties.keySet()) {
+            propertyNames.add(key.toString());
+        }
+        for (String propertyName : propertyNames) {
+            Matcher matcher = pattern.matcher(propertyName);
+            if (matcher.find()) {
+                String metricName = matcher.group(1);
+                if (!result.containsKey(metricName)) {
+                    result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
+                }
+            }
+        }
+        return result;
+    }
+
+    // If there are properties left starting with io.prometheus it's likely a typo,
+    // because we didn't use that property.
+    // Throw a config error to let the user know that this property doesn't exist.
+    private static void validateAllPropertiesProcessed(Map<Object, Object> properties) {
+        for (Object key : properties.keySet()) {
+            if (key.toString().startsWith("io.prometheus")) {
+                throw new PrometheusPropertiesException(key + ": Unknown property");
+            }
+        }
+    }
+
+    private static Map<Object, Object> loadProperties() {
+        Map<Object, Object> properties = new HashMap<>();
+        properties.putAll(loadPropertiesFromClasspath());
+        properties.putAll(loadPropertiesFromFile()); // overriding the entries from the classpath file
+        properties.putAll(System.getProperties()); // overriding the entries from the properties file
+        // TODO: Add environment variables like EXEMPLARS_ENABLED.
+        return properties;
+    }
+
+    private static Properties loadPropertiesFromClasspath() {
+        Properties properties = new Properties();
+        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("prometheus.properties")) {
+            properties.load(stream);
+        } catch (Exception ignored) {
+        }
+        return properties;
+    }
+
+    private static Properties loadPropertiesFromFile() throws PrometheusPropertiesException {
+        Properties properties = new Properties();
+        String path = System.getProperty("prometheus.config");
+        if (System.getenv("PROMETHEUS_CONFIG") != null) {
+            path = System.getenv("PROMETHEUS_CONFIG");
+        }
+        if (path != null) {
+            try (InputStream stream = Files.newInputStream(Paths.get(path))) {
+                properties.load(stream);
+            } catch (IOException e) {
+                throw new PrometheusPropertiesException("Failed to read Prometheus properties from " + path + ": " + e.getMessage(), e);
+            }
+        }
+        return properties;
+    }
+}u}(j4  (8f1357134814268c8bef6fd212d0c5bb46140126jK5  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javajM5  addedjE5  KpjF5  K jO5  KpjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X|  @@ -0,0 +1,112 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
+
+class Util {
+
+    private static String getProperty(String name, Map<Object, Object> properties) {
+        Object object = properties.remove(name);
+        if (object != null) {
+            return object.toString();
+        }
+        return null;
+    }
+
+    static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            if (!"true".equalsIgnoreCase(property) && !"false".equalsIgnoreCase(property)) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting 'true' or 'false'");
+            }
+            return Boolean.parseBoolean(property);
+        }
+        return null;
+    }
+
+    static List<Double> toList(double... values) {
+        if (values == null) {
+            return null;
+        }
+        List<Double> result = new ArrayList<>(values.length);
+        for (double value : values) {
+            result.add(value);
+        }
+        return result;
+    }
+
+    static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            return Arrays.asList(property.split("\\s*,\\s*"));
+        }
+        return null;
+    }
+
+    static List<Double> loadDoubleList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] numbers = property.split("\\s*,\\s*");
+            Double[] result = new Double[numbers.length];
+            for (int i = 0; i < numbers.length; i++) {
+                try {
+                    if ("+Inf".equals(numbers[i].trim())) {
+                        result[i] = Double.POSITIVE_INFINITY;
+                    } else {
+                        result[i] = Double.parseDouble(numbers[i]);
+                    }
+                } catch (NumberFormatException e) {
+                    throw new PrometheusPropertiesException(name + "=" + property + ": Expecting comma separated list of double values");
+                }
+            }
+            return Arrays.asList(result);
+        }
+        return null;
+    }
+
+    static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Integer.parseInt(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting integer value");
+            }
+        }
+        return null;
+    }
+
+    static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Double.parseDouble(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting double value");
+            }
+        }
+        return null;
+    }
+
+    static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Long.parseLong(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting long value");
+            }
+        }
+        return null;
+    }
+
+    static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusPropertiesException {
+        if (number != null && !predicate.test(number)) {
+            String fullMessage = prefix == null ? name + ": " + message : prefix + "." + name + ": " + message;
+            throw new PrometheusPropertiesException(fullMessage);
+        }
+    }
+}u}(j4  (45fec1be02d04501b2ca84257c08aac56e2d18a0jK5  bprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XL  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.config;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class PrometheusPropertiesTest {
+
+    @Test
+    public void testPrometheusConfig() {
+        PrometheusProperties result = PrometheusProperties.get();
+        Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().size());
+        Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().size());
+    }
+
+    @Test
+    public void testEmptyUpperBounds() throws IOException {
+        Properties properties = new Properties();
+        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("emptyUpperBounds.properties")) {
+            properties.load(stream);
+        }
+        Assert.assertEquals(1, properties.size());
+        MetricsProperties.load("io.prometheus.metrics", properties);
+        Assert.assertEquals(0, properties.size());
+    }
+}u}(j4  (c019761ca5194c0c99671e26095fb3ffb69566c9jK5  Hprometheus-metrics-config/src/test/resources/emptyUpperBounds.propertiesjM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesjR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesjT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.properties?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  C@@ -0,0 +1 @@
+io.prometheus.metrics.histogramClassicUpperBounds =,u}(j4  (56b3daeb354e590015008fb2e98342eafbd3165ajK5  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesjM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,20 @@
+io.prometheus.metrics.histogramClassicUpperBounds = .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10
+io.prometheus.metrics.http_duration_seconds.histogramClassicUpperBounds = .005, .01, .015, .02
+io.prometheus.metrics.summaryQuantiles = 0.5, 0.95, 0.99
+io.prometheus.metrics.summaryQuantileErrors = 0.01, 0.01, 0.001
+
+io.prometheus.metrics.exemplarsEnabled = true
+io.prometheus.metrics.http_duration_seconds.exemplarsEnabled = true
+
+io.prometheus.exporter.includeCreatedTimestamps = false
+io.prometheus.exporter.exemplarsOnAllMetricTypes = true
+io.prometheus.exporter.filter.nameMustBeEqualTo = a, b, c
+
+
+io.prometheus.exemplars.minRetentionPeriodSeconds = 30
+io.prometheus.exemplars.maxRetentionPeriodSeconds = 30
+io.prometheus.exemplars.sampleIntervalMilliseconds = 30
+
+io.prometheus.exporter.httpServer.port = 9000
+
+# io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  +prometheus-metrics-config/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-config%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (06d350b699a7b853db61b0b39dc12a2b086f5f87jK5  prometheus-metrics-core/pom.xmljM5  addedjE5  KCjF5  K jO5  KCjP5  yhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fpom.xmljR5  xhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X	  @@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-core</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Core</name>
+    <description>
+        Core Prometheus metric types
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-tracer-initializer</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j4  (c2f72c30ee3460cd864df79e4ea1f37160c8aa64jK5  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/CounterDataPoint.javajM5  addedjE5  KXjF5  K jO5  KXjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,88 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single counter data point, i.e. a single line for a counter metric in Prometheus text format.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter counter = Counter.newBuilder()
+ *     .withName("tasks_total")
+ *     .withLabelNames("status")
+ *     .register();
+ * CounterDataPoint newTasks = counter.withLabelValues("new");
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * CounterDataPoint completedTasks = counter.withLabelValues("completed");
+ * }</pre>
+ * <p>
+ * Using {@code DataPoint} directly improves performance. If you increment a counter like this:
+ * <pre>{@code
+ * counter.withLabelValues("pending").inc();
+ * }</pre>
+ * the label value {@code "pending"} needs to be looked up every single time.
+ * Using the {@code CounterDataPoint} like this:
+ * <pre>{@code
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * pendingTasks.inc();
+ * }</pre>
+ * allows you to look up the label value only once, and then use the {@code CounterDataPoint} directly.
+ * This is a worthwhile performance improvement when instrumenting a performance-critical code path.
+ * <p>
+ * If you have a counter without labels like this:
+ * <pre>{@code
+ * Counter counterWithoutLabels = Counter.newBuilder()
+ *     .withName("events_total")
+ *     .register();
+ * }</pre>
+ * You can use it as a {@code CounterDataPoint} directly. So the following:
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels.withLabels();
+ * }</pre>
+ * is equivalent to
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels;
+ * }</pre>
+ */
+public interface CounterDataPoint extends DataPoint {
+
+    /**
+     * Add one.
+     */
+    default void inc() {
+        inc(1L);
+    }
+
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    default void inc(long amount) {
+        inc((double) amount);
+    }
+
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    void inc(double amount);
+
+    /**
+     * Add one, and create a custom exemplar with the given labels.
+     */
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    default void incWithExemplar(long amount, Labels labels) {
+        inc((double) amount);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    void incWithExemplar(double amount, Labels labels);
+}u}(j4  (8dd277d8157d6f2473fd4f1c5b03f0d9d1bf252bjK5  Zprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DataPoint.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  b@@ -0,0 +1,4 @@
+package io.prometheus.metrics.core.datapoints;
+
+public interface DataPoint {
+}u}(j4  (f08ccae9cb6e7c50848aad86a16d292e11c2aacejK5  fprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DistributionDataPoint.javajM5  addedjE5  K$jF5  K jO5  K$jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X.  @@ -0,0 +1,36 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single data point of a histogram or a summary metric.
+ * <p>
+ * Single data point means identified label values like {@code {method="GET", path="/", status_code="200"}},
+ * ignoring the {@code "le"} label for histograms or the {@code "quantile"} label for summaries.
+ * <p>
+ * This interface is named <i>DistributionDataPoint</i> because both histograms and summaries are used to observe
+ * distributions, like latency distributions or distributions of request sizes. Therefore
+ * <i>DistributionDataPoint</i> is a good name for a common interface implemented by histogram data points
+ * and summary data points.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface DistributionDataPoint extends DataPoint, TimerApi {
+
+    /**
+     * Observe {@code value}.
+     */
+    void observe(double value);
+
+    /**
+     * Observe {@code value}, and create a custom exemplar with the given labels.
+     */
+    void observeWithExemplar(double value, Labels labels);
+
+    /**
+     * {@inheritDoc}
+     */
+    default Timer startTimer() {
+        return new Timer(this::observe);
+    }
+}u}(j4  (9daf0142815c398164ac1c680d2961e5e1011fccjK5  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/GaugeDataPoint.javajM5  addedjE5  KPjF5  K jO5  KPjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single gauge data point, i.e. a single line for a gauge metric in Prometheus text format.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface GaugeDataPoint extends DataPoint, TimerApi {
+
+    /**
+     * Add one.
+     */
+    default void inc() {
+        inc(1.0);
+    }
+
+    /**
+     * Add {@code amount}.
+     */
+    void inc(double amount);
+
+    /**
+     * Add one, and create a custom exemplar with the given labels.
+     */
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     */
+    void incWithExemplar(double amount, Labels labels);
+
+    /**
+     * Subtract one.
+     */
+    default void dec() {
+        inc(-1.0);
+    }
+
+    /**
+     * Subtract {@code amount}.
+     */
+    default void dec(double amount) {
+        inc(-amount);
+    }
+
+    /**
+     * Subtract one, and create a custom exemplar with the given labels.
+     */
+    default void decWithExemplar(Labels labels) {
+        incWithExemplar(-1.0, labels);
+    }
+
+    /**
+     * Subtract {@code amount}, and create a custom exemplar with the given labels.
+     */
+    default void decWithExemplar(double amount, Labels labels) {
+        incWithExemplar(-amount, labels);
+    }
+
+    /**
+     * Set the gauge to {@code value}.
+     */
+    void set(double value);
+
+    /**
+     * Set the gauge to {@code value}, and create a custom exemplar with the given labels.
+     */
+    void setWithExemplar(double value, Labels labels);
+
+    /**
+     * {@inheritDoc}
+     */
+    default Timer startTimer() {
+        return new Timer(this::set);
+    }
+}u}(j4  (73b7dfdb32452efe88891712c49f9e1168183b4bjK5  bprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/StateSetDataPoint.javajM5  addedjE5  K!jF5  K jO5  K!jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XN  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.core.datapoints;
+
+/**
+ * Represents a single StateSet data point.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface StateSetDataPoint extends DataPoint {
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
+    void setTrue(String state);
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
+    void setFalse(String state);
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
+    default void setTrue(Enum<?> state) {
+        setTrue(state.toString());
+    }
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
+    default void setFalse(Enum<?> state) {
+        setFalse(state.toString());
+    }
+}u}(j4  (fd646186904c93dca51b560f1b8f3ed2f74ef5cajK5  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/Timer.javajM5  addedjE5  K(jF5  K jO5  K(jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X}  @@ -0,0 +1,40 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.Closeable;
+import java.util.function.DoubleConsumer;
+
+/**
+ * Helper class for observing durations.
+ */
+public class Timer implements Closeable {
+
+    private final DoubleConsumer observeFunction;
+    private final long startTimeNanos = System.nanoTime();
+
+    /**
+     * Constructor is package private. Use the {@link TimerApi} provided by the implementation of the {@link DataPoint}.
+     */
+    Timer(DoubleConsumer observeFunction) {
+        this.observeFunction = observeFunction;
+    }
+
+    /**
+     * Records the observed duration in seconds since this {@code Timer} instance was created.
+     * @return the observed duration in seconds.
+     */
+    public double observeDuration() {
+        double elapsed = Unit.nanosToSeconds(System.nanoTime() - startTimeNanos);
+        observeFunction.accept(elapsed);
+        return elapsed;
+    }
+
+    /**
+     * Same as {@link #observeDuration()}.
+     */
+    @Override
+    public void close() {
+        observeDuration();
+    }
+}u}(j4  (a38c8053b561799bc0fbcefd42014f0313b51db1jK5  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/TimerApi.javajM5  addedjE5  KJjF5  K jO5  KJjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xy  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.core.datapoints;
+
+import java.util.concurrent.Callable;
+import java.util.function.Supplier;
+
+/**
+ * Convenience API for timing durations.
+ * <p>
+ * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+ * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+ */
+public interface TimerApi {
+
+    /**
+     * Start a {@code Timer}. Example:
+     * <pre>{@code
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("http_request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * try (Timer timer = histogram.withLabelValues("GET", "/").startTimer()) {
+     *     // duration of this code block will be observed.
+     * }
+     * }</pre>
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+     */
+    Timer startTimer();
+
+    /**
+     * Observe the duration of the {@code func} call. Example:
+     * <pre>{@code
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * histogram2.withLabelValues("GET", "/").time(() -> {
+     *     // duration of this code block will be observed.
+     * });
+     * }</pre>
+     * <p>
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+     */
+    default void time(Runnable func) {
+        try (Timer timer = startTimer()) {
+            func.run();
+        }
+    }
+
+    /**
+     * Like {@link #time(Runnable)}, but returns the return value of {@code func}.
+     */
+    default <T> T time(Supplier<T> func) {
+        try (Timer timer = startTimer()) {
+            return func.get();
+        }
+    }
+
+    /**
+     * Like {@link #time(Supplier)}, but {@code func} may throw a checked {@code Exception}.
+     */
+    default <T> T timeChecked(Callable<T> func) throws Exception {
+        try (Timer timer = startTimer()) {
+            return func.call();
+        }
+    }
+}u}(j4  (0c8275356ec5df83cfb4c52c38ea4a46be7cc73bjK5  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javajM5  addedjE5  MFjF5  K jO5  MFjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X7  @@ -0,0 +1,326 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.util.Scheduler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.LongSupplier;
+
+/**
+ * The ExemplarSampler selects Spans as exemplars.
+ * <p>
+ * There are two types of Exemplars: Regular exemplars are sampled implicitly if a supported tracing
+ * library is detected. Custom exemplars are provided explicitly in code, for example if a developer
+ * wants to make sure an Exemplar is created for a specific code path.
+ * <p>
+ * Spans will be marked as being an Exemplar by calling {@link SpanContext#markCurrentSpanAsExemplar()}.
+ * The tracer implementation should set a Span attribute to mark the current Span as an Exemplar.
+ * This attribute can be used by a trace sampling algorithm to make sure traces with Exemplars are sampled.
+ * <p>
+ * The ExemplarSample is rate-limited, so only a small fraction of Spans will be marked as Exemplars in
+ * an application with a large number of requests.
+ * <p>
+ * See {@link ExemplarSamplerConfig} for configuration options.
+ */
+public class ExemplarSampler {
+
+    private final ExemplarSamplerConfig config;
+    private final Exemplar[] exemplars;
+    private final Exemplar[] customExemplars; // Separate from exemplars, because we don't want custom exemplars
+    // to be overwritten by automatic exemplar sampling. exemplars.lengt == customExemplars.length
+    private final AtomicBoolean acceptingNewExemplars = new AtomicBoolean(true);
+    private final AtomicBoolean acceptingNewCustomExemplars = new AtomicBoolean(true);
+
+    public ExemplarSampler(ExemplarSamplerConfig config) {
+        this.config = config;
+        this.exemplars = new Exemplar[config.getNumberOfExemplars()];
+        this.customExemplars = new Exemplar[exemplars.length];
+    }
+
+    public Exemplars collect() {
+        // this may run in parallel with observe()
+        long now = System.currentTimeMillis();
+        List<Exemplar> result = new ArrayList<>(exemplars.length);
+        for (int i = 0; i < customExemplars.length; i++) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    customExemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        for (int i = 0; i < exemplars.length && result.size() < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    exemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        return Exemplars.of(result);
+    }
+
+    public void reset() {
+        for (int i = 0; i < exemplars.length; i++) {
+            exemplars[i] = null;
+            customExemplars[i] = null;
+        }
+    }
+
+    public void observe(double value) {
+        if (!acceptingNewExemplars.get()) {
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
+        }
+        rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));
+    }
+
+    public void observeWithExemplar(double value, Labels labels) {
+        if (!acceptingNewCustomExemplars.get()) {
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
+        }
+        rateLimitedObserve(acceptingNewCustomExemplars, value, customExemplars, () -> doObserveWithExemplar(value, labels));
+    }
+
+    private long doObserve(double value) {
+        if (exemplars.length == 1) {
+            return doObserveSingleExemplar(value);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithUpperBounds(value);
+        } else {
+            return doObserveWithoutUpperBounds(value);
+        }
+    }
+
+    private long doObserveSingleExemplar(double value) {
+        long now = System.currentTimeMillis();
+        Exemplar current = exemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(0, value, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithUpperBounds(double value) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (value <= upperBounds[i]) {
+                Exemplar previous = exemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateExemplar(i, value, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithoutUpperBounds(double value) {
+        final long now = System.currentTimeMillis();
+        Exemplar smallest = null;
+        int smallestIndex = -1;
+        Exemplar largest = null;
+        int largestIndex = -1;
+        int nullIndex = -1;
+        for (int i = exemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar == null) {
+                nullIndex = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                exemplars[i] = null;
+                nullIndex = i;
+            } else {
+                if (smallest == null || exemplar.getValue() < smallest.getValue()) {
+                    smallest = exemplar;
+                    smallestIndex = i;
+                }
+                if (largest == null || exemplar.getValue() > largest.getValue()) {
+                    largest = exemplar;
+                    largestIndex = i;
+                }
+            }
+        }
+        if (nullIndex >= 0) {
+            return updateExemplar(nullIndex, value, now);
+        }
+        if (now - smallest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value < smallest.getValue()) {
+            return updateExemplar(smallestIndex, value, now);
+        }
+        if (now - largest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value > largest.getValue()) {
+            return updateExemplar(largestIndex, value, now);
+        }
+        long oldestTimestamp = 0;
+        int oldestIndex = -1;
+        for (int i = 0; i < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null && exemplar != smallest && exemplar != largest) {
+                if (oldestTimestamp == 0 || exemplar.getTimestampMillis() < oldestTimestamp) {
+                    oldestTimestamp = exemplar.getTimestampMillis();
+                    oldestIndex = i;
+                }
+            }
+        }
+        if (oldestIndex != -1 && now - oldestTimestamp > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(oldestIndex, value, now);
+        }
+        return 0;
+    }
+
+    // Returns the timestamp of the newly added Exemplar (which is System.currentTimeMillis())
+    // or 0 if no Exemplar was added.
+    private long doObserveWithExemplar(double amount, Labels labels) {
+        if (customExemplars.length == 1) {
+            return doObserveSingleExemplar(amount, labels);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithExemplarWithUpperBounds(amount, labels);
+        } else {
+            return doObserveWithExemplarWithoutUpperBounds(amount, labels);
+        }
+    }
+
+    private long doObserveSingleExemplar(double amount, Labels labels) {
+        long now = System.currentTimeMillis();
+        Exemplar current = customExemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(0, amount, labels, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithExemplarWithUpperBounds(double value, Labels labels) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (value <= upperBounds[i]) {
+                Exemplar previous = customExemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateCustomExemplar(i, value, labels, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithExemplarWithoutUpperBounds(double amount, Labels labels) {
+        final long now = System.currentTimeMillis();
+        int nullPos = -1;
+        int oldestPos = -1;
+        Exemplar oldest = null;
+        for (int i = customExemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar == null) {
+                nullPos = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                customExemplars[i] = null;
+                nullPos = i;
+            } else {
+                if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
+                    oldest = exemplar;
+                    oldestPos = i;
+                }
+            }
+        }
+        if (nullPos != -1) {
+            return updateCustomExemplar(nullPos, amount, labels, now);
+        } else if (now - oldest.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(oldestPos, amount, labels, now);
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Observing requires a system call to {@link System#currentTimeMillis()},
+     * and it requires iterating over the existing exemplars to check if one of the existing
+     * exemplars can be replaced.
+     * <p>
+     * To avoid performance issues, we rate limit observing exemplars to
+     * {@link ExemplarSamplerConfig#getSampleIntervalMillis()} milliseconds.
+     */
+    private void rateLimitedObserve(AtomicBoolean accepting, double value, Exemplar[] exemplars, LongSupplier observeFunc) {
+        if (Double.isNaN(value)) {
+            return;
+        }
+        if (!accepting.compareAndSet(true, false)) {
+            return;
+        }
+        // observeFunc returns the current timestamp or 0 if no Exemplar was added.
+        long now = observeFunc.getAsLong();
+        long sleepTime = now == 0 ? config.getSampleIntervalMillis() : durationUntilNextExemplarExpires(now);
+        Scheduler.schedule(() -> accepting.compareAndSet(false, true), sleepTime, TimeUnit.MILLISECONDS);
+    }
+
+    private long durationUntilNextExemplarExpires(long now) {
+        long oldestTimestamp = now;
+        for (Exemplar exemplar : exemplars) {
+            if (exemplar == null) {
+                return config.getSampleIntervalMillis();
+            } else if (exemplar.getTimestampMillis() < oldestTimestamp) {
+                oldestTimestamp = exemplar.getTimestampMillis();
+            }
+        }
+        long oldestAge = now - oldestTimestamp;
+        if (oldestAge < config.getMinRetentionPeriodMillis()) {
+            return config.getMinRetentionPeriodMillis() - oldestAge;
+        }
+        return config.getSampleIntervalMillis();
+    }
+
+    private long updateCustomExemplar(int index, double value, Labels labels, long now) {
+        if (!labels.contains(Exemplar.TRACE_ID) && !labels.contains(Exemplar.SPAN_ID)) {
+            labels = labels.merge(doSampleExemplar());
+        }
+        customExemplars[index] = Exemplar.newBuilder()
+                .withValue(value)
+                .withLabels(labels)
+                .withTimestampMillis(now)
+                .build();
+        return now;
+    }
+
+    private long updateExemplar(int index, double value, long now) {
+        Labels traceLabels = doSampleExemplar();
+        if (!traceLabels.isEmpty()) {
+            exemplars[index] = Exemplar.newBuilder()
+                    .withValue(value)
+                    .withLabels(traceLabels)
+                    .withTimestampMillis(now)
+                    .build();
+            return now;
+        } else {
+            return 0;
+        }
+    }
+
+    private Labels doSampleExemplar() {
+        try {
+            SpanContext spanContext = SpanContextSupplier.getSpanContext();
+            if (spanContext != null) {
+                if (spanContext.isCurrentSpanSampled()) {
+                    String spanId = spanContext.getCurrentSpanId();
+                    String traceId = spanContext.getCurrentTraceId();
+                    if (spanId != null && traceId != null) {
+                        spanContext.markCurrentSpanAsExemplar();
+                        return Labels.of(Exemplar.TRACE_ID, traceId, Exemplar.SPAN_ID, spanId);
+                    }
+                }
+            }
+        } catch (NoClassDefFoundError ignored) {
+        }
+        return Labels.EMPTY;
+    }
+}u}(j4  (9712f29dfe56bf37373428c3f5544a7f774bb201jK5  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfig.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.config.ExemplarsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+import java.util.concurrent.TimeUnit;
+
+public class ExemplarSamplerConfig {
+
+    /**
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
+     */
+    public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDS = 7;
+
+    /**
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
+     */
+    public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDS = 70;
+
+    /**
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
+     */
+    private static final int DEFAULT_SAMPLE_INTERVAL_MILLISECONDS = 90;
+
+    private final long minRetentionPeriodMillis;
+    private final long maxRetentionPeriodMillis;
+    private final long sampleIntervalMillis;
+    private final double[] histogramClassicUpperBounds; // null unless it's a classic histogram
+    private final int numberOfExemplars; // if histogramClassicUpperBounds != null, then numberOfExemplars == histogramClassicUpperBounds.length
+
+    /**
+     * Constructor for all metric types except classic histograms.
+     *
+     * @param properties        See {@link PrometheusProperties#getExemplarProperties()}.
+     * @param numberOfExemplars Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default.
+     *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarsProperties, double[])}.
+     */
+    public ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars) {
+        this(properties, numberOfExemplars, null);
+    }
+
+    /**
+     * Constructor for classic histogram metrics.
+     *
+     * @param properties                  See {@link PrometheusProperties#getExemplarProperties()}.
+     * @param histogramClassicUpperBounds the ExemplarSampler will provide one Exemplar per histogram bucket.
+     *                                    Must be sorted, and must include the +Inf bucket.
+     */
+    public ExemplarSamplerConfig(ExemplarsProperties properties, double[] histogramClassicUpperBounds) {
+        this(properties, histogramClassicUpperBounds.length, histogramClassicUpperBounds);
+    }
+
+    private ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this(
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMinRetentionPeriodSeconds(), DEFAULT_MIN_RETENTION_PERIOD_SECONDS)),
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMaxRetentionPeriodSeconds(), DEFAULT_MAX_RETENTION_PERIOD_SECONDS)),
+                getOrDefault(properties.getSampleIntervalMilliseconds(), DEFAULT_SAMPLE_INTERVAL_MILLISECONDS),
+                numberOfExemplars,
+                histogramClassicUpperBounds);
+    }
+
+    ExemplarSamplerConfig(long minRetentionPeriodMillis, long maxRetentionPeriodMillis, long sampleIntervalMillis, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this.minRetentionPeriodMillis = minRetentionPeriodMillis;
+        this.maxRetentionPeriodMillis = maxRetentionPeriodMillis;
+        this.sampleIntervalMillis = sampleIntervalMillis;
+        this.numberOfExemplars = numberOfExemplars;
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+        validate();
+    }
+
+    private void validate() {
+        if (minRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(minRetentionPeriodMillis + ": minRetentionPeriod must be > 0.");
+        }
+        if (maxRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(maxRetentionPeriodMillis + ": maxRetentionPeriod must be > 0.");
+        }
+        if (histogramClassicUpperBounds != null) {
+            if (histogramClassicUpperBounds.length == 0 || histogramClassicUpperBounds[histogramClassicUpperBounds.length - 1] != Double.POSITIVE_INFINITY) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds must contain the +Inf bucket.");
+            }
+            if (histogramClassicUpperBounds.length != numberOfExemplars) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds.length must be equal to numberOfExemplars.");
+            }
+            double bound = histogramClassicUpperBounds[0];
+            for (int i = 1; i < histogramClassicUpperBounds.length; i++) {
+                if (bound >= histogramClassicUpperBounds[i]) {
+                    throw new IllegalArgumentException("histogramClassicUpperBounds must be sorted and must not contain duplicates.");
+                }
+            }
+        }
+        if (numberOfExemplars <= 0) {
+            throw new IllegalArgumentException(numberOfExemplars + ": numberOfExemplars must be > 0.");
+        }
+    }
+
+    private static <T> T getOrDefault(T result, T defaultValue) {
+        return result != null ? result : defaultValue;
+    }
+
+    /**
+     * May be {@code null}.
+     */
+    public double[] getHistogramClassicUpperBounds() {
+        return histogramClassicUpperBounds;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
+     */
+    public long getMinRetentionPeriodMillis() {
+        return minRetentionPeriodMillis;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
+     */
+    public long getMaxRetentionPeriodMillis() {
+        return maxRetentionPeriodMillis;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
+     */
+    public long getSampleIntervalMillis() {
+        return sampleIntervalMillis;
+    }
+
+    /**
+     * Defaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.
+     */
+    public int getNumberOfExemplars() {
+        return numberOfExemplars;
+    }
+}u}(j4  (390a2bc2b436590fa604ffe4ec1387fe993651bbjK5  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javajM5  addedjE5  KTjF5  K jO5  KTjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,84 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+/**
+ * Metrics support concurrent write and scrape operations.
+ * <p>
+ * This is implemented by switching to a Buffer when the scrape starts,
+ * and applying the values from the buffer after the scrape ends.
+ */
+class Buffer {
+
+    private static final long signBit = 1L << 63;
+    private final AtomicLong observationCount = new AtomicLong(0);
+    private double[] observationBuffer = new double[0];
+    private int bufferPos = 0;
+    private boolean reset = false;
+    private final Object appendLock = new Object();
+    private final Object runLock = new Object();
+
+    boolean append(double value) {
+        long count = observationCount.incrementAndGet();
+        if ((count & signBit) == 0) {
+            return false; // sign bit not set -> buffer not active.
+        } else {
+            doAppend(value);
+            return true;
+        }
+    }
+
+    private void doAppend(double amount) {
+        synchronized (appendLock) {
+            if (bufferPos >= observationBuffer.length) {
+                observationBuffer = Arrays.copyOf(observationBuffer, observationBuffer.length + 128);
+            }
+            observationBuffer[bufferPos] = amount;
+            bufferPos++;
+        }
+    }
+
+    /**
+     * Must be called by the runnable in the run() method.
+     */
+    void reset() {
+        reset = true;
+    }
+
+    <T extends DataPointSnapshot> T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
+        double[] buffer;
+        int bufferSize;
+        T result;
+        synchronized (runLock) {
+            Long count = observationCount.getAndAdd(signBit);
+            while (!complete.apply(count)) {
+                Thread.yield();
+            }
+            result = runnable.get();
+            int expectedBufferSize;
+            if (reset) {
+                expectedBufferSize = (int) ((observationCount.getAndSet(0) & ~signBit) - count);
+                reset = false;
+            } else {
+                expectedBufferSize = (int) (observationCount.addAndGet(signBit) - count);
+            }
+            while (bufferPos != expectedBufferSize) {
+                Thread.yield();
+            }
+            buffer = observationBuffer;
+            bufferSize = bufferPos;
+            observationBuffer = new double[0];
+            bufferPos = 0;
+        }
+        for (int i = 0; i < bufferSize; i++) {
+            observeFunction.accept(buffer[i]);
+        }
+        return result;
+    }
+}u?     }(j4  (22662c62ebde47679a03e46d1aeb6000a7954107jK5  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.javajM5  addedjE5  M(jF5  K jO5  M(jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X%  @@ -0,0 +1,296 @@
+package io.prometheus.metrics.core.metrics;
+
+// The original implementation was copied from
+// https://raw.githubusercontent.com/Netflix/ocelli/master/ocelli-core/src/main/java/netflix/ocelli/stats/CKMSQuantiles.java
+// Revision d0357b8bf5c17a173ce94d6b26823775b3f999f6 from Jan 21, 2015.
+// However, it has been heavily refactored in the meantime.
+
+/*
+ Copyright 2012 Andrew Wang (andrew@umbrant.com)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.ListIterator;
+
+/**
+ * Algorithm solving the "Targeted Quantile Problem" as described in
+ * "Effective Computation of Biased Quantiles over Data Streams"
+ * by Cormode, Korn, Muthukrishnan, and Srivastava.
+ *
+ */
+final class CKMSQuantiles {
+
+    final Quantile[] quantiles;
+
+    /**
+     * Total number of observations (not including those that are still in the buffer).
+     */
+    int n = 0;
+
+    /**
+     * List of sampled observations, ordered by Sample.value.
+     */
+    final LinkedList<Sample> samples = new LinkedList<Sample>();
+
+    /**
+     * Compress is called every compressInterval inserts.
+     * Note that the buffer is flushed whenever get() is called, so we
+     * cannot just wait until the buffer is full before we call compress.
+     */
+    private final int compressInterval = 128;
+    private int insertsSinceLastCompress = 0;
+
+    /**
+     * Note that the buffer size could as well be less than the compressInterval.
+     * However, the buffer size should not be greater than the compressInterval,
+     * because the compressInterval is not respected in flush(), so if you want
+     * to compress more often than calling flush() that won't work.
+     */
+    private final double[] buffer = new double[compressInterval];
+    private int bufferPos = 0;
+
+    public CKMSQuantiles(Quantile... quantiles) {
+        if (quantiles.length == 0) {
+            throw new IllegalArgumentException("quantiles cannot be empty");
+        }
+        this.quantiles = quantiles;
+    }
+
+    /**
+     * Add an observed value
+     */
+    public void insert(double value) {
+        buffer[bufferPos++] = value;
+
+        if (bufferPos == buffer.length) {
+            flush();
+        }
+
+        if (++insertsSinceLastCompress == compressInterval) {
+            compress();
+            insertsSinceLastCompress = 0;
+        }
+    }
+
+    private void flush() {
+        Arrays.sort(buffer, 0, bufferPos);
+        insertBatch(buffer, bufferPos);
+        bufferPos = 0;
+    }
+
+    /**
+     * Inserts the elements from index 0 to index toIndex from the sortedBuffer.
+     */
+    void insertBatch(double[] sortedBuffer, int toIndex) {
+        if (toIndex == 0) {
+            return;
+        }
+        ListIterator<Sample> iterator = samples.listIterator();
+        int i = 0; // position in buffer
+        int r = 0; // sum of g's left of the current sample
+        while (iterator.hasNext() && i < toIndex) {
+            Sample item = iterator.next();
+            while (i < toIndex) {
+                if (sortedBuffer[i] > item.value) {
+                    break;
+                }
+                insertBefore(iterator, sortedBuffer[i], r);
+                r++; // new item with g=1 was inserted before, so increment r
+                i++;
+                n++;
+            }
+            r += item.g;
+        }
+        while (i < toIndex) {
+            samples.add(new Sample(sortedBuffer[i], 0));
+            i++;
+            n++;
+        }
+    }
+
+    private void insertBefore(ListIterator<Sample> iterator, double value, int r) {
+        if (!iterator.hasPrevious()) {
+            samples.addFirst(new Sample(value, 0));
+        } else {
+            iterator.previous();
+            iterator.add(new Sample(value, f(r) - 1));
+            iterator.next();
+        }
+    }
+
+    /**
+     * Get the estimated value at the specified quantile.
+     */
+    public double get(double q) {
+        flush();
+
+        if (samples.size() == 0) {
+            return Double.NaN;
+        }
+
+        if (q == 0.0) {
+            return samples.getFirst().value;
+        }
+
+        if (q == 1.0) {
+            return samples.getLast().value;
+        }
+
+        int r = 0; // sum of g's left of the current sample
+        int desiredRank = (int) Math.ceil(q * n);
+        int upperBound = desiredRank + f(desiredRank) / 2;
+
+        ListIterator<Sample> iterator = samples.listIterator();
+        while (iterator.hasNext()) {
+            Sample sample = iterator.next();
+            if (r + sample.g + sample.delta > upperBound) {
+                iterator.previous(); // roll back the item.next() above
+                if (iterator.hasPrevious()) {
+                    Sample result = iterator.previous();
+                    return result.value;
+                } else {
+                    return sample.value;
+                }
+            }
+            r += sample.g;
+        }
+        return samples.getLast().value;
+    }
+
+    /**
+     * Error function, as in definition 5 of the paper.
+     */
+    int f(int r) {
+        int minResult = Integer.MAX_VALUE;
+        for (Quantile q : quantiles) {
+            if (q.quantile == 0 || q.quantile == 1) {
+                continue;
+            }
+            int result;
+            // We had a numerical error here with the following example:
+            // quantile = 0.95, epsilon = 0.01, (n-r) = 30.
+            // The expected result of (2*0.01*30)/(1-0.95) is 12. The actual result is 11.99999999999999.
+            // To avoid running into these types of error we add 0.00000000001 before rounding down.
+            if (r >= q.quantile * n) {
+                result = (int) (q.v * r + 0.00000000001);
+            } else {
+                result = (int) (q.u * (n - r) + 0.00000000001);
+            }
+            if (result < minResult) {
+                minResult = result;
+            }
+        }
+        return Math.max(minResult, 1);
+    }
+
+    /**
+     * Merge pairs of consecutive samples if this doesn't violate the error function.
+     */
+    void compress() {
+        if (samples.size() < 3) {
+            return;
+        }
+        Iterator<Sample> descendingIterator = samples.descendingIterator();
+        int r = n; // n is equal to the sum of the g's of all samples
+
+        Sample right;
+        Sample left = descendingIterator.next();
+        r -= left.g;
+
+        while (descendingIterator.hasNext()) {
+            right = left;
+            left = descendingIterator.next();
+            r = r - left.g;
+            if (left == samples.getFirst()) {
+                // The min sample must never be merged.
+                break;
+            }
+            if (left.g + right.g + right.delta < f(r)) {
+                right.g += left.g;
+                descendingIterator.remove();
+                left = right;
+            }
+        }
+    }
+
+    static class Sample {
+
+        /**
+         * Observed value.
+         */
+        final double value;
+
+        /**
+         * Difference between the lowest possible rank of this sample and its predecessor.
+         * This always starts with 1, but will be updated when compress() merges Samples.
+         */
+        int g = 1;
+
+        /**
+         * Difference between the greatest possible rank of this sample and the lowest possible rank of this sample.
+         */
+        final int delta;
+
+        Sample(double value, int delta) {
+            this.value = value;
+            this.delta = delta;
+        }
+
+        @Override
+        public String toString() {
+            return String.format("Sample{val=%.3f, g=%d, delta=%d}", value, g, delta);
+        }
+    }
+
+    static class Quantile {
+
+        /**
+         * Quantile. Must be between 0 and 1.
+         */
+        final double quantile;
+
+        /**
+         * Allowed error. Must be between 0 and 1.
+         */
+        final double epsilon;
+
+        /**
+         * Helper used in the error function f(), see definition 5 in the paper.
+         */
+        final double u;
+
+        /**
+         * Helper used in the error function f(), see definition 5 in the paper.
+         */
+        final double v;
+
+        Quantile(double quantile, double epsilon) {
+            if (quantile < 0.0 || quantile > 1.0) throw new IllegalArgumentException("Quantile must be between 0 and 1");
+            if (epsilon < 0.0 || epsilon > 1.0) throw new IllegalArgumentException("Epsilon must be between 0 and 1");
+
+            this.quantile = quantile;
+            this.epsilon = epsilon;
+            u = 2.0 * epsilon / (1.0 - quantile); // if quantile == 1 this will be Double.NaN
+            v = 2.0 * epsilon / quantile; // if quantile == 0 this will be Double.NaN
+        }
+
+        @Override
+        public String toString() {
+            return String.format("Quantile{q=%.3f, epsilon=%.3f}", quantile, epsilon);
+        }
+    }
+}u}(j4  (2d9eb0b54e3b4bc1c03b730b413f2366c81c4d39jK5  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CallbackMetric.javajM5  addedjE5  K*jF5  K jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X*  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.List;
+
+/**
+ * There are two kinds of metrics: {@code StatefulMetric} and {@code CallbackMetric}.
+ * <p>
+ * See JavaDoc on {@link StatefulMetric} for more info.
+ */
+abstract class CallbackMetric extends MetricWithFixedMetadata {
+
+    protected CallbackMetric(Builder<?, ?> builder) {
+        super(builder);
+    }
+
+    protected Labels makeLabels(String... labelValues) {
+        if (labelNames.length == 0) {
+            if (labelValues != null && labelValues.length > 0) {
+                throw new IllegalArgumentException("Cannot pass label values to a " + this.getClass().getSimpleName() + " that was created without label names.");
+            }
+            return constLabels;
+        } else {
+            if (labelValues == null) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with label names, but the callback was called without label values.");
+            }
+            if (labelValues.length != labelNames.length) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with " + labelNames.length + " label names, but the callback was called with " + labelValues.length + " label values.");
+            }
+            return constLabels.merge(Labels.of(labelNames, labelValues));
+        }
+    }
+
+    static abstract class Builder<B extends Builder<B, M>, M extends CallbackMetric> extends MetricWithFixedMetadata.Builder<B, M> {
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+    }
+}u}(j4  (6b5301cc57ebbfe521e6932631c5698f192378fejK5  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X!  @@ -0,0 +1,252 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Counter metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter requestCount = Counter.newBuilder()
+ *     .withName("requests_total")
+ *     .withHelp("Total number of requests")
+ *     .withLabelNames("path", "status")
+ *     .register();
+ * requestCount.withLabelValues("/hello-world", "200").inc();
+ * requestCount.withLabelValues("/hello-world", "500").inc();
+ * }</pre>
+ */
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Counter(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(long amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(double amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(long amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(double amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public CounterSnapshot collect() {
+        return (CounterSnapshot) super.collect();
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        if (isExemplarsEnabled()) {
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new DataPoint(null);
+        }
+    }
+
+    @Override
+    protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<CounterSnapshot.CounterDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new CounterSnapshot(getMetadata(), data);
+    }
+
+    static String normalizeName(String name) {
+        if (name != null && name.endsWith("_total")) {
+            name = name.substring(0, name.length() - 6);
+        }
+        return name;
+    }
+
+    class DataPoint implements CounterDataPoint {
+
+        private final DoubleAdder doubleValue = new DoubleAdder();
+        // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
+        // and DoubleAdder for double observations. If the user doesn't observe any double at all,
+        // we will be using the LongAdder and get the best performance.
+        private final LongAdder longValue = new LongAdder();
+        private final long createdTimeMillis = System.currentTimeMillis();
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private DataPoint(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(long amount) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(amount);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(double amount) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(amount);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(long amount, Labels labels) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(amount, labels);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(double amount, Labels labels) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(amount, labels);
+            }
+        }
+
+        private void validateAndAdd(long amount) {
+            if (amount < 0) {
+                throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
+            }
+            longValue.add(amount);
+        }
+
+        private void validateAndAdd(double amount) {
+            if (amount < 0) {
+                throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
+            }
+            doubleValue.add(amount);
+        }
+
+        private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
+            // Read the exemplar first. Otherwise, there is a race condition where you might
+            // see an Exemplar for a value that's not counted yet.
+            // If there are multiple Exemplars (by default it's just one), use the newest.
+            Exemplar latestExemplar = null;
+            if (exemplarSampler != null) {
+                for (Exemplar exemplar : exemplarSampler.collect()) {
+                    if (latestExemplar == null || exemplar.getTimestampMillis() > latestExemplar.getTimestampMillis()) {
+                        latestExemplar = exemplar;
+                    }
+                }
+            }
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, latestExemplar, createdTimeMillis);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, Counter> {
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Counter c1 = Counter.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * Counter c2 = Counter.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            return super.withName(normalizeName(name));
+        }
+
+        @Override
+        public Counter build() {
+            return new Counter(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (c7446f4c1b0684d4b14ed8bb39b4c655f1fd9a95jK5  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javajM5  addedjE5  KejF5  K jO5  KejP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,101 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+ *
+ * CounterWithCallback.newBuilder()
+ *         .withName("classes_loaded_total")
+ *         .withHelp("The total number of classes that have been loaded since the JVM has started execution")
+ *         .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
+ *         .register();
+ * }</pre>
+ */
+public class CounterWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private CounterWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public CounterSnapshot collect() {
+        List<CounterSnapshot.CounterDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new CounterSnapshot.CounterDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new CounterSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<CounterWithCallback.Builder, CounterWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * CounterWithCallback c1 = CounterWithCallback.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * CounterWithCallback c2 = CounterWithCallback.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            return super.withName(Counter.normalizeName(name));
+        }
+
+        @Override
+        public CounterWithCallback build() {
+            return new CounterWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (1b0edfeb1d6fecb569272b142f57a6d39452e69bjK5  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,213 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * Gauge metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Gauge currentActiveUsers = Gauge.newBuilder()
+ *     .withName("current_active_users")
+ *     .withHelp("Number of users that are currently active")
+ *     .withLabelNames("region")
+ *     .register();
+ *
+ * public void login(String region) {
+ *     currentActiveUsers.withLabelValues(region).inc();
+ *     // perform login
+ * }
+ *
+ * public void logout(String region) {
+ *     currentActiveUsers.withLabelValues(region).dec();
+ *     // perform logout
+ * }
+ * }</pre>
+ */
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(double amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(double amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void set(double value) {
+        getNoLabels().set(value);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setWithExemplar(double value, Labels labels) {
+        getNoLabels().setWithExemplar(value, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public GaugeSnapshot collect() {
+        return (GaugeSnapshot) super.collect();
+    }
+
+    @Override
+    protected GaugeSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPointSnapshots = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            dataPointSnapshots.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new GaugeSnapshot(getMetadata(), dataPointSnapshots);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        if (isExemplarsEnabled()) {
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new DataPoint(null);
+        }
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    class DataPoint implements GaugeDataPoint {
+
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private DataPoint(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
+
+        private final AtomicLong value = new AtomicLong(Double.doubleToRawLongBits(0));
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(double amount) {
+            long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(Double.longBitsToDouble(next));
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(double amount, Labels labels) {
+            long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(Double.longBitsToDouble(next), labels);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void set(double value) {
+            this.value.set(Double.doubleToRawLongBits(value));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setWithExemplar(double value, Labels labels) {
+            this.value.set(Double.doubleToRawLongBits(value));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
+            // Read the exemplar first. Otherwise, there is a race condition where you might
+            // see an Exemplar for a value that's not represented in getValue() yet.
+            // If there are multiple Exemplars (by default it's just one), use the oldest
+            // so that we don't violate min age.
+            Exemplar oldest = null;
+            if (isExemplarsEnabled()) {
+                for (Exemplar exemplar : exemplarSampler.collect()) {
+                    if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
+                        oldest = exemplar;
+                    }
+                }
+            }
+            return new GaugeSnapshot.GaugeDataPointSnapshot(Double.longBitsToDouble(value.get()), labels, oldest);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, Gauge> {
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        @Override
+        public Gauge build() {
+            return new Gauge(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (7a1424d95eecee5e16d7b4e3fd75278b7fff50c9jK5  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/GaugeWithCallback.javajM5  addedjE5  KVjF5  K jO5  KVjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,86 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+ *
+ * GaugeWithCallback.newBuilder()
+ *     .withName("jvm_memory_bytes_used")
+ *     .withHelp("Used bytes of a given JVM memory area.")
+ *     .withUnit(Unit.BYTES)
+ *     .withLabelNames("area")
+ *     .withCallback(callback -> {
+ *         callback.call(memoryBean.getHeapMemoryUsage().getUsed(), "heap");
+ *         callback.call(memoryBean.getNonHeapMemoryUsage().getUsed(), "nonheap");
+ *     })
+ *     .register();
+ * }</pre>
+ */
+public class GaugeWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private GaugeWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public GaugeSnapshot collect() {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new GaugeSnapshot.GaugeDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new GaugeSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<GaugeWithCallback.Builder, GaugeWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        @Override
+        public GaugeWithCallback build() {
+            return new GaugeWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (50f352e26737c02cf4114fc330c1b5c573a5a3f7jK5  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajM5  addedjE5  MjF5  K jO5  MjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X)  @@ -0,0 +1,926 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.ExemplarsProperties;
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.core.util.Scheduler;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Histogram metric. Example usage:
+ * <pre>{@code
+ * Histogram histogram = Histogram.newBuilder()
+ *         .withName("http_request_duration_seconds")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // do something
+ * histogram.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
+ * Prometheus supports two internal representations of histograms:
+ * <ol>
+ *     <li><i>Classic Histograms</i> have a fixed number of buckets with fixed bucket boundaries.</li>
+ *     <li><i>Native Histograms</i> have an infinite number of buckets with a dynamic resolution.
+ *         Prometheus native histograms are the same as OpenTelemetry's exponential histograms.</li>
+ * </ol>
+ * By default, a histogram maintains both representations, i.e. the example above will maintain a classic
+ * histogram representation with Prometheus' default bucket boundaries as well as native histogram representation.
+ * Which representation is used depends on the exposition format, i.e. which content type the Prometheus server
+ * accepts when scraping. Exposition format "Text" exposes the classic histogram, exposition format "Protobuf"
+ * exposes both representations. This is great for migrating from classic histograms to native histograms.
+ * <p>
+ * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
+ * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
+ */
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.DataPoint> implements DistributionDataPoint {
+
+    // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
+    private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
+
+    // NATIVE_BOUNDS is used to look up the native bucket index depending on the current schema.
+    private static final double[][] NATIVE_BOUNDS;
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    // Upper bounds for the classic histogram buckets. Contains at least +Inf.
+    // An empty array indicates that this is a native histogram only.
+    private final double[] classicUpperBounds;
+
+    // The schema defines the resolution of the native histogram.
+    // Schema is Prometheus terminology, in OpenTelemetry it's named "scale".
+    // The formula for the bucket boundaries at position "index" is:
+    //
+    // base := base = (2^(2^-scale))
+    // lowerBound := base^(index-1)
+    // upperBound := base^(index)
+    //
+    // Note that this is off-by-one compared to OpenTelemetry.
+    //
+    // Example: With schema 0 the bucket boundaries are ... 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16, ...
+    // Each increment in schema doubles the number of buckets.
+    //
+    // The initialNativeSchema is the schema we start with. The histogram will automatically scale down
+    // if the number of native histogram buckets exceeds nativeMaxBuckets.
+    private final int nativeInitialSchema; // integer in [-4, 8]
+
+    // Native histogram buckets get smaller and smaller the closer they get to zero.
+    // To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+    // values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+    //
+    // The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+    // the number of native histogram buckets exceeds nativeMaxBuckets.
+    private final double nativeMinZeroThreshold;
+    private final double nativeMaxZeroThreshold;
+
+    // When the number of native histogram buckets becomes larger than nativeMaxBuckets,
+    // an attempt is made to reduce the number of buckets:
+    // (1) Reset if the last reset is longer than the reset duration ago
+    // (2) Increase the zero bucket width if it's smaller than nativeMaxZeroThreshold
+    // (3) Decrease the nativeSchema, i.e. merge pairs of neighboring buckets into one
+    private final int nativeMaxBuckets;
+
+    // If the number of native histogram buckets exceeds nativeMaxBuckets,
+    // the histogram may reset (all values set to zero) after nativeResetDurationSeconds is expired.
+    private final long nativeResetDurationSeconds; // 0 indicates no reset
+
+    private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        nativeInitialSchema = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramClassicOnly())) {
+                return CLASSIC_HISTOGRAM;
+            } else {
+                return props.getHistogramNativeInitialSchema();
+            }
+        });
+        classicUpperBounds = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramNativeOnly())) {
+                return new double[]{};
+            } else if (props.getHistogramClassicUpperBounds() != null) {
+                SortedSet<Double> upperBounds = new TreeSet<>(props.getHistogramClassicUpperBounds());
+                upperBounds.add(Double.POSITIVE_INFINITY);
+                double[] result = new double[upperBounds.size()];
+                int i = 0;
+                for (double upperBound : upperBounds) {
+                    result[i++] = upperBound;
+                }
+                return result;
+            } else {
+                return null;
+            }
+        });
+        double max = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxZeroThreshold);
+        double min = getConfigProperty(properties, MetricsProperties::getHistogramNativeMinZeroThreshold);
+        nativeMaxZeroThreshold = max == builder.DEFAULT_NATIVE_MAX_ZERO_THRESHOLD && min > max ? min : max;
+        nativeMinZeroThreshold = Math.min(min, nativeMaxZeroThreshold);
+        nativeMaxBuckets = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxNumberOfBuckets);
+        nativeResetDurationSeconds = getConfigProperty(properties, MetricsProperties::getHistogramNativeResetDurationSeconds);
+        ExemplarsProperties exemplarsProperties = prometheusProperties.getExemplarProperties();
+        exemplarSamplerConfig = classicUpperBounds.length == 0 ?
+                new ExemplarSamplerConfig(exemplarsProperties, 4) :
+                new ExemplarSamplerConfig(exemplarsProperties, classicUpperBounds);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    public class DataPoint implements DistributionDataPoint {
+        private final LongAdder[] classicBuckets;
+        private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
+        private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
+        private final LongAdder nativeZeroCount = new LongAdder();
+        private final LongAdder count = new LongAdder();
+        private final DoubleAdder sum = new DoubleAdder();
+        private volatile int nativeSchema = nativeInitialSchema; // integer in [-4, 8] or CLASSIC_HISTOGRAM
+        private volatile double nativeZeroThreshold = Histogram.this.nativeMinZeroThreshold;
+        private volatile long createdTimeMillis = System.currentTimeMillis();
+        private final Buffer buffer = new Buffer();
+        private volatile boolean resetDurationExpired = false;
+        private final ExemplarSampler exemplarSampler;
+
+        private DataPoint() {
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
+            classicBuckets = new LongAdder[classicUpperBounds.length];
+            for (int i = 0; i < classicUpperBounds.length; i++) {
+                classicBuckets[i] = new LongAdder();
+            }
+            maybeScheduleNextReset();
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
+                // See https://github.com/prometheus/client_golang/issues/1275 on ignoring NaN observations.
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value, false);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observeWithExemplar(double value, Labels labels) {
+            if (Double.isNaN(value)) {
+                // See https://github.com/prometheus/client_golang/issues/1275 on ignoring NaN observations.
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value, false);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private void doObserve(double value, boolean fromBuffer) {
+            // classicUpperBounds is an empty array if this is a native histogram only.
+            for (int i = 0; i < classicUpperBounds.length; ++i) {
+                // The last bucket is +Inf, so we always increment.
+                if (value <= classicUpperBounds[i]) {
+                    classicBuckets[i].add(1);
+                    break;
+                }
+            }
+            boolean nativeBucketCreated = false;
+            if (Histogram.this.nativeInitialSchema != CLASSIC_HISTOGRAM) {
+                if (value > nativeZeroThreshold) {
+                    nativeBucketCreated = addToNativeBucket(value, nativeBucketsForPositiveValues);
+                } else if (value < -nativeZeroThreshold) {
+                    nativeBucketCreated = addToNativeBucket(-value, nativeBucketsForNegativeValues);
+                } else {
+                    nativeZeroCount.add(1);
+                }
+            }
+            sum.add(value);
+            count.increment(); // must be the last step, because count is used to signal that the operation is complete.
+            if (!fromBuffer) {
+                // maybeResetOrScaleDown will switch to the buffer,
+                // which won't work if we are currently still processing observations from the buffer.
+                // The reason is that before switching to the buffer we wait for all pending observations to be counted.
+                // If we do this while still applying observations from the buffer, the pending observations from
+                // the buffer will never be counted, and the buffer.run() method will wait forever.
+                maybeResetOrScaleDown(value, nativeBucketCreated);
+            }
+        }
+
+        private HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
+            Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
+            return buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    () -> {
+                        if (classicUpperBounds.length == 0) {
+                            // native only
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    nativeSchema,
+                                    nativeZeroCount.sum(),
+                                    nativeZeroThreshold,
+                                    toBucketList(nativeBucketsForPositiveValues),
+                                    toBucketList(nativeBucketsForNegativeValues),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        } else if (Histogram.this.nativeInitialSchema == CLASSIC_HISTOGRAM) {
+                            // classic only
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        } else {
+                            // hybrid: classic and native
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
+                                    nativeSchema,
+                                    nativeZeroCount.sum(),
+                                    nativeZeroThreshold,
+                                    toBucketList(nativeBucketsForPositiveValues),
+                                    toBucketList(nativeBucketsForNegativeValues),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        }
+                    },
+                    v -> doObserve(v, true)
+            );
+        }
+
+        private boolean addToNativeBucket(double value, ConcurrentHashMap<Integer, LongAdder> buckets) {
+            boolean newBucketCreated = false;
+            int bucketIndex;
+            if (Double.isInfinite(value)) {
+                bucketIndex = findBucketIndex(Double.MAX_VALUE) + 1;
+            } else {
+                bucketIndex = findBucketIndex(value);
+            }
+            LongAdder bucketCount = buckets.get(bucketIndex);
+            if (bucketCount == null) {
+                LongAdder newBucketCount = new LongAdder();
+                LongAdder existingBucketCount = buckets.putIfAbsent(bucketIndex, newBucketCount);
+                if (existingBucketCount == null) {
+                    newBucketCreated = true;
+                    bucketCount = newBucketCount;
+                } else {
+                    bucketCount = existingBucketCount;
+                }
+            }
+            bucketCount.increment();
+            return newBucketCreated;
+        }
+
+        private int findBucketIndex(double value) {
+            // Preconditions:
+            // Double.isNan(value) is false;
+            // Double.isInfinite(value) is false;
+            // value > 0
+            // ---
+            // The following is a naive implementation of C's frexp() function.
+            // Performance can be improved by using the internal Bit representation of floating point numbers.
+            // More info on the Bit representation of floating point numbers:
+            // https://stackoverflow.com/questions/8341395/what-is-a-subnormal-floating-point-number
+            // Result: value == frac * 2^exp where frac in [0.5, 1).
+            double frac = value;
+            int exp = 0;
+            while (frac < 0.5) {
+                frac *= 2.0;
+                exp--;
+            }
+            while (frac >= 1.0) {
+                frac /= 2.0;
+                exp++;
+            }
+            // end of frexp()
+
+            if (nativeSchema >= 1) {
+                return findIndex(NATIVE_BOUNDS[nativeSchema - 1], frac) + (exp - 1) * NATIVE_BOUNDS[nativeSchema - 1].length;
+            } else {
+                int bucketIndex = exp;
+                if (frac == 0.5) {
+                    bucketIndex--;
+                }
+                int offset = (1 << -nativeSchema) - 1;
+                bucketIndex = (bucketIndex + offset) >> -nativeSchema;
+                return bucketIndex;
+            }
+        }
+
+        private int findIndex(double[] bounds, double frac) {
+            // The following is the equivalent of golang's sort.SearchFloat64s(bounds, frac)
+            // See https://pkg.go.dev/sort#SearchFloat64s
+            int first = 0;
+            int last = bounds.length - 1;
+            while (first <= last) {
+                int mid = (first + last) / 2;
+                if (bounds[mid] == frac) {
+                    return mid;
+                } else if (bounds[mid] < frac) {
+                    first = mid + 1;
+                } else {
+                    last = mid - 1;
+                }
+            }
+            return last + 1;
+        }
+
+        /**
+         * Makes sure that the number of native buckets does not exceed nativeMaxBuckets.
+         * <ul>
+         *     <li>If the histogram has already been scaled down (nativeSchema < initialSchema)
+         *         reset after resetIntervalExpired to get back to the original schema.</li>
+         *     <li>If a new bucket was created and we now exceed nativeMaxBuckets
+         *         run maybeScaleDown() to scale down</li>
+         * </ul>
+         */
+        private void maybeResetOrScaleDown(double value, boolean nativeBucketCreated) {
+            AtomicBoolean wasReset = new AtomicBoolean(false);
+            if (resetDurationExpired && nativeSchema < nativeInitialSchema) {
+                // If nativeSchema < initialNativeSchema the histogram has been scaled down.
+                // So if resetDurationExpired we will reset it to restore the original native schema.
+                buffer.run(expectedCount -> count.sum() == expectedCount,
+                        () -> {
+                            if (maybeReset()) {
+                                wasReset.set(true);
+                            }
+                            return null;
+                        },
+                        v -> doObserve(v, true));
+            } else if (nativeBucketCreated) {
+                // If a new bucket was created we need to check if nativeMaxBuckets is exceeded
+                // and scale down if so.
+                maybeScaleDown(wasReset);
+            }
+            if (wasReset.get()) {
+                // We just discarded the newly observed value. Observe it again.
+                if (!buffer.append(value)) {
+                    doObserve(value, true);
+                }
+            }
+        }
+
+        private void maybeScaleDown(AtomicBoolean wasReset) {
+            if (nativeMaxBuckets == 0 || nativeSchema == -4) {
+                return;
+            }
+            int numberOfBuckets = nativeBucketsForPositiveValues.size() + nativeBucketsForNegativeValues.size();
+            if (numberOfBuckets <= nativeMaxBuckets) {
+                return;
+            }
+            buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    () -> {
+                        // Now we are in the synchronized block while new observations go into the buffer.
+                        // Check again if we need to limit the bucket size, because another thread might
+                        // have limited it in the meantime.
+                        int nBuckets = nativeBucketsForPositiveValues.size() + nativeBucketsForNegativeValues.size();
+                        if (nBuckets <= nativeMaxBuckets || nativeSchema == -4) {
+                            return null;
+                        }
+                        if (maybeReset()) {
+                            wasReset.set(true);
+                            return null;
+                        }
+                        if (maybeWidenZeroBucket()) {
+                            return null;
+                        }
+                        doubleBucketWidth();
+                        return null;
+                    },
+                    v -> doObserve(v, true)
+            );
+        }
+
+        // maybeReset is called in the synchronized block while new observations go into the buffer.
+        private boolean maybeReset() {
+            if (!resetDurationExpired) {
+                return false;
+            }
+            resetDurationExpired = false;
+            buffer.reset();
+            nativeBucketsForPositiveValues.clear();
+            nativeBucketsForNegativeValues.clear();
+            nativeZeroCount.reset();
+            count.reset();
+            sum.reset();
+            for (int i = 0; i < classicBuckets.length; i++) {
+                classicBuckets[i].reset();
+            }
+            nativeZeroThreshold = nativeMinZeroThreshold;
+            nativeSchema = Histogram.this.nativeInitialSchema;
+            createdTimeMillis = System.currentTimeMillis();
+            if (exemplarSampler != null) {
+                exemplarSampler.reset();
+            }
+            maybeScheduleNextReset();
+            return true;
+        }
+
+        // maybeWidenZeroBucket is called in the synchronized block while new observations go into the buffer.
+        private boolean maybeWidenZeroBucket() {
+            if (nativeZeroThreshold >= nativeMaxZeroThreshold) {
+                return false;
+            }
+            int smallestIndex = findSmallestIndex(nativeBucketsForPositiveValues);
+            int smallestNegativeIndex = findSmallestIndex(nativeBucketsForNegativeValues);
+            if (smallestNegativeIndex < smallestIndex) {
+                smallestIndex = smallestNegativeIndex;
+            }
+            if (smallestIndex == Integer.MAX_VALUE) {
+                return false;
+            }
+            double newZeroThreshold = nativeBucketIndexToUpperBound(nativeSchema, smallestIndex);
+            if (newZeroThreshold > nativeMaxZeroThreshold) {
+                return false;
+            }
+            mergeWithZeroBucket(smallestIndex, nativeBucketsForPositiveValues);
+            mergeWithZeroBucket(smallestIndex, nativeBucketsForNegativeValues);
+            nativeZeroThreshold = newZeroThreshold;
+            return true;
+        }
+
+        private void mergeWithZeroBucket(int index, Map<Integer, LongAdder> buckets) {
+            LongAdder count = buckets.remove(index);
+            if (count != null) {
+                nativeZeroCount.add(count.sum());
+            }
+        }
+
+        private double nativeBucketIndexToUpperBound(int schema, int index) {
+            double result = calcUpperBound(schema, index);
+            if (Double.isInfinite(result)) {
+                // The last bucket boundary should always be MAX_VALUE, so that the +Inf bucket counts only
+                // actual +Inf observations.
+                // However, MAX_VALUE is not a natural bucket boundary, so we introduce MAX_VALUE
+                // as an artificial boundary before +Inf.
+                double previousBucketBoundary = calcUpperBound(schema, index - 1);
+                if (Double.isFinite(previousBucketBoundary) && previousBucketBoundary < Double.MAX_VALUE) {
+                    return Double.MAX_VALUE;
+                }
+            }
+            return result;
+        }
+
+        private double calcUpperBound(int schema, int index) {
+            // The actual formula is:
+            // ---
+            // base := 2^(2^-schema);
+            // upperBound := base^index;
+            // ---
+            // The following implementation reduces the numerical error for index > 0.
+            // It's not very efficient. We should refactor and use an algorithm as in client_golang's getLe()
+            double factor = 1.0;
+            while (index > 0) {
+                if (index % 2 == 0) {
+                    index /= 2;
+                    schema -= 1;
+                } else {
+                    index -= 1;
+                    factor *= Math.pow(2, Math.pow(2, -schema));
+                }
+            }
+            return factor * Math.pow(2, index * Math.pow(2, -schema));
+        }
+
+        private int findSmallestIndex(Map<Integer, LongAdder> nativeBuckets) {
+            int result = Integer.MAX_VALUE;
+            for (int key : nativeBuckets.keySet()) {
+                if (key < result) {
+                    result = key;
+                }
+            }
+            return result;
+        }
+
+        // doubleBucketWidth is called in the synchronized block while new observations go into the buffer.
+        private void doubleBucketWidth() {
+            doubleBucketWidth(nativeBucketsForPositiveValues);
+            doubleBucketWidth(nativeBucketsForNegativeValues);
+            nativeSchema--;
+        }
+
+        private void doubleBucketWidth(Map<Integer, LongAdder> buckets) {
+            int[] keys = new int[buckets.size()];
+            long[] values = new long[keys.length];
+            int i = 0;
+            for (Map.Entry<Integer, LongAdder> entry : buckets.entrySet()) {
+                keys[i] = entry.getKey();
+                values[i] = entry.getValue().sum();
+                i++;
+            }
+            buckets.clear();
+            for (i = 0; i < keys.length; i++) {
+                int index = (keys[i] + 1) / 2;
+                LongAdder count = buckets.get(index);
+                if (count == null) {
+                    count = new LongAdder();
+                    buckets.put(index, count);
+                }
+                count.add(values[i]);
+            }
+        }
+
+        private NativeHistogramBuckets toBucketList(ConcurrentHashMap<Integer, LongAdder> map) {
+            int[] bucketIndexes = new int[map.size()];
+            long[] counts = new long[map.size()];
+            int i = 0;
+            for (Map.Entry<Integer, LongAdder> entry : map.entrySet()) {
+                bucketIndexes[i] = entry.getKey();
+                counts[i] = entry.getValue().sum();
+                i++;
+            }
+            return NativeHistogramBuckets.of(bucketIndexes, counts);
+        }
+
+        private void maybeScheduleNextReset() {
+            if (nativeResetDurationSeconds > 0) {
+                Scheduler.schedule(() -> resetDurationExpired = true, nativeResetDurationSeconds, TimeUnit.SECONDS);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public HistogramSnapshot collect() {
+        return (HistogramSnapshot) super.collect();
+    }
+
+    @Override
+    protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<HistogramSnapshot.HistogramDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new HistogramSnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+    static {
+        // See bounds in client_golang's histogram implementation.
+        NATIVE_BOUNDS = new double[8][];
+        for (int schema = 1; schema <= 8; schema++) {
+            NATIVE_BOUNDS[schema - 1] = new double[1 << schema];
+            NATIVE_BOUNDS[schema - 1][0] = 0.5;
+            // https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L501
+            double base = Math.pow(2, Math.pow(2, -schema));
+            for (int i = 1; i < NATIVE_BOUNDS[schema - 1].length; i++) {
+                if (i % 2 == 0 && schema > 1) {
+                    // Use previously calculated value for increased precision, see comment in client_golang's implementation.
+                    NATIVE_BOUNDS[schema - 1][i] = NATIVE_BOUNDS[schema - 2][i / 2];
+                } else {
+                    NATIVE_BOUNDS[schema - 1][i] = NATIVE_BOUNDS[schema - 1][i - 1] * base;
+                }
+            }
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Histogram.Builder, Histogram> {
+
+        public static final double[] DEFAULT_CLASSIC_UPPER_BOUNDS = new double[]{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10};
+        private final double DEFAULT_NATIVE_MIN_ZERO_THRESHOLD = Math.pow(2.0, -128);
+        private final double DEFAULT_NATIVE_MAX_ZERO_THRESHOLD = Math.pow(2.0, -128);
+        private final int DEFAULT_NATIVE_INITIAL_SCHEMA = 5;
+        private final int DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS = 160;
+        private final long DEFAULT_NATIVE_RESET_DURATION_SECONDS = 0; // 0 means no reset
+
+        private Boolean nativeOnly;
+        private Boolean classicOnly;
+        private double[] classicUpperBounds;
+        private Integer nativeInitialSchema;
+        private Double nativeMaxZeroThreshold;
+        private Double nativeMinZeroThreshold;
+        private Integer nativeMaxNumberOfBuckets;
+        private Long nativeResetDurationSeconds;
+
+        @Override
+        public Histogram build() {
+            return new Histogram(this, properties);
+        }
+
+        @Override
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withHistogramNativeOnly(nativeOnly)
+                    .withHistogramClassicOnly(classicOnly)
+                    .withHistogramClassicUpperBounds(classicUpperBounds)
+                    .withHistogramNativeInitialSchema(nativeInitialSchema)
+                    .withHistogramNativeMinZeroThreshold(nativeMinZeroThreshold)
+                    .withHistogramNativeMaxZeroThreshold(nativeMaxZeroThreshold)
+                    .withHistogramNativeMaxNumberOfBuckets(nativeMaxNumberOfBuckets)
+                    .withHistogramNativeResetDurationSeconds(nativeResetDurationSeconds)
+                    .build();
+        }
+
+        /**
+         * Default properties for histogram metrics.
+         */
+        @Override
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withHistogramNativeOnly(false)
+                    .withHistogramClassicOnly(false)
+                    .withHistogramClassicUpperBounds(DEFAULT_CLASSIC_UPPER_BOUNDS)
+                    .withHistogramNativeInitialSchema(DEFAULT_NATIVE_INITIAL_SCHEMA)
+                    .withHistogramNativeMinZeroThreshold(DEFAULT_NATIVE_MIN_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxZeroThreshold(DEFAULT_NATIVE_MAX_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxNumberOfBuckets(DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS)
+                    .withHistogramNativeResetDurationSeconds(DEFAULT_NATIVE_RESET_DURATION_SECONDS)
+                    .build();
+        }
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.singletonList("le"), config);
+        }
+
+        /**
+         * Use the native histogram representation only, i.e. don't maintain classic histogram buckets.
+         * See {@link Histogram} for more info.
+         */
+        public Builder nativeOnly() {
+            if (Boolean.TRUE.equals(classicOnly)) {
+                throw new IllegalArgumentException("Cannot call nativeOnly() after calling classicOnly().");
+            }
+            nativeOnly = true;
+            return this;
+        }
+
+        /**
+         * Use the classic histogram representation only, i.e. don't maintain native histogram buckets.
+         * See {@link Histogram} for more info.
+         */
+        public Builder classicOnly() {
+            if (Boolean.TRUE.equals(nativeOnly)) {
+                throw new IllegalArgumentException("Cannot call classicOnly() after calling nativeOnly().");
+            }
+            classicOnly = true;
+            return this;
+        }
+
+
+        /**
+         * Set the upper bounds for the classic histogram buckets.
+         * Default is {@link Builder#DEFAULT_CLASSIC_UPPER_BOUNDS}.
+         * If the +Inf bucket is missing it will be added.
+         * If upperBounds contains duplicates the duplicates will be removed.
+         */
+        public Builder withClassicBuckets(double... upperBounds) {
+            this.classicUpperBounds = upperBounds;
+            for (double bound : upperBounds) {
+                if (Double.isNaN(bound)) {
+                    throw new IllegalArgumentException("Cannot use NaN as upper bound for a histogram");
+                }
+            }
+            return this;
+        }
+
+        /**
+         * Create classic histogram buckets with linear bucket boundaries.
+         * <p>
+         * Example: {@code withClassicLinearBuckets(1.0, 0.5, 10)} creates bucket boundaries
+         * {@code [[1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5]}.
+         *
+         * @param start is the first bucket boundary
+         * @param width is the width of each bucket
+         * @param count is the total number of buckets, including start
+         */
+        public Builder withClassicLinearBuckets(double start, double width, int count) {
+            this.classicUpperBounds = new double[count];
+            // Use BigDecimal to avoid weird bucket boundaries like 0.7000000000000001.
+            BigDecimal s = new BigDecimal(Double.toString(start));
+            BigDecimal w = new BigDecimal(Double.toString(width));
+            for (int i = 0; i < count; i++) {
+                classicUpperBounds[i] = s.add(w.multiply(new BigDecimal(i))).doubleValue();
+            }
+            return this;
+        }
+
+        /**
+         * Create classic histogram bucxkets with exponential boundaries.
+         * <p>
+         * Example: {@code withClassicExponentialBuckets(1.0, 2.0, 10)} creates bucket bounaries
+         * {@code [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0]}
+         *
+         * @param start  is the first bucket boundary
+         * @param factor growth factor
+         * @param count  total number of buckets, including start
+         */
+        public Builder withClassicExponentialBuckets(double start, double factor, int count) {
+            classicUpperBounds = new double[count];
+            for (int i = 0; i < count; i++) {
+                classicUpperBounds[i] = start * Math.pow(factor, i);
+            }
+            return this;
+        }
+
+        /**
+         * The schema is a number in [-4, 8] defining the resolution of the native histogram.
+         * Default is {@link Builder#DEFAULT_NATIVE_INITIAL_SCHEMA}.
+         * <p>
+         * The higher the schema, the finer the resolution.
+         * Schema is Prometheus terminology. In OpenTelemetry it's called "scale".
+         * <p>
+         * Note that the schema for a histogram may be automatically decreased at runtime if the number
+         * of native histogram buckets exceeds {@link #withNativeMaxNumberOfBuckets(int)}.
+         * <p>
+         * The following table shows:
+         * <ul>
+         *     <li>factor: The growth factor for bucket boundaries, i.e. next bucket boundary = growth factor * previous bucket boundary.
+         *     <li>max quantile error: The maximum error for quantiles calculated using the Prometheus histogram_quantile() function, relative to the observed value, assuming harmonic mean.
+         * </ul>
+         * <table border>
+         *     <tr>
+         *         <td>schema</td><td>factor</td><td>max quantile error</td>
+         *     </tr>
+         *     <tr>
+         *         <td>-4</td><td>65.536</td>99%<td></td>
+         *     </tr>
+         *     <tr>
+         *         <td>-3</td><td>256</td>99%<td></td>
+         *     </tr>
+         *     <tr>
+         *         <td>-2</td><td>16</td><td>88%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>-1</td><td>4</td><td>60%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>0</td><td>2</td><td>33%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>1</td><td>1.4142...</td><td>17%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>2</td><td>1.1892...</td><td>9%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>3</td><td>1.1090...</td><td>4%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>4</td><td>1.0442...</td><td>2%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>5</td><td>1.0218...</td><td>1%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>6</td><td>1.0108...</td><td>0.5%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>7</td><td>1.0054...</td><td>0.3%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>8</td><td>1.0027...</td><td>0.1%</td>
+         *     </tr>
+         * </table>
+         */
+        public Builder withNativeInitialSchema(int nativeSchema) {
+            if (nativeSchema < -4 || nativeSchema > 8) {
+                throw new IllegalArgumentException("Unsupported native histogram schema " + nativeSchema + ": expecting -4 <= schema <= 8.");
+            }
+            this.nativeInitialSchema = nativeSchema;
+            return this;
+        }
+
+        /**
+         * Native histogram buckets get smaller and smaller the closer they get to zero.
+         * To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+         * values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+         * <p>
+         * The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+         * the number of native histogram buckets exceeds nativeMaxBuckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS}.
+         */
+        public Builder withNativeMaxZeroThreshold(double nativeMaxZeroThreshold) {
+            if (nativeMaxZeroThreshold < 0) {
+                throw new IllegalArgumentException("Illegal native max zero threshold " + nativeMaxZeroThreshold + ": must be >= 0");
+            }
+            this.nativeMaxZeroThreshold = nativeMaxZeroThreshold;
+            return this;
+        }
+
+        /**
+         * Native histogram buckets get smaller and smaller the closer they get to zero.
+         * To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+         * values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+         * <p>
+         * The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+         * the number of native histogram buckets exceeds nativeMaxBuckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MIN_ZERO_THRESHOLD}.
+         */
+        public Builder withNativeMinZeroThreshold(double nativeMinZeroThreshold) {
+            if (nativeMinZeroThreshold < 0) {
+                throw new IllegalArgumentException("Illegal native min zero threshold " + nativeMinZeroThreshold + ": must be >= 0");
+            }
+            this.nativeMinZeroThreshold = nativeMinZeroThreshold;
+            return this;
+        }
+
+        /**
+         * Limit the number of native buckets.
+         * <p>
+         * If the number of native buckets exceeds the maximum, the {@link #withNativeInitialSchema(int)} is decreased,
+         * i.e. the resolution of the histogram is decreased to reduce the number of buckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS}.
+         */
+        public Builder withNativeMaxNumberOfBuckets(int nativeMaxBuckets) {
+            this.nativeMaxNumberOfBuckets = nativeMaxBuckets;
+            return this;
+        }
+
+        /**
+         * If the histogram needed to be scaled down because {@link #withNativeMaxNumberOfBuckets(int)} was exceeded,
+         * reset the histogram after a certain time interval to go back to the original {@link #withNativeInitialSchema(int)}.
+         * <p>
+         * Reset means all values are set to zero. A good value might be 24h or 7d.
+         * <p>
+         * Default is no reset.
+         */
+        public Builder withNativeResetDuration(long duration, TimeUnit unit) {
+            // TODO: reset interval isn't tested yet
+            if (duration <= 0) {
+                throw new IllegalArgumentException(duration + ": value > 0 expected");
+            }
+            nativeResetDurationSeconds = unit.toSeconds(duration);
+            return this;
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u-/     }(j4  (9d6675dbb86e65db74b02e8eedafd51293d16c71jK5  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XS  @@ -0,0 +1,132 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * Info metric. Example:
+ * <pre>{@code
+ * Info info = Info.newBuilder()
+ *         .withName("java_runtime_info")
+ *         .withHelp("Java runtime info")
+ *         .withLabelNames("env", "version", "vendor", "runtime")
+ *         .register();
+ *
+ * String version = System.getProperty("java.runtime.version", "unknown");
+ * String vendor = System.getProperty("java.vm.vendor", "unknown");
+ * String runtime = System.getProperty("java.runtime.name", "unknown");
+ *
+ * info.infoLabelValues("prod", version, vendor, runtime);
+ * info.infoLabelValues("dev", version, vendor, runtime);
+ * }</pre>
+ */
+public class Info extends MetricWithFixedMetadata {
+
+    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+
+    private Info(Builder builder) {
+        super(builder);
+    }
+
+    /**
+     * Create an info data point with the given label values.
+     */
+    public void infoLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            }
+        }
+        labels.add(Labels.of(labelNames, labelValues));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public InfoSnapshot collect() {
+        List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        }
+        return new InfoSnapshot(getMetadata(), data);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        /**
+         * The {@code _info} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Info info1 = Info.newBuilder()
+         *     .withName("runtime_info")
+         *     .build();
+         * Info info2 = Info.newBuilder()
+         *     .withName("runtime")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            if (name != null && name.endsWith("_info")) {
+                name = name.substring(0, name.length() - 5);
+            }
+            return super.withName(name);
+        }
+
+        /**
+         * Throws an {@link UnsupportedOperationException} because Info metrics cannot have a unit.
+         */
+        @Override
+        public Builder withUnit(Unit unit) {
+            if (unit != null) {
+                throw new UnsupportedOperationException("Info metrics cannot have a unit.");
+            }
+            return this;
+        }
+
+        private static String normalizeName(String name) {
+            if (name != null && name.endsWith("_info")) {
+                name = name.substring(0, name.length() - 5);
+            }
+            return name;
+        }
+
+        @Override
+        public Info build() {
+            return new Info(withName(normalizeName(name)));
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (81ff931ce511e1e05fd6ea3ef92a646983553542jK5  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javajM5  addedjE5  KDjF5  K jO5  KDjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X	  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Common base class for all metrics.
+ */
+public abstract class Metric implements Collector {
+
+    protected final Labels constLabels;
+
+    protected Metric(Builder<?, ?> builder) {
+        this.constLabels = builder.constLabels;
+    }
+
+    @Override
+    public abstract MetricSnapshot collect();
+
+    protected static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
+
+        protected final List<String> illegalLabelNames;
+        protected final PrometheusProperties properties;
+        private Labels constLabels = Labels.EMPTY;
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            this.illegalLabelNames = new ArrayList<>(illegalLabelNames);
+            this.properties = properties;
+        }
+
+        // ConstLabels are only used rarely. In particular, do not use them to
+        // attach the same labels to all your metrics. Those use cases are
+        // better covered by target labels set by the scraping Prometheus
+        // server, or by one specific metric (e.g. a build_info or a
+        // machine_role metric). See also
+        // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels
+        public B withConstLabels(Labels constLabels) {
+            for (Label label : constLabels) { // NPE if constLabels is null
+                if (illegalLabelNames.contains(label.getName())) {
+                    throw new IllegalArgumentException(label.getName() + ": illegal label name for this metric type");
+                }
+            }
+            this.constLabels = constLabels;
+            return self();
+        }
+
+        public M register() {
+            return register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public M register(PrometheusRegistry registry) {
+            M metric = build();
+            registry.register(metric);
+            return metric;
+        }
+
+        public abstract M build();
+
+        protected abstract B self();
+    }
+}u}(j4  (22b6076542f6da856dc1fcbf50bfbd65793fc501jK5  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajM5  addedjE5  KZjF5  K jO5  KZjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,90 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
+ * <p>
+ * An exception would be a metric that is a bridge to a 3rd party metric library, where the metric name
+ * has to be retrieved from the 3rd party metric library at scrape time.
+ */
+public abstract class MetricWithFixedMetadata extends Metric {
+
+    private final MetricMetadata metadata;
+    protected final String[] labelNames;
+
+    protected MetricWithFixedMetadata(Builder<?, ?> builder) {
+        super(builder);
+        this.metadata = new MetricMetadata(makeName(builder.name, builder.unit), builder.help, builder.unit);
+        this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
+    }
+
+    protected MetricMetadata getMetadata() {
+        return metadata;
+    }
+
+    private String makeName(String name, Unit unit) {
+        if (unit != null) {
+            String suffix = "_" + unit;
+            if (!name.endsWith(suffix)) {
+                name = name + suffix;
+            }
+        }
+        return name;
+    }
+
+    public static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
+
+        protected String name;
+        private Unit unit;
+        private String help;
+        private String[] labelNames = new String[0];
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+
+        public B withName(String name) {
+            if (!MetricMetadata.isValidMetricName(name)) {
+                throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
+            }
+            this.name = name;
+            return self();
+        }
+
+        public B withUnit(Unit unit) {
+            this.unit = unit;
+            return self();
+        }
+
+        public B withHelp(String help) {
+            this.help = help;
+            return self();
+        }
+
+        public B withLabelNames(String... labelNames) {
+            for (String labelName : labelNames) {
+                if (!Labels.isValidLabelName(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name");
+                }
+                if (illegalLabelNames.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
+                }
+            }
+            this.labelNames = labelNames;
+            return self();
+        }
+
+        @Override
+        public abstract M build();
+
+        @Override
+        protected abstract B self();
+    }
+}u}(j4  (b789e809c567a46ce3105496d4ce072af3057489jK5  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.javajM5  addedjE5  KJjF5  K jO5  KJjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.core.metrics;
+
+import java.lang.reflect.Array;
+import java.util.concurrent.TimeUnit;
+import java.util.function.ObjDoubleConsumer;
+import java.util.function.Supplier;
+
+/**
+ * Maintains a ring buffer of T to implement a sliding time window.
+ * <p>
+ * This is used to maintain a sliding window of {@link CKMSQuantiles} for {@link Summary} metrics.
+ * <p>
+ * It is implemented in a generic way so that 3rd party libraries can use it for implementing sliding windows.
+ * <p>
+ * TODO: The current implementation is {@code synchronized}. There is likely room for optimization.
+ */
+public class SlidingWindow<T> {
+
+    private final Supplier<T> constructor;
+    private final ObjDoubleConsumer<T> observeFunction;
+    private final T[] ringBuffer;
+    private int currentBucket;
+    private long lastRotateTimestampMillis;
+    private final long durationBetweenRotatesMillis;
+
+    /**
+     * Example: If the {@code maxAgeSeconds} is 60 and {@code ageBuckets} is 3, then 3 instances of {@code T}
+     * are maintained and the sliding window moves to the next instance of T every 20 seconds.
+     *
+     * @param clazz type of T
+     * @param constructor for creating a new instance of T as the old one gets evicted
+     * @param observeFunction for observing a value (e.g. calling {@code t.observe(value)}
+     * @param maxAgeSeconds after this amount of time an instance of T gets evicted.
+     * @param ageBuckets number of age buckets.
+     */
+    public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<T> observeFunction, long maxAgeSeconds, int ageBuckets) {
+        this.constructor = constructor;
+        this.observeFunction = observeFunction;
+        this.ringBuffer = (T[]) Array.newInstance(clazz, ageBuckets);
+        for (int i = 0; i < ringBuffer.length; i++) {
+            this.ringBuffer[i] = constructor.get();
+        }
+        this.currentBucket = 0;
+        this.lastRotateTimestampMillis = System.currentTimeMillis();
+        this.durationBetweenRotatesMillis = TimeUnit.SECONDS.toMillis(maxAgeSeconds) / ageBuckets;
+    }
+
+    /**
+     * Get the currently active instance of {@code T}.
+     */
+    public synchronized T current() {
+        return rotate();
+    }
+
+    /**
+     * Observe a value.
+     */
+    public synchronized void observe(double value) {
+        observeFunction.accept(rotate(), value);
+    }
+
+    private T rotate() {
+        long timeSinceLastRotateMillis = System.currentTimeMillis() - lastRotateTimestampMillis;
+        while (timeSinceLastRotateMillis > durationBetweenRotatesMillis) {
+            ringBuffer[currentBucket] = constructor.get();
+            if (++currentBucket >= ringBuffer.length) {
+                currentBucket = 0;
+            }
+            timeSinceLastRotateMillis -= durationBetweenRotatesMillis;
+            lastRotateTimestampMillis += durationBetweenRotatesMillis;
+        }
+        return ringBuffer[currentBucket];
+    }
+}u}(j4  (308c61be14cdabfa86b8ab39f5bfee20bfcebd8djK5  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,194 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * StateSet metric. Example:
+ * <pre>{@code
+ * public enum Feature {
+ *
+ *     FEATURE_1("feature1"),
+ *     FEATURE_2("feature2");
+ *
+ *     private final String name;
+ *
+ *     Feature(String name) {
+ *         this.name = name;
+ *     }
+ *
+ *     @Override
+ *     public String toString() {
+ *         return name;
+ *     }
+ * }
+ *
+ * public static void main(String[] args) {
+ *
+ *     StateSet stateSet = StateSet.newBuilder()
+ *             .withName("feature_flags")
+ *             .withHelp("Feature flags")
+ *             .withLabelNames("env")
+ *             .withStates(Feature.class)
+ *             .register();
+ *
+ *     stateSet.withLabelValues("dev").setFalse(FEATURE_1);
+ *     stateSet.withLabelValues("dev").setTrue(FEATURE_2);
+ * }
+ * }</pre>
+ * The example above shows how to use a StateSet with an enum.
+ * You don't have to use enum, you can use regular strings as well.
+ */
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
+
+    private final boolean exemplarsEnabled;
+    private final String[] names;
+
+    private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        this.names = builder.names; // builder.names is already a validated copy
+        for (String name : names) {
+            if (this.getMetadata().getName().equals(name)) {
+                throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public StateSetSnapshot collect() {
+        return (StateSetSnapshot) super.collect();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setTrue(String state) {
+        getNoLabels().setTrue(state);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setFalse(String state) {
+        getNoLabels().setFalse(state);
+    }
+
+    @Override
+    protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
+        List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(new StateSetSnapshot.StateSetDataPointSnapshot(names, metricDataList.get(i).values, labels.get(i)));
+        }
+        return new StateSetSnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    class DataPoint implements StateSetDataPoint {
+
+        private final boolean[] values = new boolean[names.length];
+
+        private DataPoint() {
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setTrue(String state) {
+            set(state, true);
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setFalse(String state) {
+            set(state, false);
+        }
+
+        private void set(String name, boolean value) {
+            for (int i = 0; i < names.length; i++) {
+                if (names[i].equals(name)) {
+                    values[i] = value;
+                    return;
+                }
+            }
+            throw new IllegalArgumentException(name + ": unknown state");
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, StateSet> {
+
+        private String[] names;
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
+        public Builder withStates(Class<? extends Enum<?>> enumClass) {
+            return withStates(Stream.of(enumClass.getEnumConstants()).map(Enum::toString).toArray(String[]::new));
+        }
+
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
+        public Builder withStates(String... stateNames) {
+            if (stateNames.length == 0) {
+                throw new IllegalArgumentException("states cannot be empty");
+            }
+            this.names = Stream.of(stateNames)
+                    .distinct()
+                    .sorted()
+                    .toArray(String[]::new);
+            return this;
+        }
+
+        @Override
+        public StateSet build() {
+            if (names == null) {
+                throw new IllegalStateException("State names are required when building a StateSet.");
+            }
+            return new StateSet(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (591c16e6b22cd0145f4996d95ad1102ea430320fjK5  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xw  @@ -0,0 +1,158 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.core.datapoints.DataPoint;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
+
+import static java.lang.Boolean.FALSE;
+import static java.lang.Boolean.TRUE;
+
+/**
+ * There are two kinds of metrics:
+ * <ul>
+ *     <li>A {@code StatefulMetric} actively maintains its current values, e.g. a stateful counter actively stores its current count.</li>
+ *     <li>A {@code CallbackMetric} gets its values on demand when it is collected, e.g. a callback gauge representing the current heap size.</li>
+ * </ul>
+ * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
+ * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
+ * but this has nothing to do with multi-threading.
+ */
+abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
+
+    /**
+     * Map label values to data points.
+     */
+    private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
+
+    /**
+     * Shortcut for data.get(Collections.emptyList())
+     */
+    private volatile T noLabels;
+
+    protected StatefulMetric(Builder<?, ?> builder) {
+        super(builder);
+    }
+
+    /**
+     * labels and metricData have the same size. labels.get(i) are the labels for metricData.get(i).
+     */
+    protected abstract MetricSnapshot collect(List<Labels> labels, List<T> metricData);
+
+    public MetricSnapshot collect() {
+        if (labelNames.length == 0 && data.size() == 0) {
+            // This is a metric without labels that has not been used yet. Initialize the data on the fly.
+            withLabelValues();
+        }
+        List<Labels> labels = new ArrayList<>(data.size());
+        List<T> metricData = new ArrayList<>(data.size());
+        for (Map.Entry<List<String>, T> entry : data.entrySet()) {
+            String[] labelValues = entry.getKey().toArray(new String[labelNames.length]);
+            labels.add(constLabels.merge(labelNames, labelValues));
+            metricData.add(entry.getValue());
+        }
+        return collect(labels, metricData);
+    }
+
+    public D withLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            }
+        }
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
+    }
+
+    // TODO: Remove automatically if label values have not been used in a while?
+    public void remove(String... labelValues) {
+        data.remove(Arrays.asList(labelValues));
+    }
+
+    protected abstract T newDataPoint();
+
+    protected T getNoLabels() {
+        if (noLabels == null) {
+            // Note that this will throw an IllegalArgumentException if labelNames is not empty.
+            noLabels = (T) withLabelValues();
+        }
+        return noLabels;
+    }
+
+    protected MetricsProperties[] getMetricProperties(Builder builder, PrometheusProperties prometheusProperties) {
+        String metricName = getMetadata().getName();
+        if (prometheusProperties.getMetricProperties(metricName) != null) {
+            return new MetricsProperties[]{
+                    prometheusProperties.getMetricProperties(metricName), // highest precedence
+                    builder.toProperties(), // second-highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // third-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        } else {
+            return new MetricsProperties[]{
+                    builder.toProperties(), // highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // second-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        }
+    }
+
+    protected <T> T getConfigProperty(MetricsProperties[] properties, Function<MetricsProperties, T> getter) {
+        T result;
+        for (MetricsProperties props : properties) {
+            result = getter.apply(props);
+            if (result != null) {
+                return result;
+            }
+        }
+        throw new IllegalStateException("Missing default config. This is a bug in the Prometheus metrics core library.");
+    }
+
+    protected abstract boolean isExemplarsEnabled();
+
+    static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
+
+        protected Boolean exemplarsEnabled;
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties config) {
+            super(illegalLabelNames, config);
+        }
+
+        public B withExemplars() {
+            this.exemplarsEnabled = TRUE;
+            return self();
+        }
+
+        public B withoutExemplars() {
+            this.exemplarsEnabled = FALSE;
+            return self();
+        }
+
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .build();
+        }
+
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .build();
+        }
+    }
+}u}(j4  (d461162f149129f72af0f2b4224ed5b895ba6ac8jK5  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajM5  addedjE5  McjF5  K jO5  McjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xg6  @@ -0,0 +1,355 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Summary metric. Example:
+ * <pre>{@code
+ * Summary summary = Summary.newBuilder()
+ *         .withName("http_request_duration_seconds_hi")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .withQuantile(0.5, 0.01)
+ *         .withQuantile(0.95, 0.001)
+ *         .withQuantile(0.99, 0.001)
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // process a request, duration will be observed
+ * summary.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
+ * See {@link Summary.Builder} for configuration options.
+ */
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
+
+    private final List<CKMSQuantiles.Quantile> quantiles; // May be empty, but cannot be null.
+    private final long maxAgeSeconds;
+    private final int ageBuckets;
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Summary(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        this.exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        this.quantiles = Collections.unmodifiableList(makeQuantiles(properties));
+        this.maxAgeSeconds = getConfigProperty(properties, MetricsProperties::getSummaryMaxAgeSeconds);
+        this.ageBuckets = getConfigProperty(properties, MetricsProperties::getSummaryNumberOfAgeBuckets);
+        this.exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 4);
+    }
+
+    private List<CKMSQuantiles.Quantile> makeQuantiles(MetricsProperties[] properties) {
+        List<CKMSQuantiles.Quantile> result = new ArrayList<>();
+        List<Double> quantiles = getConfigProperty(properties, MetricsProperties::getSummaryQuantiles);
+        List<Double> quantileErrors = getConfigProperty(properties, MetricsProperties::getSummaryQuantileErrors);
+        if (quantiles != null) {
+            for (int i = 0; i < quantiles.size(); i++) {
+                if (quantileErrors.size() > 0) {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), quantileErrors.get(i)));
+                } else {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), Builder.defaultError(quantiles.get(i))));
+                }
+            }
+        }
+        return result;
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public SummarySnapshot collect() {
+        return (SummarySnapshot) super.collect();
+    }
+
+    @Override
+    protected SummarySnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<SummarySnapshot.SummaryDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new SummarySnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+
+    public class DataPoint implements DistributionDataPoint {
+
+        private final LongAdder count = new LongAdder();
+        private final DoubleAdder sum = new DoubleAdder();
+        private final SlidingWindow<CKMSQuantiles> quantileValues;
+        private final Buffer buffer = new Buffer();
+        private final ExemplarSampler exemplarSampler;
+
+        private final long createdTimeMillis = System.currentTimeMillis();
+
+        private DataPoint() {
+            if (quantiles.size() > 0) {
+                CKMSQuantiles.Quantile[] quantilesArray = quantiles.toArray(new CKMSQuantiles.Quantile[0]);
+                quantileValues = new SlidingWindow<>(CKMSQuantiles.class, () -> new CKMSQuantiles(quantilesArray), CKMSQuantiles::insert, maxAgeSeconds, ageBuckets);
+            } else {
+                quantileValues = null;
+            }
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observeWithExemplar(double value, Labels labels) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private void doObserve(double amount) {
+            sum.add(amount);
+            if (quantileValues != null) {
+                quantileValues.observe(amount);
+            }
+            // count must be incremented last, because in collect() the count
+            // indicates the number of completed observations.
+            count.increment();
+        }
+
+        private SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
+            return buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    // TODO Exemplars (are hard-coded as empty in the line below)
+                    () -> new SummarySnapshot.SummaryDataPointSnapshot(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
+                    this::doObserve
+            );
+        }
+
+        private List<CKMSQuantiles.Quantile> getQuantiles() {
+            return quantiles;
+        }
+
+        private Quantiles makeQuantiles() {
+            Quantile[] quantiles = new Quantile[getQuantiles().size()];
+            for (int i = 0; i < getQuantiles().size(); i++) {
+                CKMSQuantiles.Quantile quantile = getQuantiles().get(i);
+                quantiles[i] = new Quantile(quantile.quantile, quantileValues.current().get(quantile.quantile));
+            }
+            return Quantiles.of(quantiles);
+        }
+    }
+
+    public static Summary.Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Summary.Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Summary.Builder, Summary> {
+
+        /**
+         * 5 minutes. See {@link #withMaxAgeSeconds(long)}.
+         */
+        public static final long DEFAULT_MAX_AGE_SECONDS = TimeUnit.MINUTES.toSeconds(5);
+
+        /**
+         * 5. See {@link #withNumberOfAgeBuckets(int)}
+         */
+        public static final int DEFAULT_NUMBER_OF_AGE_BUCKETS = 5;
+        private final List<CKMSQuantiles.Quantile> quantiles = new ArrayList<>();
+        private Long maxAgeSeconds;
+        private Integer ageBuckets;
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
+        }
+
+        private static double defaultError(double quantile) {
+            if (quantile <= 0.01 || quantile >= 0.99) {
+                return 0.001;
+            } else if (quantile <= 0.02 || quantile >= 0.98) {
+                return 0.005;
+            } else {
+                return 0.01;
+            }
+        }
+
+        /**
+         * See {@link #withQuantile(double, double)}.
+         * <p>
+         * Default errors are:
+         * <ul>
+         *     <li>error = 0.001 if quantile &lt;= 0.01 or quantile &gt;= 0.99</li>
+         *     <li>error = 0.005 if quantile &lt;= 0.02 or quantile &gt;= 0.98</li>
+         *     <li>error = 0.01 else.
+         * </ul>
+         */
+        public Builder withQuantile(double quantile) {
+            return withQuantile(quantile, defaultError(quantile));
+        }
+
+        /**
+         * Example: The following will track the 0.95 quantile:
+         * <pre>{@code
+         * .withQuantile(0.95, 0.001)
+         * }</pre>
+         * The second argument is the acceptable error margin, i.e. with the code above the quantile
+         * will not be exactly the 0.95 quantile but something between 0.949 and 0.951.
+         * <p>
+         * There are two special cases:
+         * <ul>
+         *     <li>{@code .withQuantile(0.0, 0.0)} gives you the minimum observed value</li>
+         *     <li>{@code .withQuantile(1.0, 0.0)} gives you the maximum observed value</li>
+         * </ul>
+         */
+        public Builder withQuantile(double quantile, double error) {
+            if (quantile < 0.0 || quantile > 1.0) {
+                throw new IllegalArgumentException("Quantile " + quantile + " invalid: Expected number between 0.0 and 1.0.");
+            }
+            if (error < 0.0 || error > 1.0) {
+                throw new IllegalArgumentException("Error " + error + " invalid: Expected number between 0.0 and 1.0.");
+            }
+            quantiles.add(new CKMSQuantiles.Quantile(quantile, error));
+            return this;
+        }
+
+        /**
+         * The quantiles are relative to a moving time window.
+         * {@code maxAgeSeconds} is the size of that time window.
+         * Default is {@link #DEFAULT_MAX_AGE_SECONDS}.
+         */
+        public Builder withMaxAgeSeconds(long maxAgeSeconds) {
+            if (maxAgeSeconds <= 0) {
+                throw new IllegalArgumentException("maxAgeSeconds cannot be " + maxAgeSeconds);
+            }
+            this.maxAgeSeconds = maxAgeSeconds;
+            return this;
+        }
+
+        /**
+         * The quantiles are relative to a moving time window.
+         * The {@code numberOfAgeBuckets} defines how smoothly the time window moves forward.
+         * For example, if the time window is 5 minutes and has 5 age buckets,
+         * then it is moving forward every minute by one minute.
+         * Default is {@link #DEFAULT_NUMBER_OF_AGE_BUCKETS}.
+         */
+        public Builder withNumberOfAgeBuckets(int ageBuckets) {
+            if (ageBuckets <= 0) {
+                throw new IllegalArgumentException("ageBuckets cannot be " + ageBuckets);
+            }
+            this.ageBuckets = ageBuckets;
+            return this;
+        }
+
+        @Override
+        protected MetricsProperties toProperties() {
+            double[] quantiles = null;
+            double[] quantileErrors = null;
+            if (!this.quantiles.isEmpty()) {
+                quantiles = new double[this.quantiles.size()];
+                quantileErrors = new double[this.quantiles.size()];
+                for (int i = 0; i < this.quantiles.size(); i++) {
+                    quantiles[i] = this.quantiles.get(i).quantile;
+                    quantileErrors[i] = this.quantiles.get(i).epsilon;
+                }
+            }
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withSummaryQuantiles(quantiles)
+                    .withSummaryQuantileErrors(quantileErrors)
+                    .withSummaryNumberOfAgeBuckets(ageBuckets)
+                    .withSummaryMaxAgeSeconds(maxAgeSeconds)
+                    .build();
+        }
+
+        /**
+         * Default properties for summary metrics.
+         */
+        @Override
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withSummaryQuantiles()
+                    .withSummaryNumberOfAgeBuckets(DEFAULT_NUMBER_OF_AGE_BUCKETS)
+                    .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)
+                    .build();
+        }
+
+        @Override
+        public Summary build() {
+            return new Summary(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (c9bdcfdfe9d0a497adf1d44e909971dd5b2f301fjK5  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SummaryWithCallback.javajM5  addedjE5  K]jF5  K jO5  K]jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X$  @@ -0,0 +1,93 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * double MILLISECONDS_PER_SECOND = 1E3;
+ *
+ * SummaryWithCallback.newBuilder()
+ *         .withName("jvm_gc_collection_seconds")
+ *         .withHelp("Time spent in a given JVM garbage collector in seconds.")
+ *         .withUnit(Unit.SECONDS)
+ *         .withLabelNames("gc")
+ *         .withCallback(callback -> {
+ *             for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
+ *                 callback.call(
+ *                         gc.getCollectionCount(),
+ *                         gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
+ *                         Quantiles.EMPTY,
+ *                         gc.getName()
+ *                 );
+ *             }
+ *         })
+ *         .register();
+ * }</pre>
+ */
+public class SummaryWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(long count, double sum, Quantiles quantiles, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private SummaryWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public SummarySnapshot collect() {
+        List<SummarySnapshot.SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((count, sum, quantiles, labelValues) -> {
+            dataPoints.add(new SummarySnapshot.SummaryDataPointSnapshot(count, sum, quantiles, makeLabels(labelValues), Exemplars.EMPTY, 0L));
+        });
+        return new SummarySnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<SummaryWithCallback.Builder, SummaryWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
+        }
+
+        @Override
+        public SummaryWithCallback build() {
+            return new SummaryWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j4  (22780819e6adf7e63bae34f0a2a01aba5c9a3c1cjK5  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/util/Scheduler.javajM5  addedjE5  K%jF5  K jO5  K%jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XK  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.core.util;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Used for scheduling maintenance tasks like purging outdated Exemplars or resetting native histograms.
+ */
+public class Scheduler {
+
+    private static class DaemonThreadFactory implements ThreadFactory {
+        public Thread newThread(Runnable runnable) {
+            Thread thread = new Thread(runnable);
+            thread.setDaemon(true);
+            return thread;
+        }
+    }
+
+    private static final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
+
+    public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
+        return executor.schedule(command, delay, unit);
+    }
+
+    /**
+     * For unit test. Wait until the executor Thread is running.
+     */
+    public static void awaitInitialization() throws InterruptedException {
+        CountDownLatch latch = new CountDownLatch(1);
+        Scheduler.schedule(latch::countDown, 0, TimeUnit.MILLISECONDS);
+        latch.await();
+    }
+}u}(j4  (c20482e44fd4dbf031a75df60a851bb089bd8bfdjK5  mprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfigTestUtil.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,30 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+
+import java.lang.reflect.Field;
+
+public class ExemplarSamplerConfigTestUtil {
+
+    private static ExemplarSamplerConfig getConfig(Object metric, String fieldName) throws NoSuchFieldException, IllegalAccessException {
+        Field configField = metric.getClass().getDeclaredField(fieldName);
+        configField.setAccessible(true);
+        return (ExemplarSamplerConfig) configField.get(metric);
+    }
+
+    private static void setRetentionPeriod(ExemplarSamplerConfig config, String name, long value) throws IllegalAccessException, NoSuchFieldException {
+        Field field = config.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        field.set(config, value);
+    }
+
+    public static void setMinRetentionPeriodMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "minRetentionPeriodMillis", value);
+    }
+
+    public static void setSampleIntervalMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "sampleIntervalMillis", value);
+    }
+}u}(j4  (24882065e45e4858ab4effaa4916b86015ea8c9ejK5  cprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X$  @@ -0,0 +1,234 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.core.util.Scheduler;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ExemplarSamplerTest {
+
+    private final int tick = 10; // Time step in milliseconds. Make this larger if the test is flaky.
+    private final int sampleInterval = 10 * tick; // do not change this
+    private final int minAge = 50 * tick; // do not change this
+    private final int maxAge = 200 * tick; // do not change this
+
+    private ExemplarSamplerConfig makeConfig(double... buckets) {
+        return new ExemplarSamplerConfig(
+                minAge,
+                maxAge,
+                sampleInterval,
+                buckets.length == 0 ? 4 : buckets.length, // number of exemplars
+                buckets.length == 0 ? null : buckets
+        );
+    }
+
+
+    private static class SpanContext implements io.prometheus.metrics.tracer.common.SpanContext {
+
+        int callCount = 0;
+        boolean isSampled = true;
+        boolean isExemplar = false;
+
+        @Override
+        public String getCurrentTraceId() {
+            return "" + (callCount++);
+        }
+
+        @Override
+        public String getCurrentSpanId() {
+            return "" + callCount;
+        }
+
+        @Override
+        public boolean isCurrentSpanSampled() {
+            return isSampled;
+        }
+
+        @Override
+        public void markCurrentSpanAsExemplar() {
+            isExemplar = true;
+        }
+    }
+
+    @Test
+    public void testCustomExemplarsBuckets() throws Exception {
+        // TODO
+    }
+
+    private io.prometheus.metrics.tracer.common.SpanContext origContext;
+
+    @Before
+    public void setUp() {
+        origContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origContext);
+    }
+
+    @Test
+    public void testIsSampled() throws Exception {
+        SpanContext context = new SpanContext();
+        context.isSampled = false;
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3); // no sampled, because isSampled() returns false
+        assertExemplars(sampler); // empty
+    }
+
+    @Test
+    public void testDefaultConfigHasFourExemplars() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3);
+        Thread.sleep(sampleInterval + tick); // t = 12 tick
+        sampler.observe(0.8);
+        Thread.sleep(sampleInterval + tick); // t = 23 tick
+        sampler.observe(0.4);
+        Thread.sleep(sampleInterval + tick); // t = 34 tick
+        sampler.observe(0.6);
+        Thread.sleep(sampleInterval + tick); // t = 45 tick
+        sampler.observe(0.2); // not observed, we got 4 Exemplars already and non reached min age
+        assertExemplars(sampler, 0.3, 0.8, 0.4, 0.6);
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testEmptyBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(Double.POSITIVE_INFINITY));
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.8); // observed in the +Inf bucket
+        Thread.sleep(sampleInterval + tick); // t = 12 tick
+        sampler.observe(0.5); // not observed, because +Inf is the only bucket
+        assertExemplars(sampler, 0.8);
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testDefaultExemplarsBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(0.2, 0.4, 0.6, 0.8, 1.0, Double.POSITIVE_INFINITY));
+        Scheduler.awaitInitialization();
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3);
+        sampler.observe(0.5); // not observed, previous observation is less than sample interval ms ago
+        assertExemplars(sampler, 0.3);
+        Thread.sleep(sampleInterval + tick); // t = 12 ticks
+        sampler.observe(0.5); // observed
+        assertExemplars(sampler, 0.3, 0.5);
+        Thread.sleep(sampleInterval + tick); // t = 23 ticks
+        sampler.observe(0.4); // not observed, because 0.3 hasn't reached min age yet
+        assertExemplars(sampler, 0.3, 0.5);
+        Thread.sleep(sampleInterval + tick); // t = 34 ticks
+        sampler.observe(1.1); // observed
+        assertExemplars(sampler, 0.3, 0.5, 1.1);
+        Thread.sleep(20 * tick); // t = 54 ticks
+        assertExemplars(sampler, 0.3, 0.5, 1.1);
+        sampler.observe(0.4); // observed
+        assertExemplars(sampler, 0.4, 0.5, 1.1);
+        Thread.sleep(159 * tick); // t = 213 ticks
+        assertExemplars(sampler, 0.4, 1.1); // 0.5 evicted because it has reached max age
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testCustomExemplarsNoBuckets() throws Exception {
+        // TODO
+    }
+
+    @Test
+    public void testDefaultExemplarsNoBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Scheduler.awaitInitialization();
+        Thread.sleep(tick);           // t = 1 tick
+        sampler.observe(1);    // observed
+        assertExemplars(sampler, 1);
+        sampler.observe(2);    // not observed, previous observation is less than sample interval ms ago
+        Thread.sleep(sampleInterval + tick); // t = 12 ticks
+        sampler.observe(3);    // observed
+        assertExemplars(sampler, 1, 3);
+        Thread.sleep(2 * tick);    // t = 14 ticks
+        sampler.observe(4);    // not observed, previous observation is less than sample interval ms ago
+        Thread.sleep(sampleInterval + tick); // t = 25 ticks
+        sampler.observe(5);    // observed
+        assertExemplars(sampler, 1, 3, 5);
+        Thread.sleep(sampleInterval + tick); // t = 36 ticks
+        sampler.observe(6);    // observed
+        assertExemplars(sampler, 1, 3, 5, 6);
+        Thread.sleep(sampleInterval + tick);  // t = 47 ticks
+        sampler.observe(7);    // not observed, because no Exemplar has reached the minimum age yet
+        Thread.sleep(5 * tick); // t = 52 ticks
+        sampler.observe(2); // not observed. 1 is older than min age, but kept because it's the minimum
+        assertExemplars(sampler, 1, 3, 5, 6);
+        Thread.sleep(sampleInterval + tick); // t = 63 ticks
+        sampler.observe(2); // observed
+        assertExemplars(sampler, 1, 2, 5, 6);
+        Thread.sleep(27 * tick); // t = 90 ticks
+        sampler.observe(7); // observed, replaces 6 because 7 > 6 even though 5 is older
+        assertExemplars(sampler, 1, 2, 5, 7);
+        sampler.observe(8); // not observed, sample interval not done
+        assertExemplars(sampler, 1, 2, 5, 7);
+        Thread.sleep(sampleInterval + tick); // t = 101 ticks
+        sampler.observe(8); // observed
+        assertExemplars(sampler, 1, 2, 8, 7);
+        Thread.sleep(101 * tick); // t = 202 ticks
+        sampler.observe(5); // observed, replaces 1 because 1 reached the max age
+        assertExemplars(sampler, 5, 2, 8, 7);
+        print(sampler.collect());
+    }
+
+    private void assertExemplars(ExemplarSampler sampler, double... values) {
+        Exemplars exemplars = sampler.collect();
+        Assert.assertEquals(values.length, exemplars.size());
+        for (double value : values) {
+            boolean found = false;
+            for (Exemplar exemplar : exemplars) {
+                if (exemplar.getValue() == value) {
+                    found = true;
+                    break;
+                }
+            }
+            Assert.assertTrue(value + " not found", found);
+        }
+    }
+
+    private void print(Exemplars exemplars) {
+        System.out.print("[");
+        boolean farst = true;
+        for (Exemplar exemplar : exemplars) {
+            if (!farst) {
+                System.out.print(",");
+            }
+            farst = false;
+            System.out.print(exemplar.getValue() + "{");
+            boolean first = true;
+            for (Label label : exemplar.getLabels()) {
+                if (!first) {
+                    System.out.print(",");
+                }
+                System.out.print(label.getName() + "=" + label.getValue());
+                first = false;
+            }
+            if (!first) {
+                System.out.print(",");
+            }
+            System.out.print("age=" + (System.currentTimeMillis() - exemplar.getTimestampMillis()));
+            System.out.print("}");
+        }
+        System.out.println("]");
+    }
+}u}(j4  (0efa6ee4a3d203aa207aa48ea48c63f7416c9a43jK5  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajM5  addedjE5  M,jF5  K jO5  M,jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X71  @@ -0,0 +1,300 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import java.util.Iterator;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.rules.ExpectedException.none;
+
+public class CounterTest {
+
+    Counter noLabels;
+    Counter labels;
+    private static final long exemplarSampleIntervalMillis = 10;
+    private static final long exemplarMinAgeMillis = 100;
+    SpanContext origSpanContext;
+
+    @Rule
+    public final ExpectedException thrown = none();
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        noLabels = Counter.newBuilder().withName("nolabels").build();
+        labels = Counter.newBuilder().withName("labels")
+                .withHelp("help")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("l")
+                .build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(noLabels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(noLabels, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(labels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(labels, exemplarMinAgeMillis);
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    private CounterSnapshot.CounterDataPointSnapshot getData(Counter counter, String... labels) {
+        return counter.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("counter with labels " + labels + " not found"));
+    }
+
+    private double getValue(Counter counter, String... labels) {
+        return getData(counter, labels).getValue();
+    }
+
+
+    private int getNumberOfLabels(Counter counter) {
+        return ((CounterSnapshot) counter.collect()).getData().size();
+    }
+
+    @Test
+    public void testIncrement() {
+        noLabels.inc();
+        assertEquals(1.0, getValue(noLabels), .001);
+        noLabels.inc(2);
+        assertEquals(3.0, getValue(noLabels), .001);
+        noLabels.withLabelValues().inc(4);
+        assertEquals(7.0, getValue(noLabels), .001);
+        noLabels.withLabelValues().inc();
+        assertEquals(8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testNegativeIncrementFails() {
+        thrown.expect(IllegalArgumentException.class);
+        thrown.expectMessage("Negative increment -1 is illegal for Counter metrics.");
+        noLabels.inc(-1);
+    }
+
+    @Test
+    public void testEmptyCountersHaveNoLabels() {
+        assertEquals(1, getNumberOfLabels(noLabels));
+        assertEquals(0, getNumberOfLabels(labels));
+    }
+
+    @Test
+    public void testLabels() {
+        assertEquals(0, getNumberOfLabels(labels));
+        labels.withLabelValues("a").inc();
+        assertEquals(1, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        labels.withLabelValues("b").inc(3);
+        assertEquals(2, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        assertEquals(3.0, getValue(labels, "l", "b"), .001);
+    }
+
+    @Test
+    public void testTotalStrippedFromName() {
+        Counter counter = Counter.newBuilder()
+                .withName("my_counter_total")
+                .withUnit(Unit.SECONDS)
+                .build();
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+
+        counter = Counter.newBuilder()
+                .withName("my_counter")
+                .build();
+        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+    }
+
+    @Test
+    public void testSnapshotComplete() {
+        long before = System.currentTimeMillis();
+        Counter counter = Counter.newBuilder()
+                .withName("test_seconds_total")
+                .withUnit(Unit.SECONDS)
+                .withHelp("help message")
+                .withConstLabels(Labels.of("const1name", "const1value", "const2name", "const2value"))
+                .withLabelNames("path", "status")
+                .build();
+        counter.withLabelValues("/", "200").inc(2);
+        counter.withLabelValues("/", "500").inc();
+        CounterSnapshot snapshot = (CounterSnapshot) counter.collect();
+        Assert.assertEquals("test_seconds", snapshot.getMetadata().getName());
+        Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
+        Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
+        Assert.assertEquals(2, snapshot.getData().size());
+        Iterator<CounterSnapshot.CounterDataPointSnapshot> iter = snapshot.getData().iterator();
+        // data is ordered by labels, so 200 comes before 500
+        CounterSnapshot.CounterDataPointSnapshot data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
+        Assert.assertEquals(2, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+        // 500
+        data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "500"), data.getLabels());
+        Assert.assertEquals(1, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+    }
+
+    @Test
+    public void testIncWithExemplar() throws Exception {
+        noLabels.incWithExemplar(Labels.of("key", "value"));
+        assertExemplar(noLabels, 1.0, "key", "value");
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(Labels.EMPTY);
+        assertExemplar(noLabels, 1.0);
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(3, Labels.of("key1", "value1", "key2", "value2"));
+        assertExemplar(noLabels, 3, "key1", "value1", "key2", "value2");
+    }
+
+    private void assertExemplar(Counter counter, double value, String... labels) {
+        Exemplar exemplar = getData(counter).getExemplar();
+        Assert.assertEquals(value, exemplar.getValue(), 0.0001);
+        assertEquals(Labels.of(labels), exemplar.getLabels());
+    }
+
+    @Test
+    public void testExemplarSampler() throws Exception {
+        final Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(2.0)
+                .withTraceId("abc")
+                .withSpanId("123")
+                .build();
+        final Exemplar exemplar2 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("def")
+                .withSpanId("456")
+                .build();
+        final Exemplar exemplar3 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("123")
+                .withSpanId("abc")
+                .build();
+        final Exemplar customExemplar = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("bab")
+                .withSpanId("cdc")
+                .withLabels(Labels.of("test", "test"))
+                .build();
+        SpanContext spanContext = new SpanContext() {
+            private int callNumber = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                switch (callNumber) {
+                    case 1:
+                        return "abc";
+                    case 3:
+                        return "def";
+                    case 4:
+                        return "123";
+                    case 5:
+                        return "bab";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                switch (callNumber) {
+                    case 1:
+                        return "123";
+                    case 3:
+                        return "456";
+                    case 4:
+                        return "abc";
+                    case 5:
+                        return "cdc";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callNumber++;
+                if (callNumber == 2) {
+                    return false;
+                }
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Counter counter = Counter.newBuilder()
+                .withName("count_total")
+                .build();
+
+        SpanContextSupplier.setSpanContext(spanContext);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(counter, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(counter, exemplarSampleIntervalMillis);
+
+        counter.inc(2.0);
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar2, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar3, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
+        assertExemplarEquals(customExemplar, getData(counter).getExemplar());
+    }
+
+    @Test
+    public void testExemplarSamplerDisabled() {
+        Counter counter = Counter.newBuilder()
+                //.withExemplarSampler((inc, prev) -> {throw new RuntimeException("unexpected call to exemplar sampler");})
+                .withName("count_total")
+                .withoutExemplars()
+                .build();
+        counter.incWithExemplar(3.0, Labels.of("a", "b"));
+        Assert.assertNull(getData(counter).getExemplar());
+        counter.inc(2.0);
+        Assert.assertNull(getData(counter).getExemplar());
+    }
+}u$      }(j4  (4c437281ec73d4eac29e975d8eb7535918ff37d0jK5  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,222 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.datapoints.Timer;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+
+public class GaugeTest {
+
+    private static final long exemplarSampleIntervalMillis = 10;
+    private static final long exemplarMinAgeMillis = 100;
+
+    private Gauge noLabels, labels;
+
+    private SpanContext origSpanContext;
+
+    @Before
+    public void setUp() {
+        noLabels = Gauge.newBuilder().withName("nolabels").build();
+        labels = Gauge.newBuilder().withName("labels").withLabelNames("l").build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    private GaugeSnapshot.GaugeDataPointSnapshot getData(Gauge gauge, String... labels) {
+        return ((GaugeSnapshot) gauge.collect()).getData().stream()
+                .filter(data -> data.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(RuntimeException::new);
+    }
+
+    private double getValue(Gauge gauge, String... labels) {
+        return getData(gauge, labels).getValue();
+    }
+
+    @Test
+    public void testIncrement() {
+        noLabels.inc();
+        assertEquals(1.0, getValue(noLabels), .001);
+        noLabels.inc(2);
+        assertEquals(3.0, getValue(noLabels), .001);
+        noLabels.inc(4);
+        assertEquals(7.0, getValue(noLabels), .001);
+        noLabels.inc();
+        assertEquals(8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testDecrement() {
+        noLabels.dec();
+        assertEquals(-1.0, getValue(noLabels), .001);
+        noLabels.dec(2);
+        assertEquals(-3.0, getValue(noLabels), .001);
+        noLabels.dec(4);
+        assertEquals(-7.0, getValue(noLabels), .001);
+        noLabels.dec();
+        assertEquals(-8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testSet() {
+        noLabels.set(42);
+        assertEquals(42, getValue(noLabels), .001);
+        noLabels.set(7);
+        assertEquals(7.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testTimer() throws InterruptedException {
+        try (Timer timer = noLabels.startTimer()) {
+            Thread.sleep(12);
+        }
+        assertEquals(0.012, getValue(noLabels), 0.005); // 5ms delta should be enough so this isn't flaky
+    }
+
+    @Test
+    public void noLabelsDefaultZeroValue() {
+        assertEquals(0.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testLabels() {
+        labels.withLabelValues("a").inc();
+        labels.withLabelValues("b").inc(3);
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        assertEquals(3.0, getValue(labels, "l", "b"), .001);
+    }
+
+    @Test
+    public void testExemplarSampler() throws Exception {
+        final Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(2.0)
+                .withTraceId("abc")
+                .withSpanId("123")
+                .build();
+        final Exemplar exemplar2 = Exemplar.newBuilder()
+                .withValue(6.5)
+                .withTraceId("def")
+                .withSpanId("456")
+                .build();
+        final Exemplar exemplar3 = Exemplar.newBuilder()
+                .withValue(7.0)
+                .withTraceId("123")
+                .withSpanId("abc")
+                .build();
+        final Exemplar customExemplar = Exemplar.newBuilder()
+                .withValue(8.0)
+                .withTraceId("bab")
+                .withSpanId("cdc")
+                .withLabels(Labels.of("test", "test"))
+                .build();
+        SpanContext spanContext = new SpanContext() {
+            private int callNumber = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                switch (callNumber) {
+                    case 1:
+                        return "abc";
+                    case 3:
+                        return "def";
+                    case 4:
+                        return "123";
+                    case 5:
+                        return "bab";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                switch (callNumber) {
+                    case 1:
+                        return "123";
+                    case 3:
+                        return "456";
+                    case 4:
+                        return "abc";
+                    case 5:
+                        return "cdc";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callNumber++;
+                if (callNumber == 2) {
+                    return false;
+                }
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Gauge gauge = Gauge.newBuilder()
+                .withName("my_gauge")
+                .build();
+
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(gauge, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(gauge, exemplarSampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        gauge.inc(2.0);
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        gauge.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.dec(0.5); // sampled
+        assertExemplarEquals(exemplar2, getData(gauge).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        gauge.set(7.0); // sampled
+        assertExemplarEquals(exemplar3, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
+        assertExemplarEquals(customExemplar, getData(gauge).getExemplar());
+    }
+
+    @Test
+    public void testExemplarSamplerDisabled() {
+        Gauge gauge = Gauge.newBuilder()
+                .withName("test")
+                .withoutExemplars()
+                .build();
+        gauge.setWithExemplar(3.0, Labels.of("a", "b"));
+        Assert.assertNull(getData(gauge).getExemplar());
+        gauge.inc(2.0);
+        Assert.assertNull(getData(gauge).getExemplar());
+    }
+}u}(j4  (393e2c876c0c08a41b6c11231a31214ecc6b981bjK5  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajM5  addedjE5  MjF5  K jO5  MjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XR @@ -0,0 +1,1306 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.Collectors;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+public class HistogramTest {
+
+    private static final double RESET_DURATION_REACHED = -123.456; // just a random value indicating that we should simulate that the reset duration has been reached
+
+    private SpanContext origSpanContext;
+
+    @Before
+    public void setUp() {
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    /**
+     * Mimic the tests in client_golang.
+     */
+    private static class GolangTestCase {
+        final String name;
+        final String expected;
+        final Histogram histogram;
+        final double[] observations;
+
+        private GolangTestCase(String name, String expected, Histogram histogram, double... observations) {
+            this.name = name;
+            this.expected = expected;
+            this.histogram = histogram;
+            this.observations = observations;
+        }
+
+        private void run() throws NoSuchFieldException, IllegalAccessException {
+            System.out.println("Running " + name + "...");
+            for (double observation : observations) {
+                if (observation == RESET_DURATION_REACHED) {
+                    Field resetAllowed = Histogram.DataPoint.class.getDeclaredField("resetDurationExpired");
+                    resetAllowed.setAccessible(true);
+                    resetAllowed.set(histogram.getNoLabels(), true);
+                } else {
+                    histogram.observe(observation);
+                }
+            }
+            Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(histogram.collect());
+            String expectedWithMetadata = "name: \"test\" type: HISTOGRAM metric { histogram { " + expected + " } }";
+            assertEquals("test \"" + name + "\" failed", expectedWithMetadata, TextFormat.printer().shortDebugString(protobufData));
+        }
+    }
+
+    /**
+     * Test cases copied from histogram_test.go in client_golang.
+     */
+    @Test
+    public void testGolangTests() throws NoSuchFieldException, IllegalAccessException {
+        GolangTestCase[] testCases = new GolangTestCase[]{
+                new GolangTestCase("'no sparse buckets' from client_golang",
+                        "sample_count: 3 " +
+                                "sample_sum: 6.0 " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.005 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.01 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.025 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.05 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.1 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.25 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.5 } " +
+                                "bucket { cumulative_count: 1 upper_bound: 1.0 } " +
+                                "bucket { cumulative_count: 2 upper_bound: 2.5 } " +
+                                "bucket { cumulative_count: 3 upper_bound: 5.0 } " +
+                                "bucket { cumulative_count: 3 upper_bound: 10.0 } " +
+                                "bucket { cumulative_count: 3 upper_bound: Infinity }",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .classicOnly()
+                                .build(),
+                        1.0, 2.0, 3.0),
+                new GolangTestCase("'factor 1.1 results in schema 3' from client_golang",
+                        "sample_count: 4 " +
+                                "sample_sum: 6.0 " +
+                                "schema: 3 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 1 } " +
+                                "positive_span { offset: 7 length: 1 } " +
+                                "positive_span { offset: 4 length: 1 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(3)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0, 1.0, 2.0, 3.0),
+                new GolangTestCase("'factor 1.2 results in schema 2' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: 7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2),
+                new GolangTestCase("'factor 4 results in schema -1' from client_golang",
+                        "sample_count: 14 " +
+                                "sample_sum: 63.2581251 " +
+                                "schema: -1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: -2 length: 6 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: -2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(-1)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0156251, 0.0625, // Bucket -2: (0.015625, 0.0625)
+                        0.1, 0.25, // Bucket -1: (0.0625, 0.25]
+                        0.5, 1, // Bucket 0: (0.25, 1]
+                        1.5, 2, 3, 3.5, // Bucket 1: (1, 4]
+                        5, 6, 7, // Bucket 2: (4, 16]
+                        33.33 // Bucket 3: (16, 64]
+                ),
+                new GolangTestCase("'factor 17 results in schema -2' from client_golang",
+                        "sample_count: 14 " +
+                                "sample_sum: 63.2581251 " +
+                                "schema: -2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: -1 length: 4 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 3 " +
+                                "positive_delta: -6",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(-2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0156251, 0.0625, // Bucket -1: (0.015625, 0.0625]
+                        0.1, 0.25, 0.5, 1, // Bucket 0: (0.0625, 1]
+                        1.5, 2, 3, 3.5, 5, 6, 7, // Bucket 1: (1, 16]
+                        33.33 // Bucket 2: (16, 256]
+                ),
+                new GolangTestCase("'negative buckets' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: -7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2
+                ),
+                new GolangTestCase("'negative and positive buckets' from client_golang",
+                        "sample_count: 11 " +
+                                "sample_sum: 0.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2, 1, 1.2, 1.4, 1.8, 2
+                ),
+                new GolangTestCase("'wide zero bucket' from client_golang",
+                        "sample_count: 11 " +
+                                "sample_sum: 0.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.4 " +
+                                "zero_count: 7 " +
+                                "negative_span { offset: 4 length: 1 } " +
+                                "negative_delta: 2 " +
+                                "positive_span { offset: 4 length: 1 } " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMinZeroThreshold(1.4)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2, 1, 1.2, 1.4, 1.8, 2
+                ),
+                /*
+                // See https://github.com/prometheus/client_golang/issues/1275
+                new TestCase("'NaN observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: NaN " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .asNativeHistogram()
+                                .withNativeSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.NaN
+                ),
+                */
+                new GolangTestCase("'+Inf observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: Infinity " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_span { offset: 4092 length: 1 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.POSITIVE_INFINITY
+                ),
+                new GolangTestCase("'-Inf observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: -Infinity " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 4097 length: 1 } " +
+                                "negative_delta: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.NEGATIVE_INFINITY
+                ),
+                new GolangTestCase("'limited buckets but nothing triggered' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: 7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2
+                ),
+                new GolangTestCase("'buckets limited by halving resolution' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: 11.5 " +
+                                "schema: 1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3
+                ),
+                new GolangTestCase("'buckets limited by widening the zero bucket' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: 11.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.0 " +
+                                "zero_count: 2 " +
+                                "positive_span { offset: 1 length: 7 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3
+                ),
+                new GolangTestCase("'buckets limited by widening the zero bucket twice' from client_golang",
+                        "sample_count: 9 " +
+                                "sample_sum: 15.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.189207115002721 " +
+                                "zero_count: 3 " +
+                                "positive_span { offset: 2 length: 7 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3, 4),
+                new GolangTestCase("'buckets limited by reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMinZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, RESET_DURATION_REACHED, 3, 4),
+                new GolangTestCase("'limited buckets but nothing triggered, negative observations' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: -7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2),
+                new GolangTestCase("'buckets limited by halving resolution, negative observations' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: -11.5 " +
+                                "schema: 1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3),
+                new GolangTestCase("'buckets limited by widening the zero bucket, negative observations' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: -11.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.0 " +
+                                "zero_count: 2 " +
+                                "negative_span { offset: 1 length: 7 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 0 " +
+                                "negative_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3),
+                new GolangTestCase("'buckets limited by widening the zero bucket twice, negative observations' from client_golang",
+                        "sample_count: 9 " +
+                                "sample_sum: -15.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.189207115002721 " +
+                                "zero_count: 3 " +
+                                "negative_span { offset: 2 length: 7 } " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 0 " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3, -4),
+                new GolangTestCase("'buckets limited by reset, negative observations' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: -7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 2.9387358770557188E-39 " +
+                                "zero_count: 0 " +
+                                "negative_span { offset: 7 length: 2 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, RESET_DURATION_REACHED, -3, -4),
+                new GolangTestCase("'buckets limited by halving resolution, then reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 5, 5.1, RESET_DURATION_REACHED, 3, 4),
+                new GolangTestCase("'buckets limited by widening the zero bucket, then reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 2.9387358770557188E-39 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 5, 5.1, RESET_DURATION_REACHED, 3, 4)
+        };
+        for (GolangTestCase testCase : testCases) {
+            testCase.run();
+        }
+    }
+
+    /**
+     * Additional tests that are not part of client_golang's test suite.
+     */
+    @Test
+    public void testAdditional() throws NoSuchFieldException, IllegalAccessException {
+        GolangTestCase[] testCases = new GolangTestCase[]{
+                new GolangTestCase("observed values are exactly at bucket boundaries",
+                        "sample_count: 3 " +
+                                "sample_sum: 1.5 " +
+                                "schema: 0 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: -1 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(0)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0, 0.5, 1.0)
+        };
+        for (GolangTestCase testCase : testCases) {
+            testCase.run();
+        }
+    }
+
+    /**
+     * Tests HistogramData.nativeBucketIndexToUpperBound(int, int).
+     * <p>
+     * This test is ported from client_golang's TestGetLe().
+     */
+    @Test
+    public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
+        int[] indexes = new int[]{-1, 0, 1, 512, 513, -1, 0, 1, 1024, 1025, -1, 0, 1, 4096, 4097};
+        int[] schemas = new int[]{-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2};
+        double[] expectedUpperBounds = new double[]{0.25, 1, 4, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
+                0.5, 1, 2, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
+                0.8408964152537144, 1, 1.189207115002721, Double.MAX_VALUE, Double.POSITIVE_INFINITY};
+        Method method = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        method.setAccessible(true);
+        for (int i = 0; i < indexes.length; i++) {
+            Histogram histogram = Histogram.newBuilder()
+                    .withName("test")
+                    .withNativeInitialSchema(schemas[i])
+                    .build();
+            Histogram.DataPoint histogramData = histogram.newDataPoint();
+            double result = (double) method.invoke(histogramData, schemas[i], indexes[i]);
+            Assert.assertEquals("index=" + indexes[i] + ", schema=" + schemas[i], expectedUpperBounds[i], result, 0.0000000000001);
+        }
+    }
+
+    /**
+     * Test if lowerBound < value <= upperBound is true for the bucket index returned by findBucketIndex()
+     */
+    @Test
+    public void testFindBucketIndex() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
+        Random rand = new Random();
+        Method findBucketIndex = Histogram.DataPoint.class.getDeclaredMethod("findBucketIndex", double.class);
+        Method nativeBucketIndexToUpperBound = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        findBucketIndex.setAccessible(true);
+        nativeBucketIndexToUpperBound.setAccessible(true);
+        for (int schema = -4; schema <= 8; schema++) {
+            Histogram histogram = Histogram.newBuilder()
+                    .nativeOnly()
+                    .withName("test")
+                    .withNativeInitialSchema(schema)
+                    .build();
+            for (int i = 0; i < 10_000; i++) {
+                for (int zeros = -5; zeros <= 10; zeros++) {
+                    double value = rand.nextDouble() * Math.pow(10, zeros);
+                    int bucketIndex = (int) findBucketIndex.invoke(histogram.getNoLabels(), value);
+                    double lowerBound = (double) nativeBucketIndexToUpperBound.invoke(histogram.getNoLabels(), schema, bucketIndex - 1);
+                    double upperBound = (double) nativeBucketIndexToUpperBound.invoke(histogram.getNoLabels(), schema, bucketIndex);
+                    Assert.assertTrue("Bucket index " + bucketIndex + " with schema " + schema + " has range [" + lowerBound + ", " + upperBound + "]. Value " + value + " is outside of that range.", lowerBound < value && upperBound >= value);
+                }
+            }
+        }
+    }
+
+    @Test
+    public void testDefaults() throws IOException {
+        Histogram histogram = Histogram.newBuilder().withName("test").build();
+        histogram.observe(0.5);
+        HistogramSnapshot snapshot = histogram.collect();
+        String expectedNative = "" +
+                "name: \"test\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                "histogram { " +
+                "sample_count: 1 " +
+                "sample_sum: 0.5 " +
+                // default native schema is 5
+                "schema: 5 " +
+                // default zero threshold is 2^-128
+                "zero_threshold: " + Math.pow(2.0, -128.0) + " " +
+                "zero_count: 0 " +
+                "positive_span { offset: -32 length: 1 } " +
+                "positive_delta: 1 " +
+                "} }";
+        String expectedClassic = "" +
+                // default classic buckets
+                "# TYPE test histogram\n" +
+                "test_bucket{le=\"0.005\"} 0\n" +
+                "test_bucket{le=\"0.01\"} 0\n" +
+                "test_bucket{le=\"0.025\"} 0\n" +
+                "test_bucket{le=\"0.05\"} 0\n" +
+                "test_bucket{le=\"0.1\"} 0\n" +
+                "test_bucket{le=\"0.25\"} 0\n" +
+                "test_bucket{le=\"0.5\"} 1\n" +
+                "test_bucket{le=\"1.0\"} 1\n" +
+                "test_bucket{le=\"2.5\"} 1\n" +
+                "test_bucket{le=\"5.0\"} 1\n" +
+                "test_bucket{le=\"10.0\"} 1\n" +
+                "test_bucket{le=\"+Inf\"} 1\n" +
+                "test_count 1\n" +
+                "test_sum 0.5\n" +
+                "# EOF\n";
+
+        // protobuf
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(snapshot);
+        Assert.assertEquals(expectedNative, TextFormat.printer().shortDebugString(protobufData));
+
+        // text
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expectedClassic, out.toString());
+    }
+
+    @Test
+    public void testExemplarsClassicHistogram() throws Exception {
+        SpanContext spanContext = new SpanContext() {
+            int callCount = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                return "traceId-" + callCount;
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                return "spanId-" + callCount;
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callCount++;
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                // The default number of Exemplars is 4.
+                // Use 5 buckets to verify that the exemplar sample is configured with the buckets.
+                .withClassicBuckets(1.0, 2.0, 3.0, 4.0, Double.POSITIVE_INFINITY)
+                .withLabelNames("path")
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        Exemplar ex1a = Exemplar.newBuilder()
+                .withValue(0.5)
+                .withSpanId("spanId-1")
+                .withTraceId("traceId-1")
+                .build();
+        Exemplar ex1b = Exemplar.newBuilder()
+                .withValue(0.5)
+                .withSpanId("spanId-2")
+                .withTraceId("traceId-2")
+                .build();
+        Exemplar ex2a = Exemplar.newBuilder()
+                .withValue(4.5)
+                .withSpanId("spanId-3")
+                .withTraceId("traceId-3")
+                .build();
+        Exemplar ex2b = Exemplar.newBuilder()
+                .withValue(4.5)
+                .withSpanId("spanId-4")
+                .withTraceId("traceId-4")
+                .build();
+        Exemplar ex3a = Exemplar.newBuilder()
+                .withValue(1.5)
+                .withSpanId("spanId-5")
+                .withTraceId("traceId-5")
+                .build();
+        Exemplar ex3b = Exemplar.newBuilder()
+                .withValue(1.5)
+                .withSpanId("spanId-6")
+                .withTraceId("traceId-6")
+                .build();
+        Exemplar ex4a = Exemplar.newBuilder()
+                .withValue(2.5)
+                .withSpanId("spanId-7")
+                .withTraceId("traceId-7")
+                .build();
+        Exemplar ex4b = Exemplar.newBuilder()
+                .withValue(2.5)
+                .withSpanId("spanId-8")
+                .withTraceId("traceId-8")
+                .build();
+        Exemplar ex5a = Exemplar.newBuilder()
+                .withValue(3.5)
+                .withSpanId("spanId-9")
+                .withTraceId("traceId-9")
+                .build();
+        Exemplar ex5b = Exemplar.newBuilder()
+                .withValue(3.5)
+                .withSpanId("spanId-10")
+                .withTraceId("traceId-10")
+                .build();
+        histogram.withLabelValues("/hello").observe(0.5);
+        histogram.withLabelValues("/world").observe(0.5); // different labels are tracked independently, i.e. we don't need to wait for sampleIntervalMillis
+
+        HistogramSnapshot snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertNull(getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(4.5);
+        histogram.withLabelValues("/world").observe(4.5);
+
+        snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/world"));
+        assertExemplarEquals(ex2a, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertExemplarEquals(ex2b, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(1.5);
+        histogram.withLabelValues("/world").observe(1.5);
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(2.5);
+        histogram.withLabelValues("/world").observe(2.5);
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(3.5);
+        histogram.withLabelValues("/world").observe(3.5);
+
+        snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertExemplarEquals(ex3a, getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertExemplarEquals(ex3b, getExemplar(snapshot, 2.0, "path", "/world"));
+        assertExemplarEquals(ex4a, getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertExemplarEquals(ex4b, getExemplar(snapshot, 3.0, "path", "/world"));
+        assertExemplarEquals(ex5a, getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertExemplarEquals(ex5b, getExemplar(snapshot, 4.0, "path", "/world"));
+        assertExemplarEquals(ex2a, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertExemplarEquals(ex2b, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Exemplar custom = Exemplar.newBuilder()
+                .withValue(3.4)
+                .withLabels(Labels.of("key2", "value2", "key1", "value1", "trace_id", "traceId-11", "span_id", "spanId-11"))
+                .build();
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observeWithExemplar(3.4, Labels.of("key1", "value1", "key2", "value2"));
+        snapshot = histogram.collect();
+        // custom exemplars have preference, so the automatic exemplar is replaced
+        assertExemplarEquals(custom, getExemplar(snapshot, 4.0, "path", "/hello"));
+    }
+
+    private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... labels) {
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findFirst()
+                .orElseThrow(() -> new RuntimeException("Labels not found"));
+        double lowerBound = Double.NEGATIVE_INFINITY;
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            if (bucket.getUpperBound() == le) {
+                break;
+            } else {
+                lowerBound = bucket.getUpperBound();
+            }
+        }
+        return data.getExemplars().get(lowerBound, le);
+    }
+
+    @Test
+    public void testCustomExemplarsClassicHistogram() throws InterruptedException, NoSuchFieldException, IllegalAccessException {
+
+        // TODO: This was copied from the old simpleclient, can probably be refactored.
+
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withExemplars()
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(histogram, 3 * sampleIntervalMillis);
+
+        Labels labels = Labels.of("mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        histogram.observeWithExemplar(0.5, Labels.of("key", "value"));
+        assertExemplar(histogram, 0.5, "key", "value");
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.5, Labels.EMPTY);
+        assertExemplar(histogram, 0.5);
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.5, labels);
+        assertExemplar(histogram, 0.5, "mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        // default buckets are {.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(2.0, Labels.of("key1", "value1", "key2", "value2"));
+        assertExemplar(histogram, 2.0, "key1", "value1", "key2", "value2");
+        assertExemplar(histogram, 0.5, "mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.4, Labels.EMPTY); // same bucket as 0.5
+        assertExemplar(histogram, 0.4);
+        assertExemplar(histogram, 2.0, "key1", "value1", "key2", "value2");
+    }
+
+    private void assertExemplar(Histogram histogram, double value, String... labels) {
+        double lowerBound = Double.NEGATIVE_INFINITY;
+        double upperBound = Double.POSITIVE_INFINITY;
+        HistogramSnapshot snapshot = histogram.collect();
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
+                .filter(d -> d.getLabels().isEmpty())
+                .findFirst()
+                .orElseThrow(() -> new RuntimeException("No data without labels found"));
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            if (bucket.getUpperBound() >= value) {
+                upperBound = bucket.getUpperBound();
+                break;
+            } else {
+                lowerBound = bucket.getUpperBound();
+            }
+        }
+        Exemplar exemplar = data.getExemplars().get(lowerBound, upperBound);
+        Assert.assertNotNull("No exemplar found in bucket [" + lowerBound + ", " + upperBound + "]", exemplar);
+        Assert.assertEquals(value, exemplar.getValue(), 0.0);
+        Assert.assertEquals("" + exemplar.getLabels(), labels.length / 2, exemplar.getLabels().size());
+        for (int i = 0; i < labels.length; i += 2) {
+            Assert.assertEquals(labels[i], exemplar.getLabels().getName(i / 2));
+            Assert.assertEquals(labels[i + 1], exemplar.getLabels().getValue(i / 2));
+        }
+    }
+
+
+    @Test
+    public void testExemplarsNativeHistogram() throws NoSuchFieldException, IllegalAccessException {
+
+        SpanContext spanContext = new SpanContext() {
+            int callCount = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                return "traceId-" + callCount;
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                return "spanId-" + callCount;
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callCount++;
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .nativeOnly()
+                .withLabelNames("path")
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        Exemplar ex1 = Exemplar.newBuilder()
+                .withValue(3.11)
+                .withSpanId("spanId-1")
+                .withTraceId("traceId-1")
+                .build();
+        Exemplar ex2 = Exemplar.newBuilder()
+                .withValue(3.12)
+                .withSpanId("spanId-2")
+                .withTraceId("traceId-2")
+                .build();
+        Exemplar ex3 = Exemplar.newBuilder()
+                .withValue(3.13)
+                .withSpanId("spanId-3")
+                .withTraceId("traceId-3")
+                .withLabels(Labels.of("key1", "value1", "key2", "value2"))
+                .build();
+
+        histogram.withLabelValues("/hello").observe(3.11);
+        histogram.withLabelValues("/world").observe(3.12);
+        assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
+        assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
+        assertEquals(1, getData(histogram, "path", "/world").getExemplars().size());
+        assertExemplarEquals(ex2, getData(histogram, "path", "/world").getExemplars().iterator().next());
+
+        histogram.withLabelValues("/world").observeWithExemplar(3.13, Labels.of("key1", "value1", "key2", "value2"));
+        assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
+        assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
+        assertEquals(2, getData(histogram, "path", "/world").getExemplars().size());
+        Exemplars exemplars = getData(histogram, "path", "/world").getExemplars();
+        List<Exemplar> exemplarList = new ArrayList<>(exemplars.size());
+        for (Exemplar exemplar : exemplars) {
+            exemplarList.add(exemplar);
+        }
+        exemplarList.sort(Comparator.comparingDouble(Exemplar::getValue));
+        assertEquals(2, exemplars.size());
+        assertExemplarEquals(ex2, exemplarList.get(0));
+        assertExemplarEquals(ex3, exemplarList.get(1));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelName() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("label", "le");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNameConstLabels() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withConstLabels(Labels.of("label1", "value1", "le", "0.3"));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNamePrefix() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("__hello");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNameDot() {
+        // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid.
+        // The reason is that you cannot use illegal label names in the Prometheus query language.
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("http.status");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalName() {
+        Histogram.newBuilder()
+                .withName("server.durations");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNoName() {
+        Histogram.newBuilder().build();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void testNullName() {
+        Histogram.newBuilder()
+                .withName(null);
+    }
+
+    @Test
+    public void testDuplicateClassicBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0, 3, 17, 3, 21)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.0, 3.0, 17.0, 21.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testUnsortedBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.2, 0.1)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.1, 0.2, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testEmptyBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets()
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Collections.singletonList(Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testBucketsIncludePositiveInfinity() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.01, 0.1, 1.0, Double.POSITIVE_INFINITY)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.01, 0.1, 1.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testLinearBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicLinearBuckets(0.1, 0.1, 10)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testExponentialBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withClassicExponentialBuckets(2, 2.5, 3)
+                .withName("test")
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        assertEquals(Arrays.asList(2.0, 5.0, 12.5, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testBucketsIncludeNaN() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.01, 0.1, 1.0, Double.NaN);
+    }
+
+    @Test
+    public void testNoLabelsDefaultZeroValue() {
+        Histogram noLabels = Histogram.newBuilder().withName("test").build();
+        assertEquals(0.0, getBucket(noLabels, 0.005).getCount(), 0.0);
+        assertEquals(0, getData(noLabels).getCount());
+        assertEquals(0.0, getData(noLabels).getSum(), 0.0);
+    }
+
+    private ClassicHistogramBucket getBucket(Histogram histogram, double le, String... labels) {
+        return getData(histogram, labels).getClassicBuckets().stream()
+                .filter(b -> b.getUpperBound() == le)
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("bucket with le=" + le + " not found."));
+    }
+
+    @Test
+    public void testObserve() {
+        Histogram noLabels = Histogram.newBuilder()
+                .withName("test")
+                .build();
+        noLabels.observe(2);
+        assertEquals(1, getData(noLabels).getCount());
+        assertEquals(2.0, getData(noLabels).getSum(), .0);
+        assertEquals(0.0, getBucket(noLabels, 1).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 2.5).getCount(), .0);
+        noLabels.observe(4);
+        assertEquals(2.0, getData(noLabels).getCount(), .0);
+        assertEquals(6.0, getData(noLabels).getSum(), .0);
+        assertEquals(0.0, getBucket(noLabels, 1).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 2.5).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 5).getCount(), .0);
+        assertEquals(0.0, getBucket(noLabels, 10).getCount(), .0);
+        assertEquals(0.0, getBucket(noLabels, Double.POSITIVE_INFINITY).getCount(), .0);
+    }
+
+    @Test
+    // See https://github.com/prometheus/client_java/issues/646
+    public void testNegativeAmount() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("histogram")
+                .withHelp("test histogram for negative values")
+                .withClassicBuckets(-10, -5, 0, 5, 10)
+                .build();
+        double expectedCount = 0;
+        double expectedSum = 0;
+        for (int i = 10; i >= -11; i--) {
+            histogram.observe(i);
+            expectedCount++;
+            expectedSum += i;
+            assertEquals(expectedSum, getData(histogram).getSum(), .001);
+            assertEquals(expectedCount, getData(histogram).getCount(), .001);
+        }
+        List<Long> expectedBucketCounts = Arrays.asList(2L, 5L, 5L, 5L, 5L, 0L); // buckets -10, -5, 0, 5, 10, +Inf
+        List<Long> actualBucketCounts = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getCount)
+                .collect(Collectors.toList());
+        assertEquals(expectedBucketCounts, actualBucketCounts);
+    }
+
+    @Test
+    public void testBoundaryConditions() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .build();
+        histogram.observe(2.5);
+        assertEquals(0, getBucket(histogram, 1).getCount());
+        assertEquals(1, getBucket(histogram, 2.5).getCount());
+
+        histogram.observe(Double.POSITIVE_INFINITY);
+        assertEquals(0, getBucket(histogram, 1).getCount());
+        assertEquals(1, getBucket(histogram, 2.5).getCount());
+        assertEquals(0, getBucket(histogram, 5).getCount());
+        assertEquals(0, getBucket(histogram, 10).getCount());
+        assertEquals(1, getBucket(histogram, Double.POSITIVE_INFINITY).getCount());
+    }
+
+    @Test
+    public void testObserveWithLabels() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withConstLabels(Labels.of("env", "prod"))
+                .withLabelNames("path", "status")
+                .build();
+        histogram.withLabelValues("/hello", "200").observe(0.11);
+        histogram.withLabelValues("/hello", "200").observe(0.2);
+        histogram.withLabelValues("/hello", "500").observe(0.19);
+        HistogramSnapshot.HistogramDataPointSnapshot data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        HistogramSnapshot.HistogramDataPointSnapshot data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        assertEquals(2, data200.getCount());
+        assertEquals(0.31, data200.getSum(), 0.0000001);
+        assertEquals(1, data500.getCount());
+        assertEquals(0.19, data500.getSum(), 0.0000001);
+        histogram.withLabelValues("/hello", "200").observe(0.13);
+        data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        assertEquals(3, data200.getCount());
+        assertEquals(0.44, data200.getSum(), 0.0000001);
+        assertEquals(1, data500.getCount());
+        assertEquals(0.19, data500.getSum(), 0.0000001);
+    }
+
+    @Test
+    public void testObserveMultithreaded() throws InterruptedException, ExecutionException, TimeoutException {
+        // Hard to test concurrency, but let's run a couple of observations in parallel and assert none gets lost.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("status")
+                .build();
+        int nThreads = 8;
+        DistributionDataPoint obs = histogram.withLabelValues("200");
+        ExecutorService executor = Executors.newFixedThreadPool(nThreads);
+        CompletionService<List<HistogramSnapshot>> completionService = new ExecutorCompletionService<>(executor);
+        CountDownLatch startSignal = new CountDownLatch(nThreads);
+        for (int t = 0; t < nThreads; t++) {
+            completionService.submit(() -> {
+                List<HistogramSnapshot> snapshots = new ArrayList<>();
+                startSignal.countDown();
+                startSignal.await();
+                for (int i = 0; i < 10; i++) {
+                    for (int j = 0; j < 1000; j++) {
+                        obs.observe(1.1);
+                    }
+                    snapshots.add(histogram.collect());
+                }
+                return snapshots;
+            });
+        }
+        long maxCount = 0;
+        for (int i = 0; i < nThreads; i++) {
+            Future<List<HistogramSnapshot>> future = completionService.take();
+            List<HistogramSnapshot> snapshots = future.get(5, TimeUnit.SECONDS);
+            long count = 0;
+            for (HistogramSnapshot snapshot : snapshots) {
+                Assert.assertEquals(1, snapshot.getData().size());
+                HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
+                Assert.assertTrue(data.getCount() >= (count + 1000)); // 1000 own observations plus the ones from other threads
+                count = data.getCount();
+            }
+            if (count > maxCount) {
+                maxCount = count;
+            }
+        }
+        Assert.assertEquals(nThreads * 10_000, maxCount); // the last collect() has seen all observations
+        Assert.assertEquals(getBucket(histogram, 2.5, "status", "200").getCount(), nThreads * 10_000);
+        executor.shutdown();
+        Assert.assertTrue(executor.awaitTermination(5, TimeUnit.SECONDS));
+    }
+
+
+    private HistogramSnapshot.HistogramDataPointSnapshot getData(Histogram histogram, String... labels) {
+        return histogram.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("histogram with labels " + labels + " not found"));
+    }
+}	     u}(j4  (4cca37ef6fcd66eac25335f3a703067cb33fb77cjK5  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xs  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class InfoTest {
+
+    @Test
+    public void testIncrement() {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withLabelNames("key")
+                .build();
+        info.infoLabelValues("value");
+        InfoSnapshot snapshot = info.collect();
+        Assert.assertEquals("target", snapshot.getMetadata().getName());
+        Assert.assertEquals(1, snapshot.getData().size());
+        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
+        Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
+    }
+}u}(j4  (1babd430cd9fc54a09561e9adcfb9db80c452152jK5  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajM5  addedjE5  KKjF5  K jO5  KKjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,75 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class StateSetTest {
+
+    enum MyFeatureFlag {
+        EXPERIMENTAL_FEATURE_1 {
+            @Override
+            public String toString() {
+                return "feature1";
+            }
+        },
+
+        EXPERIMENTAL_FEATURE_2 {
+            @Override
+            public String toString() {
+                return "feature2";
+            }
+        }
+    }
+
+    @Test
+    public void testEnumStateSet() {
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("environment")
+                .withStates(MyFeatureFlag.class)
+                .build();
+        stateSet.withLabelValues("dev").setTrue(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        stateSet.withLabelValues("prod").setFalse(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        StateSetSnapshot snapshot = stateSet.collect();
+        Assert.assertEquals(2, snapshot.getData().size());
+        Assert.assertEquals(2, getData(stateSet, "environment", "dev").size());
+        Assert.assertEquals("feature1", getData(stateSet, "environment", "dev").getName(0));
+        Assert.assertFalse(getData(stateSet, "environment", "dev").isTrue(0));
+        Assert.assertEquals("feature2", getData(stateSet, "environment", "dev").getName(1));
+        Assert.assertTrue(getData(stateSet, "environment", "dev").isTrue(1));
+        Assert.assertEquals(2, getData(stateSet, "environment", "prod").size());
+        Assert.assertEquals("feature1", getData(stateSet, "environment", "prod").getName(0));
+        Assert.assertFalse(getData(stateSet, "environment", "prod").isTrue(0));
+        Assert.assertEquals("feature2", getData(stateSet, "environment", "prod").getName(1));
+        Assert.assertFalse(getData(stateSet, "environment", "prod").isTrue(1));
+    }
+
+    @Test
+    public void testDefaultFalse() {
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("test")
+                .withStates("state1", "state2", "state3")
+                .build();
+        Assert.assertEquals(3, getData(stateSet).size());
+        Assert.assertEquals("state1", getData(stateSet).getName(0));
+        Assert.assertFalse(getData(stateSet).isTrue(0));
+        Assert.assertEquals("state2", getData(stateSet).getName(1));
+        Assert.assertFalse(getData(stateSet).isTrue(1));
+        Assert.assertEquals("state3", getData(stateSet).getName(2));
+        Assert.assertFalse(getData(stateSet).isTrue(2));
+    }
+
+    private StateSetSnapshot.StateSetDataPointSnapshot getData(StateSet stateSet, String... labels) {
+        return stateSet.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("stateset with labels " + labels + " not found"));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testStatesCannotBeEmpty() {
+        StateSet.newBuilder().withName("invalid").build();
+    }
+}u}(j4  (3b947e73e91e7464b7db1ac75c0a90462277241cjK5  `prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StatefulMetricTest.javajM5  addedjE5  K$jF5  K jO5  K$jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,36 @@
+package io.prometheus.metrics.core.metrics;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.lang.reflect.Field;
+import java.util.Map;
+
+public class StatefulMetricTest {
+
+    @Test
+    public void testLabelRemoveWhileCollecting() throws Exception {
+        Counter counter = Counter.newBuilder().withName("test").withLabelNames("label1", "label2").build();
+        Field data = counter.getClass().getSuperclass().getDeclaredField("data");
+        data.setAccessible(true);
+
+        counter.withLabelValues("a", "b").inc(1.0);
+        counter.withLabelValues("c", "d").inc(3.0);
+        counter.withLabelValues("e", "f").inc(7.0);
+
+        // collect() iterates over data.entrySet().
+        // remove() removes entries from data.
+        // Make sure iterating does not yield null while removing.
+
+        int i = 0;
+        for (Map.Entry<?, ?> entry : ((Map<?, ?>) data.get(counter)).entrySet()) {
+            i++;
+            if (i == 2) {
+                counter.remove("c", "d");
+                counter.remove("e", "f");
+            }
+            Assert.assertNotNull(entry.getKey());
+            Assert.assertNotNull(entry.getValue());
+        }
+    }
+}u}(j4  (489bcac335a186d9d220a1b4bd74329e5bbb5d4fjK5  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TestUtil.javajM5  addedjE5  K
jF5  K jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import org.junit.Assert;
+
+public class TestUtil {
+
+    public static void assertExemplarEquals(Exemplar expected, Exemplar actual) {
+        // ignore timestamp
+        Assert.assertEquals(expected.getValue(), actual.getValue(), 0.00001);
+        Assert.assertEquals(expected.getLabels(), actual.getLabels());
+    }
+}u}(j4  (996e199db1f7bd41488532f5dccdd98e8fe8f0f4jK5  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TodoTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XB  @@ -0,0 +1,17 @@
+package io.prometheus.metrics.core.metrics;
+
+public class TodoTest {
+
+    // if a metric with labels is created but never used it has no data.
+    // The registry's collect() method should skip those metrics to avoid illegal protobuf or text format.
+
+    // callback versions of metrics
+
+    // build() called with name == null
+
+    // call inc() without labels, but the metric was created with labels
+
+    // call inc() with labels, but the metric was created without labels
+
+    // for performance: Use return value of withLabels() directly
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  )prometheus-metrics-core/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-core%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (a6038dd91dba826120715c7e078e7ce43c97945ajK5  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljM5  addedjE5  K6jF5  K jO5  K6jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xz  @@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <description>
+        Jakarta Servlet for exposing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+</project>u}(j4  (ef36568754f16e97d951e0383f9711a7defa29aejK5  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javajM5  addedjE5  KYjF5  K jO5  KYjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajT5  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X<  @@ -0,0 +1,89 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.function.Predicate;
+
+/**
+ * Initial example exporter so that we can try the new metrics library out.
+ * <p>
+ * We'll add a Jakarta servlet, the built-in HTTPServer, etc. soon, and likely move common code into a common module.
+ */
+public class PrometheusMetricsServlet extends HttpServlet {
+
+    private final PrometheusRegistry registry;
+
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+
+    public PrometheusMetricsServlet() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        Predicate<String> filter = nameFilter;
+        String[] allowedNames = request.getParameterValues("name[]");
+        if (allowedNames != null) {
+            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
+        }
+        String debugParam = request.getParameter("debug");
+        if (debugParam != null) {
+            switch (debugParam) {
+                case "openmetrics":
+                    response.setContentType("text/plain");
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "text":
+                    response.setContentType("text/plain");
+                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "prometheus-protobuf":
+                    response.setContentType("text/plain");
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
+                    response.getWriter().write(debugString);
+                    return;
+            }
+        }
+        String acceptHeader = request.getHeader("Accept");
+        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+        response.setContentType(writer.getContentType());
+        writer.write(response.getOutputStream(), registry.scrape(filter));
+    }
+}u}(j4  (318e865f55bdd893d762a5f4e759a502e8bbc983jK5  =prometheus-metrics-exporter-servlet-jakarta/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j4  (e61d58055ffd21473320045871e6c8b4bfe02e84jK5  :prometheus-metrics-exposition-formats/generate-protobuf.shjM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X+  @@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# We use the shaded protobuf JAR from the protobuf-shaded module.
+# I could not figure out how to use a protoc Maven plugin to use the shaded module, so I ran this command to generate the sources manually.
+
+# The version string must be the same as in protobuf-shaded/pom.xml.
+export PROTOBUF_VERSION_STRING="3_21_7"
+
+rm -rf src/main/protobuf/*
+curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/prometheus/client/metrics.proto -o src/main/protobuf/metrics.proto
+sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
+rm -rf src/main/generated/*
+protoc --java_out src/main/generated src/main/protobuf/metrics.proto
+sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j4  (9de57e88c1af8a760a686bc89243e55a89a2457ajK5  -prometheus-metrics-exposition-formats/pom.xmljM5  addedjE5  KUjF5  K jO5  KUjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xx  @@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exposition-formats</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exposition Formats</name>
+    <description>
+        Prometheus exposition formats.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>protobuf-shaded</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.2.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/main/generated/</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j4  (94e92a1f394b020fd8bad9690393661e0bb3ad4fjK5  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javajM5  addedjE5  M7jF5  K jO5  M7jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajT5  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8feu}(j4  (2d1ce9dcdeb3a31694fd5f5620ca04ab951c8b35jK5  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface ExpositionFormatWriter {
+    boolean accepts(String acceptHeader);
+    void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
+    String getContentType();
+}u}(j4  (f913753cd1f16ea1413664649faefc42c89b8a23jK5  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormats.javajM5  addedjE5  K5jF5  K jO5  K5jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.config.ExporterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+public class ExpositionFormats {
+
+    private final PrometheusProtobufWriter prometheusProtobufWriter;
+    private final PrometheusTextFormatWriter prometheusTextFormatWriter;
+    private final OpenMetricsTextFormatWriter openMetricsTextFormatWriter;
+
+    private ExpositionFormats(PrometheusProtobufWriter prometheusProtobufWriter,
+                              PrometheusTextFormatWriter prometheusTextFormatWriter,
+                              OpenMetricsTextFormatWriter openMetricsTextFormatWriter) {
+        this.prometheusProtobufWriter = prometheusProtobufWriter;
+        this.prometheusTextFormatWriter = prometheusTextFormatWriter;
+        this.openMetricsTextFormatWriter = openMetricsTextFormatWriter;
+    }
+
+    public static ExpositionFormats init() {
+        return init(PrometheusProperties.get().getExporterProperties());
+    }
+
+    public static ExpositionFormats init(ExporterProperties properties) {
+        return new ExpositionFormats(
+                new PrometheusProtobufWriter(),
+                new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),
+                new OpenMetricsTextFormatWriter(properties.getIncludeCreatedTimestamps(), properties.getExemplarsOnAllMetricTypes())
+        );
+    }
+
+    public ExpositionFormatWriter findWriter(String acceptHeader) {
+        if (prometheusProtobufWriter.accepts(acceptHeader)) {
+            return prometheusProtobufWriter;
+        }
+        if (openMetricsTextFormatWriter.accepts(acceptHeader)) {
+            return openMetricsTextFormatWriter;
+        }
+        return prometheusTextFormatWriter;
+    }
+
+    public PrometheusProtobufWriter getPrometheusProtobufWriter() {
+        return prometheusProtobufWriter;
+    }
+
+    public PrometheusTextFormatWriter getPrometheusTextFormatWriter() {
+        return prometheusTextFormatWriter;
+    }
+
+    public OpenMetricsTextFormatWriter getOpenMetricsTextFormatWriter() {
+        return openMetricsTextFormatWriter;
+    }
+}u}(j4  (0559ce0bef9d73bef4ca2c69da261ba53075c975jK5  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajM5  addedjE5  MUjF5  K jO5  MUjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XA  @@ -0,0 +1,341 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+
+/**
+ * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
+ */
+public class OpenMetricsTextFormatWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
+    private final boolean createdTimestampsEnabled;
+    private final boolean exemplarsOnAllMetricTypesEnabled;
+
+    /**
+     * @param createdTimestampsEnabled defines if {@code _created} timestamps should be included in the output or not.
+     */
+    public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled, boolean exemplarsOnAllMetricTypesEnabled) {
+        this.createdTimestampsEnabled = createdTimestampsEnabled;
+        this.exemplarsOnAllMetricTypesEnabled = exemplarsOnAllMetricTypesEnabled;
+    }
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        }
+        return acceptHeader.contains("application/openmetrics-text");
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                if (snapshot instanceof CounterSnapshot) {
+                    writeCounter(writer, (CounterSnapshot) snapshot);
+                } else if (snapshot instanceof GaugeSnapshot) {
+                    writeGauge(writer, (GaugeSnapshot) snapshot);
+                } else if (snapshot instanceof HistogramSnapshot) {
+                    writeHistogram(writer, (HistogramSnapshot) snapshot);
+                } else if (snapshot instanceof SummarySnapshot) {
+                    writeSummary(writer, (SummarySnapshot) snapshot);
+                } else if (snapshot instanceof InfoSnapshot) {
+                    writeInfo(writer, (InfoSnapshot) snapshot);
+                } else if (snapshot instanceof StateSetSnapshot) {
+                    writeStateSet(writer, (StateSetSnapshot) snapshot);
+                } else if (snapshot instanceof UnknownSnapshot) {
+                    writeUnknown(writer, (UnknownSnapshot) snapshot);
+                }
+            }
+        }
+        writer.write("# EOF\n");
+        writer.flush();
+    }
+
+    private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "counter", metadata);
+        for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "gauge", metadata);
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            if (exemplarsOnAllMetricTypesEnabled) {
+                writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        if (snapshot.isGaugeHistogram()) {
+            writeMetadata(writer, "gaugehistogram", metadata);
+            writeClassicHistogramBuckets(writer, metadata, "_gcount", "_gsum", snapshot.getData());
+        } else {
+            writeMetadata(writer, "histogram", metadata);
+            writeClassicHistogramBuckets(writer, metadata, "_count", "_sum", snapshot.getData());
+        }
+    }
+
+    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramDataPointSnapshot> dataList) throws IOException {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : dataList) {
+            ClassicHistogramBuckets buckets = getClassicBuckets(data);
+            Exemplars exemplars = data.getExemplars();
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeLong(writer, cumulativeCount);
+                Exemplar exemplar;
+                if (i == 0) {
+                    exemplar = exemplars.get(Double.NEGATIVE_INFINITY, buckets.getUpperBound(i));
+                } else {
+                    exemplar = exemplars.get(buckets.getUpperBound(i - 1), buckets.getUpperBound(i));
+                }
+                writeScrapeTimestampAndExemplar(writer, data, exemplar);
+            }
+            if (data.hasCount() && data.hasSum()) {
+                // In OpenMetrics format, histogram _count and _sum are either both present or both absent.
+                // While Prometheus allows Exemplars for histogram's _count and _sum now, we don't
+                // use Exemplars here to be backwards compatible with previous behavior.
+                writeCountAndSum(writer, metadata, data, countSuffix, sumSuffix, Exemplars.EMPTY);
+            }
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.getClassicBuckets().isEmpty()) {
+            return ClassicHistogramBuckets.of(
+                    new double[]{Double.POSITIVE_INFINITY},
+                    new long[]{data.getCount()}
+            );
+        } else {
+            return data.getClassicBuckets();
+        }
+    }
+
+    private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
+        boolean metadataWritten = false;
+        MetricMetadata metadata = snapshot.getMetadata();
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
+            if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
+                continue;
+            }
+            if (!metadataWritten) {
+                writeMetadata(writer, "summary", metadata);
+                metadataWritten = true;
+            }
+            Exemplars exemplars = data.getExemplars();
+            // Exemplars for summaries are new, and there's no best practice yet which Exemplars to choose for which
+            // time series. We select exemplars[0] for _count, exemplars[1] for _sum, and exemplars[2...] for the
+            // quantiles, all indexes modulo exemplars.length.
+            int exemplarIndex = 1;
+            for (Quantile quantile : data.getQuantiles()) {
+                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeDouble(writer, quantile.getValue());
+                if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
+                    exemplarIndex = (exemplarIndex + 1) % exemplars.size();
+                    writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+                } else {
+                    writeScrapeTimestampAndExemplar(writer, data, null);
+                }
+            }
+            // Unlike histograms, summaries can have only a count or only a sum according to OpenMetrics.
+            writeCountAndSum(writer, metadata, data, "_count", "_sum", exemplars);
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "info", metadata);
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writer.write("1");
+            writeScrapeTimestampAndExemplar(writer, data, null);
+        }
+    }
+
+    private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "stateset", metadata);
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
+            for (int i = 0; i < data.size(); i++) {
+                writer.write(metadata.getName());
+                writer.write('{');
+                for (int j = 0; j < data.getLabels().size(); j++) {
+                    if (j > 0) {
+                        writer.write(",");
+                    }
+                    writer.write(data.getLabels().getName(j));
+                    writer.write("=\"");
+                    writeEscapedLabelValue(writer, data.getLabels().getValue(j));
+                    writer.write("\"");
+                }
+                if (!data.getLabels().isEmpty()) {
+                    writer.write(",");
+                }
+                writer.write(metadata.getName());
+                writer.write("=\"");
+                writeEscapedLabelValue(writer, data.getName(i));
+                writer.write("\"} ");
+                if (data.isTrue(i)) {
+                    writer.write("1");
+                } else {
+                    writer.write("0");
+                }
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "unknown", metadata);
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            if (exemplarsOnAllMetricTypesEnabled) {
+            writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
+        int exemplarIndex = 0;
+        if (data.hasCount()) {
+            writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
+            writeLong(writer, data.getCount());
+            if (exemplars.size() > 0) {
+                writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+                exemplarIndex = exemplarIndex + 1 % exemplars.size();
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+        if (data.hasSum()) {
+            writeNameAndLabels(writer, metadata.getName(), sumSuffix, data.getLabels());
+            writeDouble(writer, data.getSum());
+            if (exemplars.size() > 0) {
+                writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
+        if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
+            writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+            writeTimestamp(writer, data.getCreatedTimestampMillis());
+            if (data.hasScrapeTimestamp()) {
+                writer.write(' ');
+                writeTimestamp(writer, data.getScrapeTimestampMillis());
+            }
+            writer.write('\n');
+        }
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels) throws IOException {
+        writeNameAndLabels(writer, name, suffix, labels, null, 0.0);
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels,
+                                    String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write(name);
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        if (!labels.isEmpty() || additionalLabelName != null) {
+            writeLabels(writer, labels, additionalLabelName, additionalLabelValue);
+        }
+        writer.write(' ');
+    }
+
+    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPointSnapshot data, Exemplar exemplar) throws IOException {
+        if (data.hasScrapeTimestamp()) {
+            writer.write(' ');
+            writeTimestamp(writer, data.getScrapeTimestampMillis());
+        }
+        if (exemplar != null) {
+            writer.write(" # ");
+            writeLabels(writer, exemplar.getLabels(), null, 0);
+            writer.write(' ');
+            writeDouble(writer, exemplar.getValue());
+            if (exemplar.hasTimestamp()) {
+                writer.write(' ');
+                writeTimestamp(writer, exemplar.getTimestampMillis());
+            }
+        }
+        writer.write('\n');
+    }
+
+    private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
+        writer.write("# TYPE ");
+        writer.write(metadata.getName());
+        writer.write(' ');
+        writer.write(typeName);
+        writer.write('\n');
+        if (metadata.getUnit() != null) {
+            writer.write("# UNIT ");
+            writer.write(metadata.getName());
+            writer.write(' ');
+            writeEscapedLabelValue(writer, metadata.getUnit().toString());
+            writer.write('\n');
+        }
+        if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
+            writer.write("# HELP ");
+            writer.write(metadata.getName());
+            writer.write(' ');
+            writeEscapedLabelValue(writer, metadata.getHelp());
+            writer.write('\n');
+        }
+    }
+}u}(j4  (d6de08114a9b4472ec47d05337365c3f4f83b52ejK5  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajM5  addedjE5  MpjF5  K jO5  MpjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
F  @@ -0,0 +1,368 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
+
+/**
+ * Write the Prometheus protobuf format as defined in
+ * <a href="https://github.com/prometheus/client_model/tree/master/io/prometheus/client">github.com/prometheus/client_model</a>.
+ * <p>
+ * As of today, this is the only exposition format that supports native histograms.
+ */
+public class PrometheusProtobufWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited";
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+            return acceptHeader.contains("application/vnd.google.protobuf")
+                    && acceptHeader.contains("proto=io.prometheus.client.MetricFamily");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public String toDebugString(MetricSnapshots metricSnapshots) {
+        StringBuilder stringBuilder = new StringBuilder();
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                stringBuilder.append(TextFormat.printer().printToString(convert(snapshot)));
+            }
+        }
+        return stringBuilder.toString();
+    }
+
+    @Override
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                convert(snapshot).writeDelimitedTo(out);
+            }
+        }
+    }
+
+    public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
+        Metrics.MetricFamily.Builder builder = Metrics.MetricFamily.newBuilder();
+        if (snapshot instanceof CounterSnapshot) {
+            for (CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_total", Metrics.MetricType.COUNTER);
+        } else if (snapshot instanceof GaugeSnapshot) {
+            for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof HistogramSnapshot) {
+            HistogramSnapshot histogram = (HistogramSnapshot) snapshot;
+            for (HistogramSnapshot.HistogramDataPointSnapshot data : histogram.getData()) {
+                builder.addMetric(convert(data));
+            }
+            Metrics.MetricType type = histogram.isGaugeHistogram() ? Metrics.MetricType.GAUGE_HISTOGRAM : Metrics.MetricType.HISTOGRAM;
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, type);
+        } else if (snapshot instanceof SummarySnapshot) {
+            for (SummarySnapshot.SummaryDataPointSnapshot data : ((SummarySnapshot) snapshot).getData()) {
+                if (data.hasCount() || data.hasSum() || data.getQuantiles().size() > 0) {
+                    builder.addMetric(convert(data));
+                }
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.SUMMARY);
+        } else if (snapshot instanceof InfoSnapshot) {
+            for (InfoSnapshot.InfoDataPointSnapshot data : ((InfoSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_info", Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof StateSetSnapshot) {
+            for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
+                for (int i = 0; i < data.size(); i++) {
+                    builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
+                }
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof UnknownSnapshot) {
+            for (UnknownSnapshot.UnknownDataPointSnapshot data : ((UnknownSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.UNTYPED);
+        }
+        return builder.build();
+    }
+
+    private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, MetricMetadata metadata, String nameSuffix, Metrics.MetricType type) {
+        if (builder.getMetricCount() == 0) {
+            return;
+        }
+        if (nameSuffix == null) {
+            builder.setName(metadata.getName());
+        } else {
+            builder.setName(metadata.getName() + nameSuffix);
+        }
+        if (metadata.getHelp() != null) {
+            builder.setHelp(metadata.getHelp());
+        }
+        builder.setType(type);
+    }
+
+    private Metrics.Metric.Builder convert(CounterDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Counter.Builder counterBuilder = Metrics.Counter.newBuilder();
+        counterBuilder.setValue(data.getValue());
+        if (data.getExemplar() != null) {
+            counterBuilder.setExemplar(convert(data.getExemplar()));
+        }
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setCounter(counterBuilder.build());
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        gaugeBuilder.setValue(data.getValue());
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
+        if (data.hasNativeHistogramData()) {
+            histogramBuilder.setSchema(data.getNativeSchema());
+            histogramBuilder.setZeroCount(data.getNativeZeroCount());
+            histogramBuilder.setZeroThreshold(data.getNativeZeroThreshold());
+            addBuckets(histogramBuilder, data.getNativeBucketsForPositiveValues(), +1);
+            addBuckets(histogramBuilder, data.getNativeBucketsForNegativeValues(), -1);
+
+            // Add a single +Inf bucket for the exemplar.
+            // It is currently not possible to have more than one exemplar in a native histogram,
+            // see https://cloud-native.slack.com/archives/C02KR205UMU/p1688414381799849
+            Exemplar exemplar = data.getExemplars().getLatest();
+            if (exemplar != null) {
+                Metrics.Bucket.Builder bucketBuilder = Metrics.Bucket.newBuilder()
+                        .setCumulativeCount(getNativeCount(data))
+                        .setUpperBound(Double.POSITIVE_INFINITY);
+                bucketBuilder.setExemplar(convert(exemplar));
+                histogramBuilder.addBucket(bucketBuilder);
+            }
+        } else if (data.hasClassicHistogramData()) {
+
+            // Once native histograms support multiple exemplars the above can be changed from "else if" to "if",
+            // so that we always add the complete classic buckets and exemplars.
+
+            ClassicHistogramBuckets buckets = data.getClassicBuckets();
+            double lowerBound = Double.NEGATIVE_INFINITY;
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                double upperBound = buckets.getUpperBound(i);
+                Metrics.Bucket.Builder bucketBuilder = Metrics.Bucket.newBuilder()
+                        .setCumulativeCount(cumulativeCount)
+                        .setUpperBound(upperBound);
+                Exemplar exemplar = data.getExemplars().get(lowerBound, upperBound);
+                if (exemplar != null) {
+                    bucketBuilder.setExemplar(convert(exemplar));
+                }
+                histogramBuilder.addBucket(bucketBuilder);
+                lowerBound = upperBound;
+            }
+        }
+        addLabels(metricBuilder, data.getLabels());
+        setScrapeTimestamp(metricBuilder, data);
+        if (data.hasCount()) {
+            histogramBuilder.setSampleCount(data.getCount());
+        }
+        if (data.hasSum()) {
+            histogramBuilder.setSampleSum(data.getSum());
+        }
+        metricBuilder.setHistogram(histogramBuilder.build());
+        return metricBuilder;
+    }
+
+    private long getNativeCount(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.hasCount()) {
+            return data.getCount();
+        } else {
+            long count = data.getNativeZeroCount();
+            for (int i = 0; i < data.getNativeBucketsForPositiveValues().size(); i++) {
+                count += data.getNativeBucketsForPositiveValues().getCount(i);
+            }
+            for (int i = 0; i < data.getNativeBucketsForNegativeValues().size(); i++) {
+                count += data.getNativeBucketsForNegativeValues().getCount(i);
+            }
+            return count;
+        }
+    }
+
+    private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistogramBuckets buckets, int sgn) {
+        if (buckets.size() > 0) {
+            Metrics.BucketSpan.Builder currentSpan = Metrics.BucketSpan.newBuilder();
+            currentSpan.setOffset(buckets.getBucketIndex(0));
+            currentSpan.setLength(0);
+            int previousIndex = currentSpan.getOffset();
+            long previousCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                if (buckets.getBucketIndex(i) > previousIndex + 1) {
+                    // If the gap between bucketIndex and previousIndex is just 1 or 2,
+                    // we don't start a new span but continue the existing span and add 1 or 2 empty buckets.
+                    if (buckets.getBucketIndex(i) <= previousIndex + 3) {
+                        while (buckets.getBucketIndex(i) > previousIndex + 1) {
+                            currentSpan.setLength(currentSpan.getLength() + 1);
+                            previousIndex++;
+                            if (sgn > 0) {
+                                histogramBuilder.addPositiveDelta(-previousCount);
+                            } else {
+                                histogramBuilder.addNegativeDelta(-previousCount);
+                            }
+                            previousCount = 0;
+                        }
+                    } else {
+                        if (sgn > 0) {
+                            histogramBuilder.addPositiveSpan(currentSpan.build());
+                        } else {
+                            histogramBuilder.addNegativeSpan(currentSpan.build());
+                        }
+                        currentSpan = Metrics.BucketSpan.newBuilder();
+                        currentSpan.setOffset(buckets.getBucketIndex(i) - (previousIndex + 1));
+                    }
+                }
+                currentSpan.setLength(currentSpan.getLength() + 1);
+                previousIndex = buckets.getBucketIndex(i);
+                if (sgn > 0) {
+                    histogramBuilder.addPositiveDelta(buckets.getCount(i) - previousCount);
+                } else {
+                    histogramBuilder.addNegativeDelta(buckets.getCount(i) - previousCount);
+                }
+                previousCount = buckets.getCount(i);
+            }
+            if (sgn > 0) {
+                histogramBuilder.addPositiveSpan(currentSpan.build());
+            } else {
+                histogramBuilder.addNegativeSpan(currentSpan.build());
+            }
+        }
+    }
+
+    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Summary.Builder summaryBuilder = Metrics.Summary.newBuilder();
+        if (data.hasCount()) {
+            summaryBuilder.setSampleCount(data.getCount());
+        }
+        if (data.hasSum()) {
+            summaryBuilder.setSampleSum(data.getSum());
+        }
+        Quantiles quantiles = data.getQuantiles();
+        for (int i = 0; i < quantiles.size(); i++) {
+            summaryBuilder.addQuantile(Metrics.Quantile.newBuilder()
+                    .setQuantile(quantiles.get(i).getQuantile())
+                    .setValue(quantiles.get(i).getValue())
+                    .build());
+        }
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setSummary(summaryBuilder.build());
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(InfoSnapshot.InfoDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        gaugeBuilder.setValue(1);
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetDataPointSnapshot data, String name, int i) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                .setName(name)
+                .setValue(data.getName(i))
+                .build());
+        if (data.isTrue(i)) {
+            gaugeBuilder.setValue(1);
+        } else {
+            gaugeBuilder.setValue(0);
+        }
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Untyped.Builder untypedBuilder = Metrics.Untyped.newBuilder();
+        untypedBuilder.setValue(data.getValue());
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setUntyped(untypedBuilder);
+        return metricBuilder;
+    }
+
+    private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
+        for (int i = 0; i < labels.size(); i++) {
+            metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                    .setName(labels.getName(i))
+                    .setValue(labels.getValue(i))
+                    .build());
+        }
+    }
+
+    private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
+        for (int i = 0; i < labels.size(); i++) {
+            metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                    .setName(labels.getName(i))
+                    .setValue(labels.getValue(i))
+                    .build());
+        }
+    }
+
+    private Metrics.Exemplar.Builder convert(Exemplar exemplar) {
+        Metrics.Exemplar.Builder builder = Metrics.Exemplar.newBuilder();
+        builder.setValue(exemplar.getValue());
+        addLabels(builder, exemplar.getLabels());
+        if (exemplar.hasTimestamp()) {
+            builder.setTimestamp(timestampFromMillis(exemplar.getTimestampMillis()));
+        }
+        return builder;
+    }
+
+    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, DataPointSnapshot data) {
+        if (data.hasScrapeTimestamp()) {
+            metricBuilder.setTimestampMs(data.getScrapeTimestampMillis());
+        }
+    }
+}uq      }(j4  (a4499dd9da43bb6d1dc392d8c42a6880bc985fadjK5  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajM5  addedjE5  M[jF5  K jO5  M[jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X>  @@ -0,0 +1,347 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.StandardCharsets;
+
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+
+/**
+ * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
+ */
+public class PrometheusTextFormatWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
+
+    private final boolean writeCreatedTimestamps;
+
+    public PrometheusTextFormatWriter(boolean writeCreatedTimestamps) {
+        this.writeCreatedTimestamps = writeCreatedTimestamps;
+    }
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+        return acceptHeader.contains("text/plain");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        // See https://prometheus.io/docs/instrumenting/exposition_formats/
+        // "unknown", "gauge", "counter", "stateset", "info", "histogram", "gaugehistogram", and "summary".
+        OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                if (snapshot instanceof CounterSnapshot) {
+                    writeCounter(writer, (CounterSnapshot) snapshot);
+                } else if (snapshot instanceof GaugeSnapshot) {
+                    writeGauge(writer, (GaugeSnapshot) snapshot);
+                } else if (snapshot instanceof HistogramSnapshot) {
+                    writeHistogram(writer, (HistogramSnapshot) snapshot);
+                } else if (snapshot instanceof SummarySnapshot) {
+                    writeSummary(writer, (SummarySnapshot) snapshot);
+                } else if (snapshot instanceof InfoSnapshot) {
+                    writeInfo(writer, (InfoSnapshot) snapshot);
+                } else if (snapshot instanceof StateSetSnapshot) {
+                    writeStateSet(writer, (StateSetSnapshot) snapshot);
+                } else if (snapshot instanceof UnknownSnapshot) {
+                    writeUnknown(writer, (UnknownSnapshot) snapshot);
+                }
+            }
+        }
+        if (writeCreatedTimestamps) {
+            for (MetricSnapshot snapshot : metricSnapshots) {
+                if (snapshot.getData().size() > 0) {
+                    if (snapshot instanceof CounterSnapshot) {
+                        writeCreated(writer, snapshot);
+                    } else if (snapshot instanceof HistogramSnapshot) {
+                        writeCreated(writer, snapshot);
+                    } else if (snapshot instanceof SummarySnapshot) {
+                        writeCreated(writer, snapshot);
+                    }
+                }
+            }
+        }
+        writer.flush();
+    }
+
+    public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) throws IOException {
+            boolean metadataWritten = false;
+            MetricMetadata metadata = snapshot.getMetadata();
+            for (DataPointSnapshot data : snapshot.getData()) {
+                if (data.hasCreatedTimestamp()) {
+                    if (!metadataWritten) {
+                        writeMetadata(writer, "_created", "gauge", metadata);
+                        metadataWritten = true;
+                    }
+                    writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+                    writeTimestamp(writer, data.getCreatedTimestampMillis());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+            }
+
+    }
+
+    private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
+        if (snapshot.getData().size() > 0) {
+            MetricMetadata metadata = snapshot.getMetadata();
+            writeMetadata(writer, "_total", "counter", metadata);
+            for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
+                writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+                writeDouble(writer, data.getValue());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "gauge", metadata);
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "histogram", metadata);
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            ClassicHistogramBuckets buckets = getClassicBuckets(data);
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeLong(writer, cumulativeCount);
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (!snapshot.isGaugeHistogram()) {
+                if (data.hasCount()) {
+                    writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                    writeLong(writer, data.getCount());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+                if (data.hasSum()) {
+                    writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                    writeDouble(writer, data.getSum());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+            }
+        }
+        if (snapshot.isGaugeHistogram()) {
+            writeGaugeCountSum(writer, snapshot, metadata);
+        }
+    }
+
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.getClassicBuckets().isEmpty()) {
+            return ClassicHistogramBuckets.of(
+                    new double[]{Double.POSITIVE_INFINITY},
+                    new long[]{data.getCount()}
+            );
+        } else {
+            return data.getClassicBuckets();
+        }
+    }
+
+    private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot snapshot, MetricMetadata metadata) throws IOException {
+        // Prometheus text format does not support gaugehistogram's _gcount and _gsum.
+        // So we append _gcount and _gsum as gauge metrics.
+        boolean metadataWritten = false;
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            if (data.hasCount()) {
+                if (!metadataWritten) {
+                    writeMetadata(writer, "_gcount", "gauge", metadata);
+                    metadataWritten = true;
+                }
+                writeNameAndLabels(writer, metadata.getName(), "_gcount", data.getLabels());
+                writeLong(writer, data.getCount());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+        metadataWritten = false;
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            if (data.hasSum()) {
+                if (!metadataWritten) {
+                    writeMetadata(writer, "_gsum", "gauge", metadata);
+                    metadataWritten = true;
+                }
+                writeNameAndLabels(writer, metadata.getName(), "_gsum", data.getLabels());
+                writeDouble(writer, data.getSum());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
+        boolean metadataWritten = false;
+        MetricMetadata metadata = snapshot.getMetadata();
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
+            if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
+                continue;
+            }
+            if (!metadataWritten) {
+                writeMetadata(writer, "", "summary", metadata);
+                metadataWritten = true;
+            }
+            for (Quantile quantile : data.getQuantiles()) {
+                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeDouble(writer, quantile.getValue());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (data.hasCount()) {
+                writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                writeLong(writer, data.getCount());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (data.hasSum()) {
+                writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                writeDouble(writer, data.getSum());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "_info", "gauge", metadata);
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writer.write("1");
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "gauge", metadata);
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
+            for (int i = 0; i < data.size(); i++) {
+                writer.write(metadata.getName());
+                writer.write('{');
+                for (int j = 0; j < data.getLabels().size(); j++) {
+                    if (j > 0) {
+                        writer.write(",");
+                    }
+                    writer.write(data.getLabels().getName(j));
+                    writer.write("=\"");
+                    writeEscapedLabelValue(writer, data.getLabels().getValue(j));
+                    writer.write("\"");
+                }
+                if (!data.getLabels().isEmpty()) {
+                    writer.write(",");
+                }
+                writer.write(metadata.getName());
+                writer.write("=\"");
+                writeEscapedLabelValue(writer, data.getName(i));
+                writer.write("\"} ");
+                if (data.isTrue(i)) {
+                    writer.write("1");
+                } else {
+                    writer.write("0");
+                }
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "untyped", metadata);
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels) throws IOException {
+        writeNameAndLabels(writer, name, suffix, labels, null, 0.0);
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels,
+                                    String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write(name);
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        if (!labels.isEmpty() || additionalLabelName != null) {
+            writeLabels(writer, labels, additionalLabelName, additionalLabelValue);
+        }
+        writer.write(' ');
+    }
+
+    private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
+        if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
+            writer.write("# HELP ");
+            writer.write(metadata.getName());
+            if (suffix != null) {
+                writer.write(suffix);
+            }
+            writer.write(' ');
+            writeEscapedHelp(writer, metadata.getHelp());
+            writer.write('\n');
+        }
+        writer.write("# TYPE ");
+        writer.write(metadata.getName());
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        writer.write(' ');
+        writer.write(typeString);
+        writer.write('\n');
+    }
+
+    private void writeEscapedHelp(Writer writer, String s) throws IOException {
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            switch (c) {
+                case '\\':
+                    writer.append("\\\\");
+                    break;
+                case '\n':
+                    writer.append("\\n");
+                    break;
+                default:
+                    writer.append(c);
+            }
+        }
+    }
+
+    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, DataPointSnapshot data) throws IOException {
+        if (data.hasScrapeTimestamp()) {
+            writer.write(' ');
+            writeTimestamp(writer, data.getScrapeTimestampMillis());
+        }
+        writer.write('\n');
+    }
+}u}(j4  (fe496df8cc566d382273276004503e749ef8c547jK5  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javajM5  addedjE5  K
jF5  K jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+
+public class ProtobufUtil {
+
+    static Timestamp timestampFromMillis(long timestampMillis) {
+        return Timestamp.newBuilder()
+                .setSeconds(timestampMillis / 1000L)
+                .setNanos((int) (timestampMillis % 1000L * 1000000L))
+                .build();
+    }
+}u}(j4  (5bb15c3125a289df669735841e1f8458ed9b3950jK5  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javajM5  addedjE5  KPjF5  K jO5  KPjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xe
  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+
+public class TextFormatUtil {
+
+    static void writeLong(OutputStreamWriter writer, long value) throws IOException {
+        writer.append(Long.toString(value));
+    }
+
+    static void writeDouble(OutputStreamWriter writer, double d) throws IOException {
+        if (d == Double.POSITIVE_INFINITY) {
+            writer.write("+Inf");
+        } else if (d == Double.NEGATIVE_INFINITY) {
+            writer.write("-Inf");
+        } else {
+            writer.write(Double.toString(d));
+            // FloatingDecimal.getBinaryToASCIIConverter(d).appendTo(writer);
+        }
+    }
+
+    static void writeTimestamp(OutputStreamWriter writer, long timestampMs) throws IOException {
+        writer.write(Long.toString(timestampMs / 1000L));
+        writer.write(".");
+        long ms = timestampMs % 1000;
+        if (ms < 100) {
+            writer.write("0");
+        }
+        if (ms < 10) {
+            writer.write("0");
+        }
+        writer.write(Long.toString(ms));
+    }
+
+    static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            switch (c) {
+                case '\\':
+                    writer.append("\\\\");
+                    break;
+                case '\"':
+                    writer.append("\\\"");
+                    break;
+                case '\n':
+                    writer.append("\\n");
+                    break;
+                default:
+                    writer.append(c);
+            }
+        }
+    }
+
+    static void writeLabels(OutputStreamWriter writer, Labels labels, String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write('{');
+        for (int i = 0; i < labels.size(); i++) {
+            if (i > 0) {
+                writer.write(",");
+            }
+            writer.write(labels.getName(i));
+            writer.write("=\"");
+            writeEscapedLabelValue(writer, labels.getValue(i));
+            writer.write("\"");
+        }
+        if (additionalLabelName != null) {
+            if (!labels.isEmpty()) {
+                writer.write(",");
+            }
+            writer.write(additionalLabelName);
+            writer.write("=\"");
+            writeDouble(writer, additionalLabelValue);
+            writer.write("\"");
+        }
+        writer.write('}');
+    }
+}u}(j4  (b351b6d5a74d51e4487d4c5661a9d6c1d723d2c5jK5  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protojM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,144 @@
+// Copyright 2013 Prometheus Team
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto2";
+
+package io.prometheus.client;
+option java_package = "io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7";
+option go_package = "github.com/prometheus/client_model/go;io_prometheus_client";
+
+import "google/protobuf/timestamp.proto";
+
+message LabelPair {
+  optional string name  = 1;
+  optional string value = 2;
+}
+
+enum MetricType {
+  // COUNTER must use the Metric field "counter".
+  COUNTER = 0;
+  // GAUGE must use the Metric field "gauge".
+  GAUGE = 1;
+  // SUMMARY must use the Metric field "summary".
+  SUMMARY = 2;
+  // UNTYPED must use the Metric field "untyped".
+  UNTYPED = 3;
+  // HISTOGRAM must use the Metric field "histogram".
+  HISTOGRAM = 4;
+  // GAUGE_HISTOGRAM must use the Metric field "histogram".
+  GAUGE_HISTOGRAM = 5;
+}
+
+message Gauge {
+  optional double value = 1;
+}
+
+message Counter {
+  optional double   value    = 1;
+  optional Exemplar exemplar = 2;
+}
+
+message Quantile {
+  optional double quantile = 1;
+  optional double value    = 2;
+}
+
+message Summary {
+  optional uint64   sample_count = 1;
+  optional double   sample_sum   = 2;
+  repeated Quantile quantile     = 3;
+}
+
+message Untyped {
+  optional double value = 1;
+}
+
+message Histogram {
+  optional uint64 sample_count       = 1;
+  optional double sample_count_float = 4; // Overrides sample_count if > 0.
+  optional double sample_sum         = 2;
+  // Buckets for the conventional histogram.
+  repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
+
+  // Everything below here is for native histograms (also known as sparse histograms).
+  // Native histograms are an experimental feature without stability guarantees.
+
+  // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
+  // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
+  // then each power of two is divided into 2^n logarithmic buckets.
+  // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
+  // In the future, more bucket schemas may be added using numbers < -4 or > 8.
+  optional sint32 schema           = 5;
+  optional double zero_threshold   = 6; // Breadth of the zero bucket.
+  optional uint64 zero_count       = 7; // Count in zero bucket.
+  optional double zero_count_float = 8; // Overrides sb_zero_count if > 0.
+
+  // Negative buckets for the native histogram.
+  repeated BucketSpan negative_span =  9;
+  // Use either "negative_delta" or "negative_count", the former for
+  // regular histograms with integer counts, the latter for float
+  // histograms.
+  repeated sint64 negative_delta    = 10; // Count delta of each bucket compared to previous one (or to zero for 1st bucket).
+  repeated double negative_count    = 11; // Absolute count of each bucket.
+
+  // Positive buckets for the native histogram.
+  repeated BucketSpan positive_span = 12;
+  // Use either "positive_delta" or "positive_count", the former for
+  // regular histograms with integer counts, the latter for float
+  // histograms.
+  repeated sint64 positive_delta    = 13; // Count delta of each bucket compared to previous one (or to zero for 1st bucket).
+  repeated double positive_count    = 14; // Absolute count of each bucket.
+}
+
+// A Bucket of a conventional histogram, each of which is treated as
+// an individual counter-like time series by Prometheus.
+message Bucket {
+  optional uint64   cumulative_count       = 1; // Cumulative in increasing order.
+  optional double   cumulative_count_float = 4; // Overrides cumulative_count if > 0.
+  optional double   upper_bound            = 2; // Inclusive.
+  optional Exemplar exemplar               = 3;
+}
+
+// A BucketSpan defines a number of consecutive buckets in a native
+// histogram with their offset. Logically, it would be more
+// straightforward to include the bucket counts in the Span. However,
+// the protobuf representation is more compact in the way the data is
+// structured here (with all the buckets in a single array separate
+// from the Spans).
+message BucketSpan {
+  optional sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative).
+  optional uint32 length = 2; // Length of consecutive buckets.
+}
+
+message Exemplar {
+  repeated LabelPair                 label     = 1;
+  optional double                    value     = 2;
+  optional google.protobuf.Timestamp timestamp = 3; // OpenMetrics-style.
+}
+
+message Metric {
+  repeated LabelPair label        = 1;
+  optional Gauge     gauge        = 2;
+  optional Counter   counter      = 3;
+  optional Summary   summary      = 4;
+  optional Untyped   untyped      = 5;
+  optional Histogram histogram    = 7;
+  optional int64     timestamp_ms = 6;
+}
+
+message MetricFamily {
+  optional string     name   = 1;
+  optional string     help   = 2;
+  optional MetricType type   = 3;
+  repeated Metric     metric = 4;
+}u}(j4  (233953e00da552de8ff77e414dbe85fca017c63fjK5  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajM5  addedjE5  MjF5  K jO5  MjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XI @@ -0,0 +1,1471 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+public class ExpositionFormatsTest {
+
+    private final String exemplar1String = "{env=\"prod\",span_id=\"12345\",trace_id=\"abcde\"} 1.7 1672850685.829";
+    private final String exemplar2String = "{env=\"dev\",span_id=\"23456\",trace_id=\"bcdef\"} 2.4 1672850685.830";
+
+    private final String exemplar1protoString = "exemplar { " +
+            "label { name: \"env\" value: \"prod\" } " +
+            "label { name: \"span_id\" value: \"12345\" } " +
+            "label { name: \"trace_id\" value: \"abcde\" } " +
+            "value: 1.7 " +
+            "timestamp { seconds: 1672850685 nanos: 829000000 } }";
+
+    private final String exemplar2protoString = "exemplar { " +
+            "label { name: \"env\" value: \"dev\" } " +
+            "label { name: \"span_id\" value: \"23456\" } " +
+            "label { name: \"trace_id\" value: \"bcdef\" } " +
+            "value: 2.4 " +
+            "timestamp { seconds: 1672850685 nanos: 830000000 } }";
+
+    private final String createdTimestamp1s = "1672850385.800";
+    private final long createdTimestamp1 = (long) (1000 * Double.parseDouble(createdTimestamp1s));
+    private final String createdTimestamp2s = "1672850285.000";
+    private final long createdTimestamp2 = (long) (1000 * Double.parseDouble(createdTimestamp2s));
+    private final String scrapeTimestamp1s = "1672850685.829";
+    private final long scrapeTimestamp1 = (long) (1000 * Double.parseDouble(scrapeTimestamp1s));
+    private final String scrapeTimestamp2s = "1672850585.820";
+    private final long scrapeTimestamp2 = (long) (1000 * Double.parseDouble(scrapeTimestamp2s));
+
+    private final Exemplar exemplar1 = Exemplar.newBuilder()
+            .withSpanId("12345")
+            .withTraceId("abcde")
+            .withLabels(Labels.of("env", "prod"))
+            .withValue(1.7)
+            .withTimestampMillis(1672850685829L)
+            .build();
+
+    private final Exemplar exemplar2 = Exemplar.newBuilder()
+            .withSpanId("23456")
+            .withTraceId("bcdef")
+            .withLabels(Labels.of("env", "dev"))
+            .withValue(2.4)
+            .withTimestampMillis(1672850685830L)
+            .build();
+
+    @Test
+    public void testCounterComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE service_time_seconds counter\n" +
+                "# UNIT service_time_seconds seconds\n" +
+                "# HELP service_time_seconds total time spent serving\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP service_time_seconds_total total time spent serving\n" +
+                "# TYPE service_time_seconds_total counter\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + "\n" +
+                "# HELP service_time_seconds_created total time spent serving\n" +
+                "# TYPE service_time_seconds_created gauge\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE service_time_seconds counter\n" +
+                "# UNIT service_time_seconds seconds\n" +
+                "# HELP service_time_seconds total time spent serving\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP service_time_seconds_total total time spent serving\n" +
+                "# TYPE service_time_seconds_total counter\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"service_time_seconds_total\" " +
+                "help: \"total time spent serving\" " +
+                "type: COUNTER " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/hello\" } " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "counter { " +
+                        "value: 0.8 " +
+                        exemplar1protoString + " " +
+                    "} " +
+                    "timestamp_ms: 1672850685829 " +
+                "} " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/hello\" } " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "counter { " +
+                        "value: 0.9 " +
+                        exemplar2protoString + " " +
+                    "} " +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("service_time_seconds")
+                .withHelp("total time spent serving")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(0.8)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .addLabel("status", "200")
+                                .build())
+                        .withExemplar(exemplar1)
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(0.9)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .addLabel("status", "500")
+                                .build())
+                        .withExemplar(exemplar2)
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, counter);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
+    @Test
+    public void testCounterMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_counter counter\n" +
+                "my_counter_total 1.1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE my_counter_total counter\n" +
+                "my_counter_total 1.1\n";
+        String prometheusProtobuf = "" +
+                "name: \"my_counter_total\" type: COUNTER metric { counter { value: 1.1 } }";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my_counter")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.1).build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, counter);
+        assertPrometheusTextWithoutCreated(prometheusText, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
+    @Test
+    public void testGaugeComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE disk_usage_ratio gauge\n" +
+                "# UNIT disk_usage_ratio ratio\n" +
+                "# HELP disk_usage_ratio percentage used\n" +
+                "disk_usage_ratio{device=\"/dev/sda1\"} 0.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "disk_usage_ratio{device=\"/dev/sda2\"} 0.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP disk_usage_ratio percentage used\n" +
+                "# TYPE disk_usage_ratio gauge\n" +
+                "disk_usage_ratio{device=\"/dev/sda1\"} 0.2 " + scrapeTimestamp1s + "\n" +
+                "disk_usage_ratio{device=\"/dev/sda2\"} 0.7 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"disk_usage_ratio\" " +
+                "help: \"percentage used\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"device\" value: \"/dev/sda1\" } " +
+                    "gauge { value: 0.2 } " +
+                    "timestamp_ms: 1672850685829 " +
+                "} metric { " +
+                    "label { name: \"device\" value: \"/dev/sda2\" } " +
+                    "gauge { value: 0.7 } " +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("disk_usage_ratio")
+                .withHelp("percentage used")
+                .withUnit(new Unit("ratio"))
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("device", "/dev/sda2")
+                                .build())
+                        .withExemplar(exemplar2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(0.2)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("device", "/dev/sda1")
+                                .build())
+                        .withExemplar(exemplar1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gauge);
+        assertPrometheusTextWithoutCreated(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
+    @Test
+    public void testGaugeMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE temperature_centigrade gauge\n" +
+                "temperature_centigrade 22.3\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE temperature_centigrade gauge\n" +
+                "temperature_centigrade 22.3\n";
+        String prometheusProtobuf = "" +
+                "name: \"temperature_centigrade\" type: GAUGE metric { gauge { value: 22.3 } }";
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("temperature_centigrade")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(22.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gauge);
+        assertPrometheusTextWithoutCreated(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
+    @Test
+    public void testSummaryComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "# UNIT http_request_duration_seconds seconds\n" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP http_request_duration_seconds_created request duration\n" +
+                "# TYPE http_request_duration_seconds_created gauge\n" +
+                "http_request_duration_seconds_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "# UNIT http_request_duration_seconds seconds\n" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"http_request_duration_seconds\" " +
+                "help: \"request duration\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "summary { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 1.2 " +
+                        "quantile { quantile: 0.5 value: 225.3 } " +
+                        "quantile { quantile: 0.9 value: 240.7 } " +
+                        "quantile { quantile: 0.95 value: 245.1 } " +
+                    "} " +
+                    "timestamp_ms: 1672850685829 " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "summary { " +
+                        "sample_count: 7 " +
+                        "sample_sum: 2.2 " +
+                        "quantile { quantile: 0.5 value: 225.3 } " +
+                        "quantile { quantile: 0.9 value: 240.7 } " +
+                        "quantile { quantile: 0.95 value: 245.1 } " +
+                    "} " + "" +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("http_request_duration_seconds")
+                .withHelp("request duration")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(7)
+                        .withSum(2.2)
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 225.3)
+                                .addQuantile(0.9, 240.7)
+                                .addQuantile(0.95, 245.1)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("status", "500")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(3)
+                        .withSum(1.2)
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 225.3)
+                                .addQuantile(0.9, 240.7)
+                                .addQuantile(0.95, 245.1)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("status", "200")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplar1))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, summary);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryWithoutQuantiles() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "# UNIT latency_seconds seconds\n" +
+                "# HELP latency_seconds latency\n" +
+                "latency_seconds_count 3\n" +
+                "latency_seconds_sum 1.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP latency_seconds latency\n" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 3\n" +
+                "latency_seconds_sum 1.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "help: \"latency\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 1.2 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(3)
+                        .withSum(1.2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryNoCountAndSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds{quantile=\"0.95\"} 200.0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds{quantile=\"0.95\"} 200.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "quantile { quantile: 0.95 value: 200.0 } " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withQuantiles(Quantiles.newBuilder().addQuantile(0.95, 200.0).build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryJustCount() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 1\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_count: 1 " +
+                    "} " +
+                "}";
+        //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryJustSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_sum 12.3\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_sum 12.3\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_sum: 12.3 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withSum(12.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryEmptyData() throws IOException {
+        // SummaryData can be present but empty (no count, no sum, no quantiles).
+        // This should be treated like no data is present.
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder().build())
+                .build();
+        assertOpenMetricsText("# EOF\n", summary);
+        assertPrometheusText("", summary);
+        assertOpenMetricsTextWithoutCreated("# EOF\n", summary);
+        assertPrometheusTextWithoutCreated("", summary);
+        assertPrometheusProtobuf("", summary);
+    }
+
+    @Test
+    public void testSummaryEmptyAndNonEmpty() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count{path=\"/v2\"} 2\n" +
+                "latency_seconds_sum{path=\"/v2\"} 10.7\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count{path=\"/v2\"} 2\n" +
+                "latency_seconds_sum{path=\"/v2\"} 10.7\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/v2\" } " +
+                    "summary { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 10.7 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v1"))
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v2"))
+                        .withCount(2)
+                        .withSum(10.7)
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testClassicHistogramComplete() throws Exception {
+        String openMetricsText = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP response_size_bytes_created help\n" +
+                "# TYPE response_size_bytes_created gauge\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"response_size_bytes\" " +
+                "help: \"help\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 4.1 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: 2.2 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 5 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: 0.0 " +
+                        "} bucket { " +
+                            "cumulative_count: 5 " +
+                            "upper_bound: 2.2 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 5 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("response_size_bytes")
+                .withHelp("help")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(0.0, 3)
+                                .addBucket(2.2, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build())
+                        .withLabels(Labels.of("status", "500"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(4.1)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.2, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 1)
+                                .build())
+                        .withLabels(Labels.of("status", "200"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, histogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicHistogramMinimal() throws Exception {
+        // In OpenMetrics a histogram can have a _count if and only if it has a _sum.
+        // In Prometheus format, a histogram can have a _count without a _sum.
+        String openMetricsText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"request_latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("request_latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 2)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, histogram);
+        assertPrometheusTextWithoutCreated(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicHistogramCountAndSum() throws Exception {
+        String openMetricsText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n" +
+                "request_latency_seconds_sum 3.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n" +
+                "request_latency_seconds_sum 3.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"request_latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("request_latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 2)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, histogram);
+        assertPrometheusTextWithoutCreated(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE cache_size_bytes gaugehistogram\n" +
+                "# UNIT cache_size_bytes bytes\n" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_created{db=\"items\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_created{db=\"options\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes histogram\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gcount number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gcount gauge\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gsum number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gsum gauge\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_created number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_created gauge\n" +
+                "cache_size_bytes_created{db=\"items\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_created{db=\"options\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE cache_size_bytes gaugehistogram\n" +
+                "# UNIT cache_size_bytes bytes\n" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes histogram\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gcount number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gcount gauge\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gsum number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gsum gauge\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"cache_size_bytes\" " +
+                "help: \"number of bytes in the cache\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"db\" value: \"items\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 17.0 " +
+                        "bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: 2.0 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"db\" value: \"options\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 18.0 " +
+                        "bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: 2.0 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("cache_size_bytes")
+                .withHelp("number of bytes in the cache")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(17)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.0, 3)
+                                .addBucket(Double.POSITIVE_INFINITY, 1)
+                                .build())
+                        .withLabels(Labels.of("db", "items"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(18)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.0, 4)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build()
+                        )
+                        .withLabels(Labels.of("db", "options"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramMinimal() throws IOException {
+        // In OpenMetrics a histogram can have a _count if and only if it has a _sum.
+        // In Prometheus format, a histogram can have a _count without a _sum.
+        String openMetricsText = "" +
+                "# TYPE queue_size_bytes gaugehistogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE queue_size_bytes histogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# TYPE queue_size_bytes_gcount gauge\n" +
+                "queue_size_bytes_gcount 130\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"queue_size_bytes\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "bucket { " +
+                            "cumulative_count: 130 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("queue_size_bytes")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusText, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramCountAndSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE queue_size_bytes gaugehistogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "queue_size_bytes_gcount 130\n" +
+                "queue_size_bytes_gsum 27000.0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE queue_size_bytes histogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# TYPE queue_size_bytes_gcount gauge\n" +
+                "queue_size_bytes_gcount 130\n" +
+                "# TYPE queue_size_bytes_gsum gauge\n" +
+                "queue_size_bytes_gsum 27000.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"queue_size_bytes\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "sample_sum: 27000.0 " +
+                        "bucket { " +
+                            "cumulative_count: 130 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("queue_size_bytes")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(27000)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusText, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testNativeHistogramComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP response_size_bytes_created help\n" +
+                "# TYPE response_size_bytes_created gauge\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"response_size_bytes\" " +
+                "help: \"help\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 4.2 " +
+                        "bucket { cumulative_count: 2 upper_bound: Infinity " + exemplar2protoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 0 " +
+                        "positive_span { offset: 0 length: 1 } " +
+                        "positive_delta: 2 " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 55 " + // bucket counts + zero count
+                        "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 55 upper_bound: Infinity " + exemplar2protoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 1 " +
+                        "negative_span { offset: 0 length: 1 } " +
+                        "negative_span { offset: 9 length: 1 } " +
+                        "negative_delta: 1 " +
+                        "negative_delta: -1 " + // span with count 0
+                        "positive_span { offset: 2 length: 3 } " + // span with 3 buckets (indexes 2-4)
+                        "positive_span { offset: 7 length: 1 } " + // span with 1 bucket (index 12)
+                        "positive_span { offset: 9 length: 4 } " + // span with gap of size 1 (indexes 22-25)
+                        "positive_span { offset: 6 length: 5 } " + // span with gap of size 2 (indexes 32-36)
+                        "positive_span { offset: 4 length: 2 } " + // span with gap of size 3 part 1 (indexes 41-42)
+                        "positive_span { offset: 3 length: 2 } " + // span with gap of size 3 part 2 (indexes 46-47)
+                        "positive_delta: 3 " + // index 2, count 3
+                        "positive_delta: 2 " + // index 3, count 5
+                        "positive_delta: -1 " + // index 4, count 4
+                        "positive_delta: 2 " + // index 12, count 6
+                        "positive_delta: -4 " + // index 22, count 2
+                        "positive_delta: -2 " + // index 23, gap
+                        "positive_delta: 1 " + // index 24, count 1
+                        "positive_delta: 2 " + // index 25, count 3
+                        "positive_delta: 1 " + // index 32, count 4
+                        "positive_delta: -1 " + // index 33, count 3
+                        "positive_delta: -3 " + // index 34, gap
+                        "positive_delta: 0 " + // index 35, gap
+                        "positive_delta: 7 " + // index 36, count 7
+                        "positive_delta: -4 " + // index 41, count 3
+                        "positive_delta: 6 " + // index 42, count 9
+                        "positive_delta: -7 " + // index 46, count 2
+                        "positive_delta: -1 " + // index 47, count 1
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
+                .withName("response_size_bytes")
+                .withHelp("help")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withNativeSchema(5)
+                        .withNativeZeroCount(1)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                // span with 3 buckets
+                                .addBucket(2, 3)
+                                .addBucket(3, 5)
+                                .addBucket(4, 4)
+                                // span with just 1 bucket
+                                .addBucket(12, 6)
+                                // span with gap of size 1
+                                .addBucket(22, 2)
+                                .addBucket(24, 1)
+                                .addBucket(25, 3)
+                                // span with gap of size 2
+                                .addBucket(32, 4)
+                                .addBucket(33, 3)
+                                .addBucket(36, 7)
+                                // span with gap of size 3
+                                .addBucket(41, 3)
+                                .addBucket(42, 9)
+                                .addBucket(46, 2)
+                                .addBucket(47, 1)
+                                .build())
+                        .withNativeBucketsForNegativeValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(0, 1)
+                                .addBucket(10, 0) // bucket with count 0
+                                .build())
+                        .withLabels(Labels.of("status", "500"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(4.2)
+                        .withNativeSchema(5)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(0, 2)
+                                .build())
+                        .withLabels(Labels.of("status", "200"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, nativeHistogram);
+        assertPrometheusText(prometheusText, nativeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, nativeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, nativeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
+    }
+
+    @Test
+    public void testNativeHistogramMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds histogram\n" +
+                "latency_seconds_bucket{le=\"+Inf\"} 0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds histogram\n" +
+                "latency_seconds_bucket{le=\"+Inf\"} 0\n" +
+                "latency_seconds_count 0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 0 " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 0 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withNativeSchema(5)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, nativeHistogram);
+        assertPrometheusText(prometheusText, nativeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
+    }
+
+    // TODO: Gauge Native Histogram
+
+    @Test
+    public void testInfo() throws IOException {
+        String openMetrics = "" +
+                "# TYPE version info\n" +
+                "# HELP version version information\n" +
+                "version_info{version=\"1.2.3\"} 1\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP version_info version information\n" +
+                "# TYPE version_info gauge\n" +
+                "version_info{version=\"1.2.3\"} 1\n";
+        InfoSnapshot info = InfoSnapshot.newBuilder()
+                .withName("version")
+                .withHelp("version information")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("version", "1.2.3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, info);
+        assertPrometheusText(prometheus, info);
+        assertOpenMetricsTextWithoutCreated(openMetrics, info);
+        assertPrometheusTextWithoutCreated(prometheus, info);
+    }
+
+    @Test
+    public void testStateSetComplete() throws IOException {
+        String openMetrics = "" +
+                "# TYPE state stateset\n" +
+                "# HELP state complete state set example\n" +
+                "state{env=\"dev\",state=\"state1\"} 1 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"dev\",state=\"state2\"} 0 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"prod\",state=\"state1\"} 0 " + scrapeTimestamp2s + "\n" +
+                "state{env=\"prod\",state=\"state2\"} 1 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP state complete state set example\n" +
+                "# TYPE state gauge\n" +
+                "state{env=\"dev\",state=\"state1\"} 1 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"dev\",state=\"state2\"} 0 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"prod\",state=\"state1\"} 0 " + scrapeTimestamp2s + "\n" +
+                "state{env=\"prod\",state=\"state2\"} 1 " + scrapeTimestamp2s + "\n";
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("state")
+                .withHelp("complete state set example")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("env", "prod"))
+                        .addState("state1", false)
+                        .addState("state2", true)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("env", "dev"))
+                        .addState("state2", false)
+                        .addState("state1", true)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, stateSet);
+        assertPrometheusText(prometheus, stateSet);
+        assertOpenMetricsTextWithoutCreated(openMetrics, stateSet);
+        assertPrometheusTextWithoutCreated(prometheus, stateSet);
+    }
+
+    @Test
+    public void testStateSetMinimal() throws IOException {
+        String openMetrics = "" +
+                "# TYPE state stateset\n" +
+                "state{state=\"a\"} 1\n" +
+                "state{state=\"bb\"} 0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE state gauge\n" +
+                "state{state=\"a\"} 1\n" +
+                "state{state=\"bb\"} 0\n";
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("state")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("a", true)
+                        .addState("bb", false)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, stateSet);
+        assertPrometheusText(prometheus, stateSet);
+        assertOpenMetricsTextWithoutCreated(openMetrics, stateSet);
+        assertPrometheusTextWithoutCreated(prometheus, stateSet);
+    }
+
+    @Test
+    public void testUnknownComplete() throws IOException {
+        String openMetrics = "" +
+                "# TYPE my_special_thing_bytes unknown\n" +
+                "# UNIT my_special_thing_bytes bytes\n" +
+                "# HELP my_special_thing_bytes help message\n" +
+                "my_special_thing_bytes{env=\"dev\"} 0.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "my_special_thing_bytes{env=\"prod\"} 0.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP my_special_thing_bytes help message\n" +
+                "# TYPE my_special_thing_bytes untyped\n" +
+                "my_special_thing_bytes{env=\"dev\"} 0.2 " + scrapeTimestamp1s + "\n" +
+                "my_special_thing_bytes{env=\"prod\"} 0.7 " + scrapeTimestamp2s + "\n";
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("my_special_thing_bytes")
+                .withHelp("help message")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.of("env", "prod"))
+                        .withExemplar(exemplar2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.2)
+                        .withLabels(Labels.of("env", "dev"))
+                        .withExemplar(exemplar1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertOpenMetricsTextWithoutCreated(openMetrics, unknown);
+        assertPrometheusTextWithoutCreated(prometheus, unknown);
+    }
+
+    @Test
+    public void testUnknownMinimal() throws IOException {
+        String openMetrics = "" +
+                "# TYPE other unknown\n" +
+                "other 22.3\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE other untyped\n" +
+                "other 22.3\n";
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("other")
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(22.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertOpenMetricsTextWithoutCreated(openMetrics, unknown);
+        assertPrometheusTextWithoutCreated(prometheus, unknown);
+    }
+
+    @Test
+    public void testHelpEscape() throws IOException {
+        String openMetrics = "" +
+                "# TYPE test counter\n" +
+                "# HELP test Some text and \\n some \\\" escaping\n" +
+                "test_total 1.0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP test_total Some text and \\n some \" escaping\n" +
+                "# TYPE test_total counter\n" +
+                "test_total 1.0\n";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("test")
+                .withHelp("Some text and \n some \" escaping") // example from https://openMetrics.io
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        assertOpenMetricsText(openMetrics, counter);
+        assertPrometheusText(prometheus, counter);
+        assertOpenMetricsTextWithoutCreated(openMetrics, counter);
+        assertPrometheusTextWithoutCreated(prometheus, counter);
+    }
+
+    @Test
+    public void testLabelValueEscape() throws IOException {
+        String openMetrics = "" +
+                "# TYPE test counter\n" +
+                "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE test_total counter\n" +
+                "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("test")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        // example from https://openMetrics.io
+                        .withLabels(Labels.of("a", "x", "b", "escaping\" example \n "))
+                        .withValue(1.0)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, counter);
+        assertPrometheusText(prometheus, counter);
+    }
+
+    private void assertOpenMetricsText(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertOpenMetricsTextWithoutCreated(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusText(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        PrometheusTextFormatWriter writer = new PrometheusTextFormatWriter(true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusTextWithoutCreated(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        PrometheusTextFormatWriter writer = new PrometheusTextFormatWriter(false);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusProtobuf(String expected, MetricSnapshot snapshot) {
+        PrometheusProtobufWriter writer = new PrometheusProtobufWriter();
+        Metrics.MetricFamily protobufData = writer.convert(snapshot);
+        String actual = TextFormat.printer().shortDebugString(protobufData);
+        Assert.assertEquals(expected, actual);
+    }
+}G     u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  7prometheus-metrics-exposition-formats/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-exposition-formats%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (b1f06cc23e5501051fb14030bbfe6061380605b6jK5   prometheus-metrics-model/pom.xmljM5  addedjE5  K-jF5  K jO5  K-jP5  zhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fpom.xmljR5  yhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-model</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Model</name>
+    <description>
+        Data model for read-only immutable Prometheus metrics snapshots.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j4  (b0fba2db102eb9c6ff775289363c8832f7f2ecddjK5  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajM5  addedjE5  K*jF5  K jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+
+/**
+ * To be registered with the Prometheus collector registry.
+ * See <i>Overall Structure</i> on
+ * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
+ */
+@FunctionalInterface
+public interface Collector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshot collect();
+
+    /**
+     * Like {@link #collect()}, but returns {@code null} if {@code includedNames.test(name)} is {@code false}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting the snapshot and then discarding it.
+     */
+    default MetricSnapshot collect(Predicate<String> includedNames) {
+        MetricSnapshot result = collect();
+        if (includedNames.test(result.getMetadata().getName())) {
+            return result;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     */
+    default String getName() {
+        return collect().getMetadata().getName();
+    }
+}u}(j4  (e8e8c16217461086dd173575795e6e8f6e4a01c5jK5  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MetricNameFilter.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,196 @@
+package io.prometheus.metrics.model.registry;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.function.Predicate;
+
+import static java.util.Collections.unmodifiableCollection;
+
+/**
+ * Filter samples (i.e. time series) by name.
+ */
+public class MetricNameFilter implements Predicate<String> {
+
+    /**
+     * For convenience, a filter that allows all names.
+     */
+    public static final Predicate<String> ALLOW_ALL = name -> true;
+
+    private final Collection<String> nameIsEqualTo;
+    private final Collection<String> nameIsNotEqualTo;
+    private final Collection<String> nameStartsWith;
+    private final Collection<String> nameDoesNotStartWith;
+
+    private MetricNameFilter(Collection<String> nameIsEqualTo, Collection<String> nameIsNotEqualTo, Collection<String> nameStartsWith, Collection<String> nameDoesNotStartWith) {
+        this.nameIsEqualTo = unmodifiableCollection(new ArrayList<>(nameIsEqualTo));
+        this.nameIsNotEqualTo = unmodifiableCollection(new ArrayList<>(nameIsNotEqualTo));
+        this.nameStartsWith = unmodifiableCollection(new ArrayList<>(nameStartsWith));
+        this.nameDoesNotStartWith = unmodifiableCollection(new ArrayList<>(nameDoesNotStartWith));
+    }
+
+    @Override
+    public boolean test(String sampleName) {
+        return matchesNameEqualTo(sampleName)
+                && !matchesNameNotEqualTo(sampleName)
+                && matchesNameStartsWith(sampleName)
+                && !matchesNameDoesNotStartWith(sampleName);
+    }
+
+    private boolean matchesNameEqualTo(String metricName) {
+        if (nameIsEqualTo.isEmpty()) {
+            return true;
+        }
+        for (String name : nameIsEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameNotEqualTo(String metricName) {
+        if (nameIsNotEqualTo.isEmpty()) {
+            return false;
+        }
+        for (String name : nameIsNotEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameStartsWith(String metricName) {
+        if (nameStartsWith.isEmpty()) {
+            return true;
+        }
+        for (String prefix : nameStartsWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameDoesNotStartWith(String metricName) {
+        if (nameDoesNotStartWith.isEmpty()) {
+            return false;
+        }
+        for (String prefix : nameDoesNotStartWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final Collection<String> nameEqualTo = new ArrayList<>();
+        private final Collection<String> nameNotEqualTo = new ArrayList<>();
+        private final Collection<String> nameStartsWith = new ArrayList<>();
+        private final Collection<String> nameDoesNotStartWith = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        /**
+         * @see #nameMustBeEqualTo(Collection)
+         */
+        public Builder nameMustBeEqualTo(String... names) {
+            return nameMustBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * Only samples with one of the {@code names} will be included.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to retrieve all samples from a histogram, you must include the
+         * '_count', '_sum' and '_bucket' names.
+         * <p>
+         * This method should be used by HTTP exporters to implement the {@code ?name[]=} URL parameters.
+         *
+         * @param names empty means no restriction.
+         */
+        public Builder nameMustBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotBeEqualTo(Collection)
+         */
+        public Builder nameMustNotBeEqualTo(String... names) {
+            return nameMustNotBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * All samples that are not in {@code names} will be excluded.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to exclude all samples from a histogram, you must exclude the
+         * '_count', '_sum' and '_bucket' names.
+         *
+         * @param names empty means no name will be excluded.
+         */
+        public Builder nameMustNotBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameNotEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustStartWith(Collection)
+         */
+        public Builder nameMustStartWith(String... prefixes) {
+            return nameMustStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Only samples whose name starts with one of the {@code prefixes} will be included.
+         *
+         * @param prefixes empty means no restriction.
+         */
+        public Builder nameMustStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameStartsWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotStartWith(Collection)
+         */
+        public Builder nameMustNotStartWith(String... prefixes) {
+            return nameMustNotStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Samples with names starting with one of the {@code prefixes} will be excluded.
+         *
+         * @param prefixes empty means no time series will be excluded.
+         */
+        public Builder nameMustNotStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameDoesNotStartWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        public MetricNameFilter build() {
+            return new MetricNameFilter(nameEqualTo, nameNotEqualTo, nameStartsWith, nameDoesNotStartWith);
+        }
+    }
+}u}(j4  (3fd56e493c24336d9109940b2c061941ed86590djK5  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javajM5  addedjE5  K,jF5  K jO5  K,jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XO  @@ -0,0 +1,44 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * Like {@link Collector}, but collecting multiple Snapshots at once.
+ */
+@FunctionalInterface
+public interface MultiCollector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshots collect();
+
+    /**
+     * Like {@link #collect()}, but returns only the snapshots where {@code includedNames.test(name)} is {@code true}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting all snapshot and then discarding the excluded ones.
+     */
+    default MetricSnapshots collect(Predicate<String> includedNames) {
+        MetricSnapshots allSnapshots = collect();
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (MetricSnapshot snapshot : allSnapshots) {
+            if (includedNames.test(snapshot.getMetadata().getName())) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    /**
+     * Override this and return an empty list if the MultiCollector does not return a constant list of names
+     * (names may be added / removed between scrapes).
+     */
+    default List<String> getNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    }
+}u}(j4  (858a1b37d71776c535fe1d3ec15dedf3d9e79ca1jK5  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajM5  addedjE5  K_jF5  K jO5  K_jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,95 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.function.Predicate;
+
+public class PrometheusRegistry {
+
+    public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
+
+    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final List<Collector> collectors = new CopyOnWriteArrayList<>();
+    private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
+
+    public void register(Collector collector) {
+        String name = collector.getName();
+        if (!names.add(name)) {
+            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        }
+        collectors.add(collector);
+    }
+
+    public void register(MultiCollector collector) {
+        for (String name : collector.getNames()) {
+            if (!names.add(name)) {
+                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+            }
+        }
+        multiCollectors.add(collector);
+    }
+
+    public void unregister(Collector collector) {
+        collectors.remove(collector);
+        names.remove(collector.getName());
+    }
+
+    public void unregister(MultiCollector collector) {
+        multiCollectors.remove(collector);
+        for (String name : collector.getNames()) {
+            names.remove(name);
+        }
+    }
+
+    public MetricSnapshots scrape() {
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            result.addMetricSnapshot(collector.collect());
+        }
+        for (MultiCollector collector : multiCollectors) {
+            for (MetricSnapshot snapshot : collector.collect()) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    public MetricSnapshots scrape(Predicate<String> includedNames) {
+        if (includedNames == null) {
+            return scrape();
+        }
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            String name = collector.getName();
+            if (name == null || includedNames.test(name)) {
+                MetricSnapshot snapshot = collector.collect(includedNames);
+                if (snapshot != null) {
+                    result.addMetricSnapshot(snapshot);
+                }
+            }
+        }
+        for (MultiCollector collector : multiCollectors) {
+            List<String> names = collector.getNames();
+            boolean excluded = true; // the multi-collector is excluded unless at least one name matches
+            for (String name : names) {
+                if (includedNames.test(name)) {
+                    excluded = false;
+                    break;
+                }
+            }
+            if (!excluded) {
+                for (MetricSnapshot snapshot : collector.collect(includedNames)) {
+                    if (snapshot != null) {
+                        result.addMetricSnapshot(snapshot);
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+}u}(j4  (6ca2f90ec13b9342a600f207a28dad041ebedd23jK5  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucket.javajM5  addedjE5  K*jF5  K jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X>  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Helper class for iterating over {@link ClassicHistogramBuckets}.
+ * Note that the {@code count} is <i>not</i> cumulative.
+ */
+public class ClassicHistogramBucket implements Comparable<ClassicHistogramBucket> {
+
+    private final long count; // not cumulative
+    private final double upperBound;
+
+    public ClassicHistogramBucket(double upperBound, long count) {
+        this.count = count;
+        this.upperBound = upperBound;
+        if (Double.isNaN(upperBound)) {
+            throw new IllegalArgumentException("Cannot use NaN as an upper bound for a histogram bucket");
+        }
+        if (count < 0) {
+            throw new IllegalArgumentException(count + ": " + ClassicHistogramBuckets.class.getSimpleName() + " cannot have a negative count");
+        }
+    }
+
+    public long getCount() {
+        return count;
+    }
+
+    public double getUpperBound() {
+        return upperBound;
+    }
+
+    /**
+     * For sorting a list of buckets by upper bound.
+     */
+    @Override
+    public int compareTo(ClassicHistogramBucket other) {
+        int result = Double.compare(upperBound, other.upperBound);
+        if (result != 0) {
+            return result;
+        }
+        return Long.compare(count, other.count);
+    }
+}u}(j4  (cd20eb4e873decfca673399bdedf94d06ba15597jK5  iprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBuckets.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XT&  @@ -0,0 +1,223 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable container for histogram buckets with fixed bucket boundaries.
+ * Note that the counts are <i>not</i> cumulative.
+ */
+public class ClassicHistogramBuckets implements Iterable<ClassicHistogramBucket> {
+
+    /**
+     * Used in native histograms to indicate that no classic histogram buckets are present.
+     */
+    public static final ClassicHistogramBuckets EMPTY = new ClassicHistogramBuckets(new double[]{}, new long[]{});
+
+    private final double[] upperBounds;
+    private final long[] counts; // not cumulative
+
+    private ClassicHistogramBuckets(double[] upperBounds, long[] counts) {
+        this.upperBounds = upperBounds;
+        this.counts = counts;
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    For each count, {@link Number#longValue()} is called to get the value.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(List<Double> upperBounds, List<? extends Number> counts) {
+        double[] upperBoundsCopy = new double[upperBounds.size()];
+        for (int i = 0; i < upperBounds.size(); i++) {
+            upperBoundsCopy[i] = upperBounds.get(i);
+        }
+        long[] countsCopy = new long[counts.size()];
+        for (int i = 0; i < counts.size(); i++) {
+            countsCopy[i] = counts.get(i).longValue();
+        }
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    For each count, {@link Number#longValue()} is called to get the value.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(double[] upperBounds, Number[] counts) {
+        double[] upperBoundsCopy = Arrays.copyOf(upperBounds, upperBounds.length);
+        long[] countsCopy = new long[counts.length];
+        for (int i = 0; i < counts.length; i++) {
+            countsCopy[i] = counts[i].longValue();
+        }
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(double[] upperBounds, long[] counts) {
+        double[] upperBoundsCopy = Arrays.copyOf(upperBounds, upperBounds.length);
+        long[] countsCopy = Arrays.copyOf(counts, counts.length);
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    private static void sortAndValidate(double[] upperBounds, long[] counts) {
+        if (upperBounds.length != counts.length) {
+            throw new IllegalArgumentException("upperBounds.length == " + upperBounds.length + " but counts.length == " + counts.length + ". Expected the same length.");
+        }
+        sort(upperBounds, counts);
+        validate(upperBounds, counts);
+    }
+
+    private static void sort(double[] upperBounds, long[] counts) {
+        // Bubblesort. Should be efficient here as in most cases upperBounds is already sorted.
+        int n = upperBounds.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (upperBounds[j] > upperBounds[j + 1]) {
+                    swap(j, j + 1, upperBounds, counts);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, double[] upperBounds, long[] counts) {
+        double tmpDouble = upperBounds[j];
+        upperBounds[j] = upperBounds[i];
+        upperBounds[i] = tmpDouble;
+        long tmpLong = counts[j];
+        counts[j] = counts[i];
+        counts[i] = tmpLong;
+    }
+
+    private static void validate(double[] upperBounds, long[] counts) {
+        // Preconditions:
+        // * upperBounds sorted
+        // * upperBounds and counts have the same length
+        if (upperBounds.length == 0) {
+            throw new IllegalArgumentException(ClassicHistogramBuckets.class.getSimpleName() + " cannot be empty. They must contain at least the +Inf bucket.");
+        }
+        if (upperBounds[upperBounds.length - 1] != Double.POSITIVE_INFINITY) {
+            throw new IllegalArgumentException(ClassicHistogramBuckets.class.getSimpleName() + " must contain the +Inf bucket.");
+        }
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (Double.isNaN(upperBounds[i])) {
+                throw new IllegalArgumentException("Cannot use NaN as an upper bound in " + ClassicHistogramBuckets.class.getSimpleName());
+            }
+            if (counts[i] < 0) {
+                throw new IllegalArgumentException("Counts in " + ClassicHistogramBuckets.class.getSimpleName() + " cannot be negative.");
+            }
+            if (i > 0) {
+                if (upperBounds[i - 1] == upperBounds[i]) {
+                    throw new IllegalArgumentException("Duplicate upper bound " + upperBounds[i]);
+                }
+            }
+        }
+    }
+
+    public int size() {
+        return upperBounds.length;
+    }
+
+    public double getUpperBound(int i) {
+        return upperBounds[i];
+    }
+
+    /**
+     * The count is <i>not</i> cumulative.
+     */
+    public long getCount(int i) {
+        return counts[i];
+    }
+
+    public boolean isEmpty() {
+        return this.upperBounds.length == 0;
+    }
+
+    private List<ClassicHistogramBucket> asList() {
+        List<ClassicHistogramBucket> result = new ArrayList<>(size());
+        for (int i = 0; i < upperBounds.length; i++) {
+            result.add(new ClassicHistogramBucket(upperBounds[i], counts[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public Iterator<ClassicHistogramBucket> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<ClassicHistogramBucket> stream() {
+        return asList().stream();
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@code newBuilder()}.
+     */
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private final List<Double> upperBounds = new ArrayList<>();
+        private final List<Long> counts = new ArrayList<>();
+
+        private Builder() {}
+
+        /**
+         * Must be called at least once for the {@link Double#POSITIVE_INFINITY} bucket.
+         */
+        public Builder addBucket(double upperBound, long count) {
+            upperBounds.add(upperBound);
+            counts.add(count);
+            return this;
+        }
+
+        /**
+         * Will throw an {@link IllegalArgumentException} if the {@link Double#POSITIVE_INFINITY} bucket is missing.
+         */
+        public ClassicHistogramBuckets build() {
+            return ClassicHistogramBuckets.of(upperBounds, counts);
+        }
+    }
+}u}(j4  (e994e951357da20776fd49fd0f3f5decf502c078jK5  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,148 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Counter.
+ */
+public class CounterSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link CounterSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link CounterSnapshot#newBuilder()}.
+     *
+     * @param metadata the metric name in metadata must not include the {@code _total} suffix.
+     *                 See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public CounterSnapshot(MetricMetadata metadata, Collection<CounterDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<CounterDataPointSnapshot> getData() {
+        return (List<CounterDataPointSnapshot>) data;
+    }
+
+    public static class CounterDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link CounterDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link CounterDataPointSnapshot#newBuilder()}.
+         *
+         * @param value                  the counter value. Must not be negative.
+         * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar               may be null.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                               (this specific set of labels) was created (or reset to zero).
+         *                               It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
+            this(value, labels, exemplar, createdTimestampMillis, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
+            super(labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+            validate();
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May be {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        protected void validate() {
+            if (value < 0.0) {
+                throw new IllegalArgumentException(value + ": counters cannot have a negative value");
+            }
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+            private long createdTimestampMillis = 0L;
+
+            private Builder() {
+            }
+
+            /**
+             * Counter value. This is required. The value must not be negative.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public Builder withCreatedTimestampMillis(long createdTimestampMillis) {
+                this.createdTimestampMillis = createdTimestampMillis;
+                return this;
+            }
+
+            public CounterDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new CounterDataPointSnapshot(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<CounterDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(CounterDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public CounterSnapshot build() {
+            return new CounterSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (b4241e2e4263f7038abcb79d763ca090f48176cfjK5  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DataPointSnapshot.javajM5  addedjE5  KRjF5  K jO5  KRjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.snapshots;
+
+public abstract class DataPointSnapshot {
+    private final Labels labels;
+    private final long createdTimestampMillis;
+    private final long scrapeTimestampMillis;
+
+    protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+        this.labels = labels;
+        this.createdTimestampMillis = createdTimestampMillis;
+        this.scrapeTimestampMillis = scrapeTimestampMillis;
+        validate();
+    }
+
+    private void validate() {
+        if (labels == null) {
+            throw new IllegalArgumentException("Labels cannot be null. Use Labels.EMPTY if there are no labels.");
+        }
+        if (createdTimestampMillis < 0) {
+            throw new IllegalArgumentException("Created timestamp cannot be negative. Use 0 if the metric doesn't have a created timestamp.");
+        }
+        if (scrapeTimestampMillis < 0) {
+            throw new IllegalArgumentException("Scrape timestamp cannot be negative. Use 0 to indicate that the Prometheus server should set the scrape timestamp.");
+        }
+        if (hasCreatedTimestamp() && hasScrapeTimestamp()) {
+            if (scrapeTimestampMillis < createdTimestampMillis) {
+                throw new IllegalArgumentException("The scrape timestamp cannot be before the created timestamp");
+            }
+        }
+    }
+
+    public Labels getLabels() {
+        return labels;
+    }
+
+    public boolean hasScrapeTimestamp() {
+        return scrapeTimestampMillis != 0L;
+    }
+
+    /**
+     * This will only return a reasonable value if {@link #hasScrapeTimestamp()} is true.
+     */
+    public long getScrapeTimestampMillis() {
+        return scrapeTimestampMillis;
+    }
+
+    public boolean hasCreatedTimestamp() {
+        return createdTimestampMillis != 0L;
+    }
+
+    /**
+     * This will only return a reasonable value if {@link #hasCreatedTimestamp()} is true.
+     * Some metrics like Gauge don't have created timestamps. For these metrics {@link #hasCreatedTimestamp()}
+     * is always false.
+     */
+    public long getCreatedTimestampMillis() {
+        return createdTimestampMillis;
+    }
+
+    public static abstract class Builder<T extends Builder<T>> {
+
+        protected Labels labels = Labels.EMPTY;
+        protected long scrapeTimestampMillis = 0L;
+
+        public T withLabels(Labels labels) {
+            this.labels = labels;
+            return self();
+        }
+
+        /**
+         * In most cases you should not need to set a timestamp, because the timestamp of a Prometheus metric should
+         * usually be set by the Prometheus server during scraping.
+         * Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public T withScrapeTimestampMillis(long scrapeTimestampMillis) {
+            this.scrapeTimestampMillis = scrapeTimestampMillis;
+            return self();
+        }
+
+        protected abstract T self();
+    }
+}u}(j4  (5536f01e9ad09822a4a631ba235a552fbb238d3bjK5  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javajM5  addedjE5  KYjF5  K jO5  KYjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X}  @@ -0,0 +1,89 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Common base class for histogram and summary data.
+ * Histograms and Summaries represent distributions, like a latency distribution or a distribution
+ * of request sizes in Bytes.
+ */
+public abstract class DistributionDataPointSnapshot extends DataPointSnapshot {
+    private final long count; // optional, negative value means no count.
+    private final double sum; // optional, Double.NaN means no sum.
+    private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.
+
+    /**
+     * See JavaDoc of the child classes.
+     */
+    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+        super(labels, createdTimestampMillis, scrapeTimestampMillis);
+        this.count = count;
+        this.sum = sum;
+        this.exemplars = exemplars == null ? Exemplars.EMPTY : exemplars;
+        validate();
+    }
+
+    private void validate() {
+        // If a histogram or summary observes negative values the sum could be negative.
+        // According to OpenMetrics sum should be omitted in that case, but we don't enforce this here.
+    }
+
+    public boolean hasCount() {
+        return count >= 0;
+    }
+
+    public boolean hasSum() {
+        return !Double.isNaN(sum);
+    }
+
+    /**
+     * This will return garbage if {@link #hasCount()} is {@code false}.
+     */
+    public long getCount() {
+        return count;
+    }
+
+    /**
+     * This will return garbage if {@link #hasSum()} is {@code false}.
+     */
+    public double getSum() {
+        return sum;
+    }
+
+    /**
+     * May be {@link Exemplars#EMPTY}, but will never be {@code null}.
+     */
+    public Exemplars getExemplars() {
+        return exemplars;
+    }
+
+    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {
+
+        protected long count = -1;
+        protected double sum = Double.NaN;
+        protected long createdTimestampMillis = 0L;
+        protected Exemplars exemplars = Exemplars.EMPTY;
+
+        /**
+         * Count can be explicitly set on summaries (this is a public method for summary metrics),
+         * and it is set implicitly on histograms (derived from the bucket counts).
+         */
+        protected T withCount(long count) {
+            this.count = count;
+            return self();
+        }
+
+        public T withSum(double sum) {
+            this.sum = sum;
+            return self();
+        }
+
+        public T withExemplars(Exemplars exemplars) {
+            this.exemplars = exemplars;
+            return self();
+        }
+
+        public T withCreatedTimestampMillis(long createdTimestampMillis) {
+            this.createdTimestampMillis = createdTimestampMillis;
+            return self();
+        }
+    }
+}u}(j4  (c9865aac5db7099759f9ccfcad05e3309cd1d938jK5  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplar.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,129 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Immutable representation of an Exemplar.
+ */
+public class Exemplar {
+
+    /**
+     * Label name for trace id.
+     */
+    public static final String TRACE_ID = "trace_id";
+
+    /**
+     * Label name for span id.
+     */
+    public static final String SPAN_ID = "span_id";
+
+    private final double value;
+    private final Labels labels;
+    private final long timestampMillis;
+
+    /**
+     * To create a new {@link Exemplar}, you can either call the constructor directly
+     * or use the Builder with {@link Exemplar#newBuilder()}.
+     *
+     * @param value           the observed value. This is required.
+     * @param labels          in most cases the labels will contain the {@link #TRACE_ID} and {@link #SPAN_ID}.
+     *                        Must not be {@code null}. Use {@link Labels#EMPTY} if no labels are present.
+     * @param timestampMillis timestamp when the value was observed. Optional. Use 0L if not available.
+     */
+    public Exemplar(double value, Labels labels, long timestampMillis) {
+        if (labels == null) {
+            throw new NullPointerException("Labels cannot be null. Use Labels.EMPTY.");
+        }
+        this.value = value;
+        this.labels = labels;
+        this.timestampMillis = timestampMillis;
+    }
+
+    public double getValue() {
+        return value;
+    }
+
+    /**
+     * In most cases labels will contain {@link #TRACE_ID} and {@link #SPAN_ID}, but this is not required.
+     * May be {@link Labels#EMPTY}, but may not be {@code null}.
+     */
+    public Labels getLabels() {
+        return labels;
+    }
+
+    public boolean hasTimestamp() {
+        return timestampMillis != 0L;
+    }
+
+    /**
+     * Will return garbage if {@link #hasTimestamp()} is {@code false}.
+     */
+    public long getTimestampMillis() {
+        return timestampMillis;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Double value = null;
+        private Labels labels = Labels.EMPTY;
+        private String traceId = null;
+        private String spanId = null;
+        private long timestampMillis = 0L;
+
+        private Builder() {
+        }
+
+        public Builder withValue(double value) {
+            this.value = value;
+            return this;
+        }
+
+        public Builder withTraceId(String traceId) {
+            this.traceId = traceId;
+            return this;
+        }
+
+        public Builder withSpanId(String spanId) {
+            this.spanId = spanId;
+            return this;
+        }
+
+        public Builder withLabels(Labels labels) {
+            if (labels == null) {
+                throw new NullPointerException();
+            }
+            this.labels = labels;
+            return this;
+        }
+
+        public Builder withTimestampMillis(long timestampMillis) {
+            this.timestampMillis = timestampMillis;
+            return this;
+        }
+
+        /**
+         * @throws IllegalStateException if {@link #withValue(double)} wasn't called.
+         */
+        public Exemplar build() {
+            if (value == null) {
+                throw new IllegalStateException("cannot build an Exemplar without a value");
+            }
+            Labels allLabels;
+            if (traceId != null && spanId != null) {
+                allLabels = Labels.of(TRACE_ID, traceId, SPAN_ID, spanId);
+            } else if (traceId != null) {
+                allLabels = Labels.of(TRACE_ID, traceId);
+            } else if (spanId != null) {
+                allLabels = Labels.of(SPAN_ID, spanId);
+            } else {
+                allLabels = Labels.EMPTY;
+            }
+            if (!labels.isEmpty()) {
+                allLabels = allLabels.merge(labels);
+            }
+            return new Exemplar(value, allLabels, timestampMillis);
+        }
+    }
+}u}(j4  (641d0e57325f2ceb316a457179337d7b13e47e7bjK5  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplars.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,128 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Immutable container for Exemplars.
+ * <p>
+ * This is currently backed by a {@code List<Exemplar>}. May be refactored later to use a more efficient data structure.
+ */
+public class Exemplars implements Iterable<Exemplar> {
+
+    /**
+     * EMPTY means no Exemplars.
+     */
+    public static final Exemplars EMPTY = new Exemplars(Collections.emptyList());
+    private final List<Exemplar> exemplars;
+
+    private Exemplars(Collection<Exemplar> exemplars) {
+        this.exemplars = Collections.unmodifiableList(new ArrayList<>(exemplars));
+    }
+
+    /**
+     * Create a new Exemplars instance.
+     * You can either create Exemplars with one of the static {@code Exemplars.of(...)} methods,
+     * or you can use the {@link Exemplars#newBuilder()}.
+     *
+     * @param exemplars a copy of the exemplars collection will be created.
+     */
+    public static Exemplars of(Collection<Exemplar> exemplars) {
+        return new Exemplars(exemplars);
+    }
+
+    /**
+     * Create a new Exemplars instance.
+     * You can either create Exemplars with one of the static {@code Exemplars.of(...)} methods,
+     * or you can use the {@link Exemplars#newBuilder()}.
+     *
+     * @param exemplars a copy of the exemplars array will be created.
+     */
+    public static Exemplars of(Exemplar... exemplars) {
+        return new Exemplars(Arrays.asList(exemplars));
+    }
+
+    @Override
+    public Iterator<Exemplar> iterator() {
+        return exemplars.iterator();
+    }
+
+    public int size() {
+        return exemplars.size();
+    }
+
+    public Exemplar get(int index) {
+        return exemplars.get(index);
+    }
+
+    /**
+     * This is used by classic histograms to find an exemplar with a value between lowerBound and upperBound.
+     */
+    public Exemplar get(double lowerBound, double upperBound) {
+        for (int i = 0; i < exemplars.size(); i++) {
+            Exemplar exemplar = exemplars.get(i);
+            double value = exemplar.getValue();
+            if (value > lowerBound && value <= upperBound) {
+                return exemplar;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Find the Exemplar with the newest timestamp. May return {@code null}.
+     */
+    public Exemplar getLatest() {
+        Exemplar latest = null;
+        for (int i=0; i<exemplars.size(); i++) {
+            Exemplar candidate = exemplars.get(i);
+            if (candidate == null) {
+                continue;
+            }
+            if (latest == null) {
+                latest = candidate;
+                continue;
+            }
+            if (!latest.hasTimestamp()) {
+                latest = candidate;
+                continue;
+            }
+            if (candidate.hasTimestamp()) {
+                if (latest.getTimestampMillis() < candidate.getTimestampMillis()) {
+                    latest = candidate;
+                }
+            }
+        }
+        return latest;
+    }
+
+    public static class Builder {
+
+        private final ArrayList<Exemplar> exemplars = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addExemplar(Exemplar exemplar) {
+            exemplars.add(exemplar);
+            return this;
+        }
+
+        public Builder addExemplars(List<Exemplar> exemplars) {
+            this.exemplars.addAll(exemplars);
+            return this;
+        }
+
+        public Exemplars build() {
+            return Exemplars.of(exemplars);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (54c033d3446b3a08aba32e148fbe212295210a05jK5  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,134 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Gauge.
+ */
+public final class GaugeSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link GaugeSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link GaugeSnapshot#newBuilder()}.
+     *
+     * @param metadata see {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<GaugeDataPointSnapshot> getData() {
+        return (List<GaugeDataPointSnapshot>) data;
+    }
+
+    public static final class GaugeDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link GaugeDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link GaugeDataPointSnapshot#newBuilder()}.
+         *
+         * @param value    the gauge value.
+         * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar may be null.
+         */
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
+            this(value, labels, exemplar, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May be {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+
+            private Builder() {
+            }
+
+            /**
+             * Gauge value. This is required.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            /**
+             * Optional
+             */
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public GaugeDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new GaugeDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(GaugeDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public GaugeSnapshot build() {
+            return new GaugeSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (860b291c7fb65b8bb730cd4b8af049df89ab350djK5  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javajM5  addedjE5  MjF5  K jO5  MjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XS  @@ -0,0 +1,397 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Histogram.
+ */
+public final class HistogramSnapshot extends MetricSnapshot {
+
+    private final boolean gaugeHistogram;
+    public static final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
+
+    /**
+     * To create a new {@link HistogramSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link HistogramSnapshot#newBuilder()}.
+     *
+     * @param metadata see {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
+        this(false, metadata, data);
+    }
+
+    /**
+     * Use this with the first parameter {@code true} to create a snapshot of a Gauge Histogram.
+     * The data model for Gauge Histograms is the same as for regular histograms, except that bucket values
+     * are semantically gauges and not counters.
+     * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
+     */
+    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
+        super(metadata, data);
+        this.gaugeHistogram = isGaugeHistogram;
+    }
+
+    public boolean isGaugeHistogram() {
+        return gaugeHistogram;
+    }
+
+    @Override
+    public List<HistogramDataPointSnapshot> getData() {
+        return (List<HistogramDataPointSnapshot>) data;
+    }
+
+    public static final class HistogramDataPointSnapshot extends DistributionDataPointSnapshot {
+
+        // There are two types of histograms: Classic histograms and native histograms.
+        // Classic histograms have a fixed set of buckets.
+        // Native histograms have "infinitely many" buckets with exponentially growing boundaries.
+        // The OpenTelemetry terminology for native histogram is "exponential histogram".
+        // ---
+        // A histogram can be a classic histogram (indicated by nativeSchema == CLASSIC_HISTOGRAM),
+        // or a native histogram (indicated by classicBuckets == ClassicHistogramBuckets.EMPTY),
+        // or both.
+        // ---
+        // A histogram that is both classic and native is great for migrating from classic histograms
+        // to native histograms: Old Prometheus servers can still scrape the classic histogram, while
+        // new Prometheus servers can scrape the native histogram.
+
+        private final ClassicHistogramBuckets classicBuckets; // May be ClassicHistogramBuckets.EMPTY for native histograms.
+        private final int nativeSchema; // Number in [-4, 8]. May be CLASSIC_HISTOGRAM for classic histograms.
+        private final long nativeZeroCount; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final double nativeZeroThreshold; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final NativeHistogramBuckets nativeBucketsForPositiveValues; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final NativeHistogramBuckets nativeBucketsForNegativeValues; // only used if nativeSchema != CLASSIC_HISTOGRAM
+
+        /**
+         * Constructor for classic histograms (as opposed to native histograms).
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param classicBuckets         required. Must not be empty. Must at least contain the +Inf bucket.
+         * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
+         * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars              must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                               (this specific set of labels) was created (or reset to zero).
+         *                               It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(classicBuckets, CLASSIC_HISTOGRAM, 0, 0, NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor for native histograms (as opposed to classic histograms).
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
+         * @param nativeZeroCount                number of observed zero values (zero is special because there is no
+         *                                       histogram bucket for zero values).
+         * @param nativeZeroThreshold            observations in [-zeroThreshold, +zeroThreshold] are treated as zero.
+         *                                       This is to avoid creating a large number of buckets if observations fluctuate around zero.
+         * @param nativeBucketsForPositiveValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param nativeBucketsForNegativeValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param sum                            sum of all observed values. Optional, use {@link Double#NaN} if not available.
+         * @param labels                         must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars                      must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis         timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                                       (this specific set of labels) was created (or reset to zero).
+         *                                       It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(ClassicHistogramBuckets.EMPTY, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor for a histogram with both, classic and native data.
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param classicBuckets                 required. Must not be empty. Must at least contain the +Inf bucket.
+         * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
+         * @param nativeZeroCount                number of observed zero values (zero is special because there is no
+         *                                       histogram bucket for zero values).
+         * @param nativeZeroThreshold            observations in [-zeroThreshold, +zeroThreshold] are treated as zero.
+         *                                       This is to avoid creating a large number of buckets if observations fluctuate around zero.
+         * @param nativeBucketsForPositiveValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param nativeBucketsForNegativeValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param sum                            sum of all observed values. Optional, use {@link Double#NaN} if not available.
+         * @param labels                         must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars                      must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis         timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                                       (this specific set of labels) was created (or reset to zero).
+         *                                       It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(classicBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis,
+                long scrapeTimestampMillis) {
+            super(calculateCount(classicBuckets, nativeSchema, nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues), sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.classicBuckets = classicBuckets;
+            this.nativeSchema = nativeSchema;
+            this.nativeZeroCount = nativeSchema == CLASSIC_HISTOGRAM ? 0 : nativeZeroCount;
+            this.nativeZeroThreshold = nativeSchema == CLASSIC_HISTOGRAM ? 0 : nativeZeroThreshold;
+            this.nativeBucketsForPositiveValues = nativeSchema == CLASSIC_HISTOGRAM ? NativeHistogramBuckets.EMPTY : nativeBucketsForPositiveValues;
+            this.nativeBucketsForNegativeValues = nativeSchema == CLASSIC_HISTOGRAM ? NativeHistogramBuckets.EMPTY : nativeBucketsForNegativeValues;
+            validate();
+        }
+
+        private static long calculateCount(ClassicHistogramBuckets classicBuckets, int nativeSchema, long nativeZeroCount, NativeHistogramBuckets nativeBucketsForPositiveValues, NativeHistogramBuckets nativeBucketsForNegativeValues) {
+            if (classicBuckets.isEmpty()) {
+                // This is a native histogram
+                return calculateNativeCount(nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues);
+            } else if (nativeSchema == CLASSIC_HISTOGRAM) {
+                // This is a classic histogram
+                return calculateClassicCount(classicBuckets);
+            } else {
+                // This is both, a native and a classic histogram. Count should be the same for both.
+                long classicCount = calculateClassicCount(classicBuckets);
+                long nativeCount = calculateNativeCount(nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues);
+                if (classicCount != nativeCount) {
+                    throw new IllegalArgumentException("Inconsistent observation count: If a histogram has both classic and native data the observation count must be the same. Classic count is " + classicCount + " but native count is " + nativeCount + ".");
+                }
+                return classicCount;
+            }
+        }
+
+        private static long calculateClassicCount(ClassicHistogramBuckets classicBuckets) {
+            long count = 0;
+            for (int i = 0; i < classicBuckets.size(); i++) {
+                count += classicBuckets.getCount(i);
+            }
+            return count;
+        }
+
+        private static long calculateNativeCount(long nativeZeroCount, NativeHistogramBuckets nativeBucketsForPositiveValues, NativeHistogramBuckets nativeBucketsForNegativeValues) {
+            long count = nativeZeroCount;
+            for (int i = 0; i < nativeBucketsForNegativeValues.size(); i++) {
+                count += nativeBucketsForNegativeValues.getCount(i);
+            }
+            for (int i = 0; i < nativeBucketsForPositiveValues.size(); i++) {
+                count += nativeBucketsForPositiveValues.getCount(i);
+            }
+            return count;
+        }
+
+        public boolean hasClassicHistogramData() {
+            return !classicBuckets.isEmpty();
+        }
+
+        public boolean hasNativeHistogramData() {
+            return nativeSchema != CLASSIC_HISTOGRAM;
+        }
+
+        /**
+         * Will return garbage if {@link #hasClassicHistogramData()} is {@code false}.
+         */
+        public ClassicHistogramBuckets getClassicBuckets() {
+            return classicBuckets;
+        }
+
+        /**
+         * The schema defines the scale of the native histogram, i.g. the granularity of the buckets.
+         * Current supported values are -4 &lt;= schema &lt;= 8.
+         * See {@link NativeHistogramBuckets} for more info.
+         * This will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public int getNativeSchema() {
+            return nativeSchema;
+        }
+
+        /**
+         * Number of observed zero values.
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public long getNativeZeroCount() {
+            return nativeZeroCount;
+        }
+
+        /**
+         * All observations in [-nativeZeroThreshold; +nativeZeroThreshold] are treated as zero.
+         * This is useful to avoid creation of a large number of buckets if observations fluctuate around zero.
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public double getNativeZeroThreshold() {
+            return nativeZeroThreshold;
+        }
+
+        /**
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public NativeHistogramBuckets getNativeBucketsForPositiveValues() {
+            return nativeBucketsForPositiveValues;
+        }
+
+        /**
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public NativeHistogramBuckets getNativeBucketsForNegativeValues() {
+            return nativeBucketsForNegativeValues;
+        }
+
+        private void validate() {
+            for (Label label : getLabels()) {
+                if (label.getName().equals("le")) {
+                    throw new IllegalArgumentException("le is a reserved label name for histograms");
+                }
+            }
+            if (nativeSchema == CLASSIC_HISTOGRAM && classicBuckets.isEmpty()) {
+                throw new IllegalArgumentException("Histogram buckets cannot be empty, must at least have the +Inf bucket.");
+            }
+            if (nativeSchema != CLASSIC_HISTOGRAM) {
+                if (nativeSchema < -4 || nativeSchema > 8) {
+                    throw new IllegalArgumentException(nativeSchema + ": illegal schema. Expecting number in [-4, 8].");
+                }
+                if (nativeZeroCount < 0) {
+                    throw new IllegalArgumentException(nativeZeroCount + ": nativeZeroCount cannot be negative");
+                }
+                if (Double.isNaN(nativeZeroThreshold) || nativeZeroThreshold < 0) {
+                    throw new IllegalArgumentException(nativeZeroThreshold + ": illegal nativeZeroThreshold. Must be >= 0.");
+                }
+            }
+        }
+
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
+
+            private ClassicHistogramBuckets classicHistogramBuckets = ClassicHistogramBuckets.EMPTY;
+            private int nativeSchema = CLASSIC_HISTOGRAM;
+            private long nativeZeroCount = 0;
+            private double nativeZeroThreshold = 0;
+            private NativeHistogramBuckets nativeBucketsForPositiveValues = NativeHistogramBuckets.EMPTY;
+            private NativeHistogramBuckets nativeBucketsForNegativeValues = NativeHistogramBuckets.EMPTY;
+
+            private Builder() {
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public Builder withClassicHistogramBuckets(ClassicHistogramBuckets classicBuckets) {
+                this.classicHistogramBuckets = classicBuckets;
+                return this;
+            }
+
+            public Builder withNativeSchema(int nativeSchema) {
+                this.nativeSchema = nativeSchema;
+                return this;
+            }
+
+            public Builder withNativeZeroCount(long zeroCount) {
+                this.nativeZeroCount = zeroCount;
+                return this;
+            }
+
+            public Builder withNativeZeroThreshold(double zeroThreshold) {
+                this.nativeZeroThreshold = zeroThreshold;
+                return this;
+            }
+
+            public Builder withNativeBucketsForPositiveValues(NativeHistogramBuckets bucketsForPositiveValues) {
+                this.nativeBucketsForPositiveValues = bucketsForPositiveValues;
+                return this;
+            }
+
+            public Builder withNativeBucketsForNegativeValues(NativeHistogramBuckets bucketsForNegativeValues) {
+                this.nativeBucketsForNegativeValues = bucketsForNegativeValues;
+                return this;
+            }
+
+            public HistogramDataPointSnapshot build() {
+                if (nativeSchema == CLASSIC_HISTOGRAM && classicHistogramBuckets.isEmpty()) {
+                    throw new IllegalArgumentException("One of nativeSchema and classicHistogramBuckets is required.");
+                }
+                return new HistogramDataPointSnapshot(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<HistogramDataPointSnapshot> dataPoints = new ArrayList<>();
+        private boolean isGaugeHistogram = false;
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(HistogramDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        /**
+         * Create a Gauge Histogram. The data model for Gauge Histograms is the same as for regular histograms,
+         * except that bucket values are semantically gauges and not counters.
+         * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
+         */
+        public Builder asGaugeHistogram() {
+            isGaugeHistogram = true;
+            return this;
+        }
+
+        public HistogramSnapshot build() {
+            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u     }(j4  (b49e0d1218825153dfc81322aded933ad9b73ce4jK5  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajM5  addedjE5  KhjF5  K jO5  KhjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,104 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of an Info metric.
+ */
+public final class InfoSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link InfoSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link InfoSnapshot#newBuilder()}.
+     *
+     * @param metadata the metric name in metadata must not include the {@code _info} suffix.
+     *                 See {@link MetricMetadata} for more naming conventions.
+     *                 The metadata must not have a unit.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
+        super(metadata, data);
+        if (metadata.getName().endsWith("_info")) {
+            throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
+        }
+        if (metadata.hasUnit()) {
+            throw new IllegalArgumentException("An Info metric cannot have a unit.");
+        }
+    }
+
+    @Override
+    public List<InfoDataPointSnapshot> getData() {
+        return (List<InfoDataPointSnapshot>) data;
+    }
+
+    public static class InfoDataPointSnapshot extends DataPointSnapshot {
+
+        /**
+         * To create a new {@link InfoDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link InfoDataPointSnapshot#newBuilder()}.
+         *
+         * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         */
+        public InfoDataPointSnapshot(Labels labels) {
+            this(labels, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public InfoDataPointSnapshot(Labels labels, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            public InfoDataPointSnapshot build() {
+                return new InfoDataPointSnapshot(labels, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<InfoDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(InfoDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        @Override
+        public Builder withUnit(Unit unit) {
+            throw new IllegalArgumentException("Info metric cannot have a unit.");
+        }
+
+        public InfoSnapshot build() {
+            return new InfoSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (c31a8b1af0581223dd974d8b6f9675b2b931dfb3jK5  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Label.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,28 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Utility for iterating over {@link Labels}.
+ */
+public final class Label implements Comparable<Label> {
+
+    private final String name;
+    private final String value;
+
+    public Label(String name, String value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    @Override
+    public int compareTo(Label other) {
+        int nameCompare = name.compareTo(other.name);
+        return nameCompare != 0 ? nameCompare : value.compareTo(other.value);
+    }
+}u}(j4  (8f9d36ea43c443a1ed5e36c88c8352b0493496dajK5  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javajM5  addedjE5  MljF5  K jO5  MljP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X33  @@ -0,0 +1,364 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.stream.Stream;
+
+/**
+ * Immutable set of name/value pairs, sorted by name.
+ */
+public class Labels implements Comparable<Labels>, Iterable<Label> {
+
+    public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
+    private static final Pattern LABEL_NAME_RE = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
+
+    private final String[] names; // sorted
+    private final String[] values;
+
+    private Labels(String[] names, String[] values) {
+        // names and values are already sorted and validated
+        this.names = names;
+        this.values = values;
+    }
+
+    public boolean isEmpty() {
+        return this == EMPTY || this.equals(EMPTY);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param keyValuePairs as in {@code {name1, value1, name2, value2}}. Length must be even.
+     *                      {@link #isValidLabelName(String)} must be true for each name.
+     *                      Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid
+     *                      label names. Label names must be unique (no duplicate label names).
+     */
+    public static Labels of(String... keyValuePairs) {
+        if (keyValuePairs.length % 2 != 0) {
+            throw new IllegalArgumentException("Key/value pairs must have an even length");
+        }
+        if (keyValuePairs.length == 0) {
+            return EMPTY;
+        }
+        String[] names = new String[keyValuePairs.length / 2];
+        String[] values = new String[keyValuePairs.length / 2];
+        for (int i = 0; 2 * i < keyValuePairs.length; i++) {
+            names[i] = keyValuePairs[2 * i];
+            values[i] = keyValuePairs[2 * i + 1];
+        }
+        return Labels.of(names, values);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
+     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
+     *               Label names must be unique (no duplicate label names).
+     * @param values label values. names.size() must be equal to values.size().
+     */
+    public static Labels of(List<String> names, List<String> values) {
+        if (names.size() != values.size()) {
+            throw new IllegalArgumentException("Names and values must have the same size.");
+        }
+        if (names.size() == 0) {
+            return EMPTY;
+        }
+        String[] namesCopy = names.toArray(new String[0]);
+        String[] valuesCopy = values.toArray(new String[0]);
+        sortAndValidate(namesCopy, valuesCopy);
+        return new Labels(namesCopy, valuesCopy);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
+     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
+     *               Label names must be unique (no duplicate label names).
+     * @param values label values. names.length must be equal to values.length.
+     */
+    public static Labels of(String[] names, String[] values) {
+        if (names.length != values.length) {
+            throw new IllegalArgumentException("Names and values must have the same length.");
+        }
+        if (names.length == 0) {
+            return EMPTY;
+        }
+        String[] namesCopy = Arrays.copyOf(names, names.length);
+        String[] valuesCopy = Arrays.copyOf(values, values.length);
+        sortAndValidate(namesCopy, valuesCopy);
+        return new Labels(namesCopy, valuesCopy);
+    }
+
+    /**
+     * Test if these labels contain a specific label name.
+     */
+    public boolean contains(String labelName) {
+        for (String name : names) {
+            if (name.equals(labelName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static void sortAndValidate(String[] names, String[] values) {
+        sort(names, values);
+        validateNames(names);
+    }
+
+    private static void validateNames(String[] names) {
+        for (int i = 0; i < names.length; i++) {
+            if (!isValidLabelName(names[i])) {
+                throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
+            }
+            if (i > 0 && names[i - 1].equals(names[i])) {
+                throw new IllegalArgumentException(names[i] + ": duplicate label name");
+            }
+        }
+    }
+
+    private static void sort(String[] names, String[] values) {
+        // bubblesort :)
+        int n = names.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (names[j].compareTo(names[j + 1]) > 0) {
+                    swap(j, j + 1, names, values);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, String[] names, String[] values) {
+        String tmp = names[j];
+        names[j] = names[i];
+        names[i] = tmp;
+        tmp = values[j];
+        values[j] = values[i];
+        values[i] = tmp;
+    }
+
+    public static boolean isValidLabelName(String name) {
+        return LABEL_NAME_RE.matcher(name).matches() && !name.startsWith("__");
+    }
+
+    /**
+     * Convert arbitrary label names to valid Prometheus label names.
+     */
+    public static String sanitizeLabelName(String labelName) {
+        String result = MetricMetadata.sanitizeMetricName(labelName);
+        while (result.startsWith("__")) {
+            result = result.substring(1);
+        }
+        return result;
+    }
+
+    @Override
+    public Iterator<Label> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<Label> stream() {
+        return asList().stream();
+    }
+
+    public int size() {
+        return names.length;
+    }
+
+    public String getName(int i) {
+        return names[i];
+    }
+
+    public String getValue(int i) {
+        return values[i];
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the labels of other.
+     * This and other must not contain the same label name.
+     */
+    public Labels merge(Labels other) {
+        String[] names = new String[this.names.length + other.names.length];
+        String[] values = new String[names.length];
+        int thisPos = 0;
+        int otherPos = 0;
+        while (thisPos + otherPos < names.length) {
+            if (thisPos >= this.names.length) {
+                names[thisPos + otherPos] = other.names[otherPos];
+                values[thisPos + otherPos] = other.values[otherPos];
+                otherPos++;
+            } else if (otherPos >= other.names.length) {
+                names[thisPos + otherPos] = this.names[thisPos];
+                values[thisPos + otherPos] = this.values[thisPos];
+                thisPos++;
+            } else if (this.names[thisPos].compareTo(other.names[otherPos]) < 0) {
+                names[thisPos + otherPos] = this.names[thisPos];
+                values[thisPos + otherPos] = this.values[thisPos];
+                thisPos++;
+            } else if (this.names[thisPos].compareTo(other.names[otherPos]) > 0) {
+                names[thisPos + otherPos] = other.names[otherPos];
+                values[thisPos + otherPos] = other.values[otherPos];
+                otherPos++;
+            } else {
+                throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
+            }
+        }
+        return new Labels(names, values);
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the label passed as name and value.
+     * The label name must not already be contained in this Labels instance.
+     */
+    public Labels add(String name, String value) {
+        return merge(Labels.of(name, value));
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the labels passed as names and values.
+     * The new label names must not already be contained in this Labels instance.
+     */
+    public Labels merge(String[] names, String[] values) {
+        if (this.equals(EMPTY)) {
+            return Labels.of(names, values);
+        }
+        String[] mergedNames = new String[this.names.length + names.length];
+        String[] mergedValues = new String[this.values.length + values.length];
+        System.arraycopy(this.names, 0, mergedNames, 0, this.names.length);
+        System.arraycopy(this.values, 0, mergedValues, 0, this.values.length);
+        System.arraycopy(names, 0, mergedNames, this.names.length, names.length);
+        System.arraycopy(values, 0, mergedValues, this.values.length, values.length);
+        sortAndValidate(mergedNames, mergedValues);
+        return new Labels(mergedNames, mergedValues);
+    }
+
+    public boolean hasSameNames(Labels other) {
+        return Arrays.equals(names, other.names);
+    }
+
+    public boolean hasSameValues(Labels other) {
+        return Arrays.equals(values, other.values);
+    }
+
+    @Override
+    public int compareTo(Labels other) {
+        int result = compare(names, other.names);
+        if (result != 0) {
+            return result;
+        }
+        return compare(values, other.values);
+    }
+
+    // Looks like Java doesn't have a compareTo() method for arrays.
+    private int compare(String[] array1, String[] array2) {
+        int result;
+        for (int i = 0; i < array1.length; i++) {
+            if (array2.length <= i) {
+                return 1;
+            }
+            result = array1[i].compareTo(array2[i]);
+            if (result != 0) {
+                return result;
+            }
+        }
+        if (array2.length > array1.length) {
+            return -1;
+        }
+        return 0;
+    }
+
+    private List<Label> asList() {
+        List<Label> result = new ArrayList<>(names.length);
+        for (int i = 0; i < names.length; i++) {
+            result.add(new Label(names[i], values[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder b = new StringBuilder();
+        b.append("{");
+        for (int i = 0; i < names.length; i++) {
+            if (i > 0) {
+                b.append(",");
+            }
+            b.append(names[i]);
+            b.append("=\"");
+            appendEscapedLabelValue(b, values[i]);
+            b.append("\"");
+        }
+        b.append("}");
+        return b.toString();
+    }
+
+    private void appendEscapedLabelValue(StringBuilder b, String value) {
+        for (int i = 0; i < value.length(); i++) {
+            char c = value.charAt(i);
+            switch (c) {
+                case '\\':
+                    b.append("\\\\");
+                    break;
+                case '\"':
+                    b.append("\\\"");
+                    break;
+                case '\n':
+                    b.append("\\n");
+                    break;
+                default:
+                    b.append(c);
+            }
+        }
+    }
+
+    // as labels are sorted by name, equals is insensitive to the order
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        Labels labels = (Labels) o;
+        return Arrays.equals(names, labels.names) && Arrays.equals(values, labels.values);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = Arrays.hashCode(names);
+        result = 31 * result + Arrays.hashCode(values);
+        return result;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private final List<String> names = new ArrayList<>();
+        private final List<String> values = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addLabel(String name, String value) {
+            names.add(name);
+            values.add(value);
+            return this;
+        }
+
+        public Labels build() {
+            return Labels.of(names, values);
+        }
+    }
+}u}(j4  (c8fd3e1b2a1e2b03c2ff0ae3d0aa128fd1cbe221jK5  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,168 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.regex.Pattern;
+
+/**
+ * Immutable container for metric metadata: name, help, unit.
+ */
+public final class MetricMetadata {
+    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
+    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
+    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
+    // * Micrometer: jvm_buffer_count
+    // * OpenTelemetry: process_runtime_jvm_buffer_count
+    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
+    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
+    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
+
+    /**
+     * Name is the name without suffix.
+     * For example, the name for a counter "http_requests_total" is "http_requests".
+     * The name of an info called "target_info" is "target".
+     * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
+     */
+    private final String name;
+    private final String help;
+    private final Unit unit;
+
+    /**
+     * See {@link #MetricMetadata(String, String, Unit)}
+     */
+    public MetricMetadata(String name) {
+        this(name, null, null);
+    }
+
+    /**
+     * See {@link #MetricMetadata(String, String, Unit)}
+     */
+    public MetricMetadata(String name, String help) {
+        this(name, help, null);
+    }
+
+    /**
+     * Naming conventions:
+     * <ul>
+     *     <li>The name MUST NOT include the {@code _total} suffix for counter metrics or the
+     *         {@code _info} suffix for info metrics.
+     *         If in doubt, use {@link #sanitizeMetricName(String)} to remove the suffix.</li>
+     *     <li>If name is {@code null}, a {@link NullPointerException} is thrown.</li>
+     *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
+     *         an {@link IllegalArgumentException} is thrown.
+     *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
+     *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
+     *         <pre>
+     *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
+     *         </pre>
+     *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
+     *     <li>The name MUST NOT contain the {@code _total} or {@code _created} suffixes for counters,
+     *         the {@code _count}, {@code _sum}, or {@code _created} suffixes for summaries,
+     *         the {@code _count}, {@code _sum}, {@code _bucket}, or {@code _created} suffixes for classic histograms,
+     *         the {@code _gcount}, {@code _gsum}, {@code _bucket} suffixes for classic gauge histograms,
+     *         or the {@code _info} suffix for info metrics.</li>
+     * </ul>
+     *
+     * @param name must follow the naming conventions described above.
+     * @param help optional. May be {@code null}.
+     * @param unit optional. May be {@code null}.
+     */
+    public MetricMetadata(String name, String help, Unit unit) {
+        this.name = name;
+        this.help = help;
+        this.unit = unit;
+        validate();
+    }
+
+    /**
+     * The name does not include the {@code _total} suffix for counter metrics
+     * or the {@code _info} suffix for Info metrics.
+     */
+    public String getName() {
+        return name;
+    }
+
+    public String getHelp() {
+        return help;
+    }
+
+    public boolean hasUnit() {
+        return unit != null;
+    }
+
+    public Unit getUnit() {
+        return unit;
+    }
+
+    private void validate() {
+        if (name == null) {
+            throw new IllegalArgumentException("Missing required field: name is null");
+        }
+        if (!isValidMetricName(name)) {
+            throw new IllegalArgumentException("'" + name + "': illegal metric name");
+        }
+    }
+
+    /**
+     * Test if a metric name is valid. Rules:
+     * <ul>
+     * <li>The name must match {@link #METRIC_NAME_RE}.</li>
+     * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
+     * </ul>
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
+     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but this library does not enforce Unit
+     * suffixes).
+     * <p>
+     * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
+     * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
+     * values: {@code processing_time_seconds_total} for the counter value, and the optional
+     * {@code processing_time_seconds_created} timestamp.
+     * <p>
+     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
+     */
+    public static boolean isValidMetricName(String name) {
+        for (String reservedSuffix : RESERVED_SUFFIXES) {
+            if (name.endsWith(reservedSuffix)) {
+                return false;
+            }
+        }
+        return METRIC_NAME_RE.matcher(name).matches();
+    }
+
+    /**
+     * Convert arbitrary metric names to valid Prometheus metric names.
+     */
+    public static String sanitizeMetricName(String metricName) {
+        if (metricName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string into a valid metric name.");
+        }
+        int length = metricName.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = metricName.charAt(i);
+            if (ch == ':' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        String sanitizedString = new String(sanitized);
+        boolean modified = true;
+        while (modified) {
+            modified = false;
+            for (String reservedSuffix : RESERVED_SUFFIXES) {
+                if (sanitizedString.equals(reservedSuffix)) {
+                    // This is for the corner case when you call sanitizeMetricName("_total").
+                    // In that case the result will be "total".
+                    return reservedSuffix.substring(1);
+                }
+                if (sanitizedString.endsWith(reservedSuffix)) {
+                    sanitizedString = sanitizedString.substring(0, sanitizedString.length() - reservedSuffix.length());
+                    modified = true;
+                }
+            }
+        }
+        return sanitizedString;
+    }
+}u}(j4  (5108c3bd041c3dd2d07541d5b3946adc2f06876djK5  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajM5  addedjE5  KRjF5  K jO5  KRjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X
  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * Base class for metric snapshots.
+ */
+public abstract class MetricSnapshot {
+
+    private final MetricMetadata metadata;
+    protected final List<? extends DataPointSnapshot> data;
+
+    protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
+        this(metadata, Arrays.asList(data));
+    }
+
+    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
+        this.metadata = metadata;
+        if (data == null) {
+            throw new NullPointerException();
+        }
+        List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
+        dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
+        this.data = Collections.unmodifiableList(dataCopy);
+        validateLabels();
+    }
+
+    public MetricMetadata getMetadata() {
+        return metadata;
+    }
+
+    public abstract List<? extends DataPointSnapshot> getData();
+
+    protected void validateLabels() {
+        // Verify that labels are unique (the same set of names/values must not be used multiple times for the same metric).
+        for (int i = 0; i < data.size() - 1; i++) {
+            if (data.get(i).getLabels().equals(data.get(i + 1).getLabels())) {
+                throw new IllegalArgumentException("Duplicate labels in metric data: " + data.get(i).getLabels());
+            }
+        }
+        // Should we verify that all entries in data have the same label names?
+        // No. They should have the same label names, but according to OpenMetrics this is not a MUST.
+    }
+
+    public static abstract class Builder<T extends Builder<T>> {
+
+        private String name;
+        private String help;
+        private Unit unit;
+
+        /**
+         * The name is required.
+         * If the name is missing or invalid, {@code build()} will throw an {@link IllegalArgumentException}.
+         * See {@link MetricMetadata#isValidMetricName(String)} for info on valid metric names.
+         */
+        public T withName(String name) {
+            this.name = name;
+            return self();
+        }
+
+        public T withHelp(String help) {
+            this.help = help;
+            return self();
+        }
+
+        public T withUnit(Unit unit) {
+            this.unit = unit;
+            return self();
+        }
+
+        protected MetricMetadata buildMetadata() {
+            return new MetricMetadata(name, help, unit);
+        }
+
+        protected abstract T self();
+    }
+}u}(j4  (98200461feaab64ff0e98b76200cf345b2d6e7c2jK5  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javajM5  addedjE5  KbjF5  K jO5  KbjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X<  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+import static java.util.Collections.unmodifiableList;
+import static java.util.Comparator.comparing;
+
+/**
+ * Immutable list of metric snapshots.
+ */
+public class MetricSnapshots implements Iterable<MetricSnapshot> {
+
+    private final List<MetricSnapshot> snapshots;
+
+    /**
+     * See {@link #MetricSnapshots(Collection)}
+     */
+    public MetricSnapshots(MetricSnapshot... snapshots) {
+        this(Arrays.asList(snapshots));
+    }
+
+    /**
+     * To create MetricSnapshots, you can either call the constructor directly
+     * or use {@link #newBuilder()}.
+     *
+     * @param snapshots the constructor creates a sorted copy of snapshots.
+     * @throws IllegalArgumentException if snapshots contains duplicate metric names.
+     *                                  To avoid duplicate metric names use {@link #newBuilder()} and check
+     *                                  {@link Builder#containsMetricName(String)} before calling
+     *                                  {@link Builder#addMetricSnapshot(MetricSnapshot)}.
+     */
+    public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
+        List<MetricSnapshot> list = new ArrayList<>(snapshots);
+        list.sort(comparing(s -> s.getMetadata().getName()));
+        for (int i = 0; i < snapshots.size() - 1; i++) {
+            if (list.get(i).getMetadata().getName().equals(list.get(i + 1).getMetadata().getName())) {
+                throw new IllegalArgumentException(list.get(i).getMetadata().getName() + ": duplicate metric name");
+            }
+        }
+        this.snapshots = unmodifiableList(list);
+    }
+
+    public static MetricSnapshots of(MetricSnapshot... snapshots) {
+        return new MetricSnapshots(snapshots);
+    }
+
+    @Override
+    public Iterator<MetricSnapshot> iterator() {
+        return snapshots.iterator();
+    }
+
+    public int size() {
+        return snapshots.size();
+    }
+
+    public MetricSnapshot get(int i) {
+        return snapshots.get(i);
+    }
+
+    public Stream<MetricSnapshot> stream() {
+        return snapshots.stream();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final List<MetricSnapshot> snapshots = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public boolean containsMetricName(String name) {
+            for (MetricSnapshot snapshot : snapshots) {
+                if (snapshot.getMetadata().getName().equals(name)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public Builder addMetricSnapshot(MetricSnapshot snapshot) {
+            snapshots.add(snapshot);
+            return this;
+        }
+
+        public MetricSnapshots build() {
+            return new MetricSnapshots(snapshots);
+        }
+    }
+}u}(j4  (e7af0e6e84a44c3ea7fccf50dfafbdaabc40ed84jK5  gprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucket.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xh  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * For iterating over {@link NativeHistogramBuckets}.
+ */
+public class NativeHistogramBucket {
+
+    private final int bucketIndex;
+    private final long count;
+
+    public NativeHistogramBucket(int bucketIndex, long count) {
+        this.bucketIndex = bucketIndex;
+        this.count = count;
+    }
+
+    /**
+     * See {@link NativeHistogramBuckets} for info on native bucket indexes.
+     */
+    public int getBucketIndex() {
+        return bucketIndex;
+    }
+
+    public long getCount() {
+        return count;
+    }
+}u}(j4  (6e0890a99df4df0c495911237516bc2a76a7c76ejK5  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X0  @@ -0,0 +1,159 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable representation of native histogram buckets.
+ * <p>
+ * The bucket index defines the boundaries of the bucket,
+ * depending on the histogram's {@link HistogramSnapshot.HistogramDataPointSnapshot#getNativeSchema() schema}.
+ * <pre>
+ *     base = 2^(2^-schema)
+ *     lower bound = base^(index - 1)
+ *     upper bound = base^index
+ * </pre>
+ */
+public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
+
+    public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
+    private final int[] bucketIndexes;
+    private final long[] counts;
+
+    private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {
+        this.bucketIndexes = bucketIndexes;
+        this.counts = counts;
+    }
+
+    /**
+     * To create a new {@link NativeHistogramBuckets} instance, you can either use one of the static {@code of(...)}
+     * methods, or use {@link NativeHistogramBuckets#newBuilder()}.
+     * @param bucketIndexes see class javadoc of {@link NativeHistogramBuckets}. May be empty.
+     * @param counts must have the same length as bucketIndexes
+     */
+    public static NativeHistogramBuckets of(int[] bucketIndexes, long[] counts) {
+        int[] bucketIndexesCopy = Arrays.copyOf(bucketIndexes, bucketIndexes.length);
+        long[] countsCopy = Arrays.copyOf(counts, counts.length);
+        sortAndValidate(bucketIndexesCopy, countsCopy);
+        return new NativeHistogramBuckets(bucketIndexesCopy, countsCopy);
+    }
+
+    /**
+     * To create a new {@link NativeHistogramBuckets} instance, you can either use one of the static {@code of(...)}
+     * methods, or use {@link NativeHistogramBuckets#newBuilder()}.
+     * @param bucketIndexes see class javadoc of {@link NativeHistogramBuckets}. May be empty.
+     * @param counts must have the same size as bucketIndexes
+     */
+    public static NativeHistogramBuckets of(List<Integer> bucketIndexes, List<Long> counts) {
+        int[] bucketIndexesCopy = new int[bucketIndexes.size()];
+        for (int i=0; i<bucketIndexes.size(); i++) {
+            bucketIndexesCopy[i] = bucketIndexes.get(i);
+        }
+        long[] countsCopy = new long[counts.size()];
+        for (int i=0; i<counts.size(); i++) {
+            countsCopy[i] = counts.get(i);
+        }
+        sortAndValidate(bucketIndexesCopy, countsCopy);
+        return new NativeHistogramBuckets(bucketIndexesCopy, countsCopy);
+    }
+
+    public int size() {
+        return bucketIndexes.length;
+    }
+
+    private List<NativeHistogramBucket> asList() {
+        List<NativeHistogramBucket> result = new ArrayList<>(size());
+        for (int i=0; i<bucketIndexes.length; i++) {
+            result.add(new NativeHistogramBucket(bucketIndexes[i], counts[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public Iterator<NativeHistogramBucket> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<NativeHistogramBucket> stream() {
+        return asList().stream();
+    }
+
+    public int getBucketIndex(int i) {
+        return bucketIndexes[i];
+    }
+
+    public long getCount(int i) {
+        return counts[i];
+    }
+
+    private static void sortAndValidate(int[] bucketIndexes, long[] counts) {
+        if (bucketIndexes.length != counts.length) {
+            throw new IllegalArgumentException("bucketIndexes.length == " + bucketIndexes.length + " but counts.length == " + counts.length + ". Expected the same length.");
+        }
+        sort(bucketIndexes, counts);
+        validate(bucketIndexes, counts);
+    }
+
+    private static void sort(int[] bucketIndexes, long[] counts) {
+        // Bubblesort. Should be efficient here as in most cases bucketIndexes is already sorted.
+        int n = bucketIndexes.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (bucketIndexes[j] > bucketIndexes[j + 1]) {
+                    swap(j, j+1, bucketIndexes, counts);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, int[] bucketIndexes, long[] counts) {
+        int tmpInt = bucketIndexes[j];
+        bucketIndexes[j] = bucketIndexes[i];
+        bucketIndexes[i] = tmpInt;
+        long tmpLong = counts[j];
+        counts[j] = counts[i];
+        counts[i] = tmpLong;
+    }
+
+    private static void validate(int[] bucketIndexes, long[] counts) {
+        // Preconditions:
+        // * bucketIndexes sorted
+        // * bucketIndexes and counts have the same length
+        for (int i=0; i<bucketIndexes.length; i++) {
+            if (counts[i] < 0) {
+                throw new IllegalArgumentException("Bucket counts cannot be negative.");
+            }
+            if (i > 0) {
+                if (bucketIndexes[i-1] == bucketIndexes[i]) {
+                    throw new IllegalArgumentException("Duplicate bucket index " + bucketIndexes[i]);
+                }
+            }
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final List<Integer> bucketIndexes = new ArrayList<>();
+        private final List<Long> counts = new ArrayList<>();
+
+        private Builder() {}
+
+        public Builder addBucket(int bucketIndex, long count) {
+            bucketIndexes.add(bucketIndex);
+            counts.add(count);
+            return this;
+        }
+
+        public NativeHistogramBuckets build() {
+            return NativeHistogramBuckets.of(bucketIndexes, counts);
+        }
+    }
+}u}(j4  (7d5c1c1666c69ee595b2f175281cf23955de87d8jK5  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantile.javajM5  addedjE5  K"jF5  K jO5  K"jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xn  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Immutable representation of a Quantile.
+ */
+public class Quantile {
+
+    private final double quantile;
+    private final double value;
+
+    /**
+     * @param quantile expecting 0.0 &lt;= quantile &lt;= 1.0, otherwise an {@link IllegalArgumentException} will be thrown.
+     * @param value
+     */
+    public Quantile(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+        validate();
+    }
+
+    public double getQuantile() {
+        return quantile;
+    }
+
+    public double getValue() {
+        return value;
+    }
+
+    private void validate() {
+        if (quantile < 0.0 || quantile > 1.0) {
+            throw new IllegalArgumentException(quantile + ": Illegal quantile. Expecting 0 <= quantile <= 1");
+        }
+    }
+}u}(j4  (1ad7002d2cfd9235e6a28470bdc300736a631574jK5  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantiles.javajM5  addedjE5  KUjF5  K jO5  KUjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.*;
+
+/**
+ * Immutable list of quantiles.
+ */
+public class Quantiles implements Iterable<Quantile> {
+
+    private final List<Quantile> quantiles;
+    public static final Quantiles EMPTY = new Quantiles(Collections.emptyList());
+
+    private Quantiles(List<Quantile> quantiles) {
+        quantiles = new ArrayList<>(quantiles);
+        quantiles.sort(Comparator.comparing(Quantile::getQuantile));
+        this.quantiles = Collections.unmodifiableList(quantiles);
+        validate();
+    }
+
+    private void validate() {
+        for (int i=0; i< quantiles.size() - 1; i++) {
+            if (quantiles.get(i).getQuantile() == quantiles.get(i+1).getQuantile()) {
+                throw new IllegalArgumentException("Duplicate " + quantiles.get(i).getQuantile() + " quantile.");
+            }
+        }
+    }
+
+     /**
+     * Create a new Quantiles instance.
+     * You can either create Quantiles with one of the static {@code Quantiles.of(...)} methods,
+     * or you can use the {@link Quantiles#newBuilder()}.
+     */
+    public static Quantiles of(List<Quantile> quantiles) {
+        return new Quantiles(quantiles);
+    }
+
+    /**
+     * Create a new Quantiles instance.
+     * You can either create Quantiles with one of the static {@code Quantiles.of(...)} methods,
+     * or you can use the {@link Quantiles#newBuilder()}.
+     */
+    public static Quantiles of(Quantile... quantiles) {
+        return of(Arrays.asList(quantiles));
+    }
+
+    public int size() {
+        return quantiles.size();
+    }
+
+    public Quantile get(int i) {
+        return quantiles.get(i);
+    }
+
+    @Override
+    public Iterator<Quantile> iterator() {
+        return quantiles.iterator();
+    }
+
+    public static class Builder {
+
+        private final List<Quantile> quantiles = new ArrayList<>();
+        private Builder() {}
+
+        public Builder addQuantile(Quantile quantile) {
+            quantiles.add(quantile);
+            return this;
+        }
+
+        /**
+         * @param quantile 0.0 &lt;= quantile &lt;= 1.0
+         */
+        public Builder addQuantile(double quantile, double value) {
+            quantiles.add(new Quantile(quantile, value));
+            return this;
+        }
+
+        public Quantiles build() {
+            return new Quantiles(quantiles);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (4cad4ac1111b1e1cc47948d9497463b74f194309jK5  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,225 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable snapshot of a StateSet metric.
+ */
+public final class StateSetSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link StateSetSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link StateSetSnapshot#newBuilder()}.
+     *
+     * @param metadata See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetDataPointSnapshot> data) {
+        super(metadata, data);
+        validate();
+    }
+
+    private void validate() {
+        if (getMetadata().hasUnit()) {
+            throw new IllegalArgumentException("An state set metric cannot have a unit.");
+        }
+        for (StateSetDataPointSnapshot entry : getData()) {
+            if (entry.getLabels().contains(getMetadata().getName())) {
+                throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
+            }
+        }
+    }
+
+    @Override
+    public List<StateSetDataPointSnapshot> getData() {
+        return (List<StateSetDataPointSnapshot>) data;
+    }
+
+
+    public static class StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<State> {
+        private final String[] names;
+        private final boolean[] values;
+
+        /**
+         * To create a new {@link StateSetDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link StateSetDataPointSnapshot#newBuilder()}.
+         *
+         * @param names  state names. Must have at least 1 entry.
+         *               The constructor will create a copy of the array.
+         * @param values state values. Must have the same length as {@code names}.
+         *               The constructor will create a copy of the array.
+         * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         */
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels) {
+            this(names, values, labels, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            if (names.length == 0) {
+                throw new IllegalArgumentException("StateSet must have at least one state.");
+            }
+            if (names.length != values.length) {
+                throw new IllegalArgumentException("names[] and values[] must have the same length");
+            }
+            String[] namesCopy = Arrays.copyOf(names, names.length);
+            boolean[] valuesCopy = Arrays.copyOf(values, names.length);
+            sort(namesCopy, valuesCopy);
+            this.names = namesCopy;
+            this.values = valuesCopy;
+            validate();
+        }
+
+        public int size() {
+            return names.length;
+        }
+
+        public String getName(int i) {
+            return names[i];
+        }
+
+        public boolean isTrue(int i) {
+            return values[i];
+        }
+
+        private void validate() {
+            for (int i = 0; i < names.length; i++) {
+                if (names[i].length() == 0) {
+                    throw new IllegalArgumentException("Empty string as state name");
+                }
+                if (i > 0 && names[i - 1].equals(names[i])) {
+                    throw new IllegalArgumentException(names[i] + " duplicate state name");
+                }
+            }
+        }
+
+        private List<State> asList() {
+            List<State> result = new ArrayList<>(size());
+            for (int i = 0; i < names.length; i++) {
+                result.add(new State(names[i], values[i]));
+            }
+            return Collections.unmodifiableList(result);
+        }
+
+        @Override
+        public Iterator<State> iterator() {
+            return asList().iterator();
+        }
+
+        public Stream<State> stream() {
+            return asList().stream();
+        }
+
+        private static void sort(String[] names, boolean[] values) {
+            // Bubblesort
+            int n = names.length;
+            for (int i = 0; i < n - 1; i++) {
+                for (int j = 0; j < n - i - 1; j++) {
+                    if (names[j].compareTo(names[j + 1]) > 0) {
+                        swap(j, j + 1, names, values);
+                    }
+                }
+            }
+        }
+
+        private static void swap(int i, int j, String[] names, boolean[] values) {
+            String tmpName = names[j];
+            names[j] = names[i];
+            names[i] = tmpName;
+            boolean tmpValue = values[j];
+            values[j] = values[i];
+            values[i] = tmpValue;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private final ArrayList<String> names = new ArrayList<>();
+            private final ArrayList<Boolean> values = new ArrayList<>();
+
+            private Builder() {}
+
+            public Builder addState(String name, boolean value) {
+                names.add(name);
+                values.add(value);
+                return this;
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public StateSetDataPointSnapshot build() {
+                boolean[] valuesArray = new boolean[values.size()];
+                for (int i = 0; i < values.size(); i++) {
+                    valuesArray[i] = values.get(i);
+                }
+                return new StateSetDataPointSnapshot(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class State {
+        private final String name;
+        private final boolean value;
+
+        private State(String name, boolean value) {
+            this.name = name;
+            this.value = value;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public boolean isTrue() {
+            return value;
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<StateSetDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(StateSetDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        @Override
+        public Builder withUnit(Unit unit) {
+            throw new IllegalArgumentException("StateSet metric cannot have a unit.");
+        }
+
+        public StateSetSnapshot build() {
+            return new StateSetSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (cf84162a7b8690e761080f346b559d497479760cjK5  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,136 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Summary metric.
+ */
+public final class SummarySnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link SummarySnapshot}, you can either call the constructor directly or use
+     * the builder with {@link SummarySnapshot#newBuilder()}.
+     *
+     * @param metadata See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<SummaryDataPointSnapshot> getData() {
+        return (List<SummaryDataPointSnapshot>) data;
+    }
+
+    public static final class SummaryDataPointSnapshot extends DistributionDataPointSnapshot {
+
+        private final Quantiles quantiles;
+
+
+        /**
+         * To create a new {@link SummaryDataPointSnapshot}, you can either call the constructor directly
+         * or use the Builder with {@link SummaryDataPointSnapshot#newBuilder()}.
+         *
+         * @param count                  total number of observations. Optional, pass -1 if not available.
+         * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
+         * @param quantiles              must not be {@code null}. Use {@link Quantiles#EMPTY} if there are no quantiles.
+         * @param labels                 must not be {@code null}. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars              must not be {@code null}. Use {@link Exemplars#EMPTY} if there are no exemplars.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when this summary
+         *                               data (this specific set of labels) was created.
+         *                               Note that this refers to the creation of the timeseries,
+         *                               not the creation of the snapshot.
+         *                               The created timestamp optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
+            this(count, sum, quantiles, labels, exemplars, createdTimestampMillis, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
+            super(count, sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.quantiles = quantiles;
+            validate();
+        }
+
+        public Quantiles getQuantiles() {
+            return quantiles;
+        }
+
+        private void validate() {
+            for (Label label : getLabels()) {
+                if (label.getName().equals("quantile")) {
+                    throw new IllegalArgumentException("quantile is a reserved label name for summaries");
+                }
+            }
+            if (quantiles == null) {
+                throw new NullPointerException();
+            }
+        }
+
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
+
+            private Quantiles quantiles = Quantiles.EMPTY;
+
+            private Builder() {
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public Builder withQuantiles(Quantiles quantiles) {
+                this.quantiles = quantiles;
+                return this;
+            }
+
+            @Override
+            public Builder withCount(long count) {
+                super.withCount(count);
+                return this;
+            }
+
+            public SummaryDataPointSnapshot build() {
+                return new SummaryDataPointSnapshot(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(SummaryDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public SummarySnapshot build() {
+            return new SummarySnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (232cd914311299356ae719ea034766531c512b90jK5  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Unit.javajM5  addedjE5  K/jF5  K jO5  K/jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Some pre-defined units for convenience. You can create your own units with
+ * <pre>
+ *     new Unit("myUnit");
+ * </pre>
+ * Note that in Prometheus, units are largely based on SI base units
+ * (seconds, bytes, joules, grams, meters, ratio, volts, amperes, and celsius).
+ */
+public class Unit {
+
+    private final String name;
+
+    public static final Unit RATIO = new Unit("ratio");
+    public static final Unit SECONDS = new Unit("seconds");
+    public static final Unit BYTES = new Unit("bytes");
+    public static final Unit CELSIUS = new Unit("celsius");
+    public static final Unit JOULES = new Unit("joules");
+    public static final Unit GRAMS = new Unit("grams");
+    public static final Unit METERS = new Unit("meters");
+    public static final Unit VOLTS = new Unit("volts");
+    public static final Unit AMPERES = new Unit("amperes");
+
+    public Unit(String name) {
+        this.name = name;
+        if (name == null) {
+            throw new NullPointerException("Unit name cannot be null.");
+        }
+        if (name.isEmpty()) {
+            throw new IllegalArgumentException("Unit name cannot be empty.");
+        }
+    }
+
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    public static double nanosToSeconds(long nanos) {
+        return nanos / 1E9;
+    }
+
+    public static double millisToSeconds(long nanos) {
+        return nanos / 1E3;
+    }
+}u      }(j4  (34735823be44bc387de912e87d582771794decfajK5  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of an Unknown (Untyped) metric.
+ */
+public final class UnknownSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link UnknownSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link UnknownSnapshot#newBuilder()}.
+     *
+     * @param metadata required name and optional help and unit.
+     *                 See {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<UnknownDataPointSnapshot> getData() {
+        return (List<UnknownDataPointSnapshot>) data;
+    }
+
+    public static final class UnknownDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link UnknownDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link UnknownDataPointSnapshot#newBuilder()}.
+         *
+         * @param value    the value.
+         * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar may be null.
+         */
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
+            this(value, Labels.EMPTY, exemplar, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May return {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+
+            private Builder() {
+            }
+
+            /**
+             * required.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            /**
+             * Optional
+             */
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public UnknownDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new UnknownDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<UnknownDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(UnknownDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public UnknownSnapshot build() {
+            return new UnknownSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j4  (04801e13348836168fd156919907c6916d94ad6ajK5  mprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucketsTest.javajM5  addedjE5  KhjF5  K jO5  KhjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,104 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class ClassicHistogramBucketsTest {
+
+    @Test
+    public void testGoodCase() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.NEGATIVE_INFINITY, 0)
+                .addBucket(-10.0, 7)
+                .addBucket(1024, 3)
+                .addBucket(Double.POSITIVE_INFINITY, 8)
+                .build();
+        Assert.assertEquals(4, buckets.size());
+    }
+
+    @Test
+    public void testSort() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(7, 2)
+                .addBucket(2, 0)
+                .addBucket(Double.POSITIVE_INFINITY, 3)
+                .build();
+        Assert.assertEquals(3, buckets.size());
+        Assert.assertEquals(2, buckets.getUpperBound(0), 0.0);
+        Assert.assertEquals(7, buckets.getUpperBound(1), 0.0);
+        Assert.assertEquals(Double.POSITIVE_INFINITY, buckets.getUpperBound(2), 0.0);
+        Assert.assertEquals(0, buckets.getCount(0));
+        Assert.assertEquals(2, buckets.getCount(1));
+        Assert.assertEquals(3, buckets.getCount(2));
+    }
+
+    @Test
+    public void testMinimalBuckets() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        Assert.assertEquals(1, buckets.size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInfBucketMissing() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.NEGATIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNegativeCount() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(0.0, 10)
+                .addBucket(Double.POSITIVE_INFINITY, -1)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNaNBoundary() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(0.0, 1)
+                .addBucket(Double.NaN, 2)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateBoundary() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(1.0, 1)
+                .addBucket(2.0, 2)
+                .addBucket(1.0, 2)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyBuckets() {
+        ClassicHistogramBuckets.newBuilder().build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDifferentLength() {
+        double[] upperBounds = new double[] {0.7, 1.3, Double.POSITIVE_INFINITY};
+        long[] counts = new long[] {13, 178, 1024, 3000};
+        ClassicHistogramBuckets.of(upperBounds, counts);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(1.0, 7)
+                .addBucket(2.0, 8)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        Iterator<ClassicHistogramBucket> iterator = buckets.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (4f2b2d75d287ccd7ba8b82c4cae985338a6f55aejK5  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javajM5  addedjE5  KljF5  K jO5  KljP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,108 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class CounterSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long createdTimestamp1 = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long createdTimestamp2 = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("http_server_requests_seconds")
+                .withHelp("total time spent serving requests")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(1.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(3.0)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/world")
+                                .build())
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .build()
+                ).addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(2.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(4.0)
+                                .withTraceId("def456")
+                                .withSpanId("234567")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .build())
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "http_server_requests_seconds", "total time spent serving requests", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        CounterDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        Assert.assertEquals(Labels.of("path", "/hello"), data.getLabels());
+        Assert.assertEquals(2.0, data.getValue(), 0.0);
+        Assert.assertEquals(4.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp2, data.getCreatedTimestampMillis());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(Labels.of("path", "/world"), data.getLabels());
+        Assert.assertEquals(1.0, data.getValue(), 0.0);
+        Assert.assertEquals(3.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp1, data.getCreatedTimestampMillis());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimalGoodCase() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "events", null, null);
+        Assert.assertEquals(1, snapshot.getData().size());
+        CounterDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.EMPTY, data.getLabels());
+        Assert.assertEquals(1.0, data.getValue(), 0.0);
+        Assert.assertNull(data.getExemplar());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testEmptyCounter() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder().withName("events").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresent() {
+        CounterSnapshot.newBuilder().withName("test_total").build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        CounterDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
+                .build();
+        Iterator<CounterDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (385ceb029e4068bdf74659dac9278727b2aed46djK5  ^prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarTest.javajM5  addedjE5  KNjF5  K jO5  KNjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X]  @@ -0,0 +1,78 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ExemplarTest {
+
+    @Test
+    public void testGoodCaseComplete() {
+        long timestamp = System.currentTimeMillis();
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(2.2)
+                .withTraceId("abc123abc123")
+                .withSpanId("def456def456")
+                .withTimestampMillis(timestamp)
+                .withLabels(Labels.of("path", "/", "error", "none"))
+                .build();
+        Assert.assertEquals(2.2, exemplar.getValue(), 0.0);
+        Assert.assertEquals(Labels.of(Exemplar.TRACE_ID, "abc123abc123", Exemplar.SPAN_ID, "def456def456", "path", "/", "error", "none"), exemplar.getLabels());
+        Assert.assertTrue(exemplar.hasTimestamp());
+        Assert.assertEquals(timestamp, exemplar.getTimestampMillis());
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testValueMissing() {
+        Exemplar.newBuilder().build();
+    }
+
+    @Test
+    public void testMinimal() {
+        Exemplar exemplar = Exemplar.newBuilder().withValue(0.0).build();
+        Assert.assertEquals(0.0, exemplar.getValue(), 0.0);
+        Assert.assertEquals(Labels.EMPTY, exemplar.getLabels());
+        Assert.assertFalse(exemplar.hasTimestamp());
+    }
+
+    @Test
+    public void testLabelsMergeTraceId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withTraceId("abc")
+                .build();
+        Assert.assertEquals(Labels.of("a", "b", "trace_id", "abc"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeSpanId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withSpanId("abc")
+                .build();
+        Assert.assertEquals(Labels.of("a", "b", "span_id", "abc"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeTraceIdAndSpanId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withSpanId("abc")
+                .withTraceId("def")
+                .build();
+        Assert.assertEquals(Labels.of("span_id", "abc", "a", "b", "trace_id", "def"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeNone() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .build();
+        Assert.assertEquals(Labels.of("a", "b"), exemplar.getLabels());
+    }
+}u}(j4  (3ef9447a7e48775181063bccea044170d8b0d563jK5  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarsTest.javajM5  addedjE5  K*jF5  K jO5  K*jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class ExemplarsTest {
+
+    @Test
+    public void testUpperBound() {
+        Exemplars exemplars = Exemplars.of(
+                Exemplar.newBuilder().withValue(1.0).build(),
+                Exemplar.newBuilder().withValue(3.0).build(),
+                Exemplar.newBuilder().withValue(2.0).build()
+        );
+        Assert.assertEquals(3, exemplars.size());
+        Assert.assertEquals(1.0, exemplars.get(0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(1).getValue(), 0.0);
+        Assert.assertEquals(2.0, exemplars.get(2).getValue(), 0.0);
+        Assert.assertEquals(1.0, exemplars.get(0.0, Double.POSITIVE_INFINITY).getValue(), 0.0);
+        Assert.assertEquals(1.0, exemplars.get(0.0, 1.0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(1.0, 4.0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(2.0, 3.0).getValue(), 0.0);
+        Assert.assertEquals(2.0, exemplars.get(1.0, 2.1).getValue(), 0.0);
+        Assert.assertNull(exemplars.get(2.0, 2.1));
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        Exemplars exemplars = Exemplars.of(
+                Exemplar.newBuilder().withValue(1.0).build(),
+                Exemplar.newBuilder().withValue(3.0).build(),
+                Exemplar.newBuilder().withValue(2.0).build()
+        );
+        Iterator<Exemplar> iterator = exemplars.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (20a094a236ec5589bc0f928619b559353987a6f0jK5  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajM5  addedjE5  KjjF5  K jO5  KjjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X]  @@ -0,0 +1,106 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class GaugeSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long exemplarTimestamp = System.currentTimeMillis();
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("cache_size_bytes")
+                .withHelp("cache size in Bytes")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(1024.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(1024.0)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "prod")
+                                .build())
+                        .build()
+                ).addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(128.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(128.0)
+                                .withTraceId("def456")
+                                .withSpanId("234567")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "dev")
+                                .build())
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "cache_size_bytes", "cache size in Bytes", "bytes");
+        Assert.assertEquals(2, snapshot.getData().size());
+        GaugeDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        Assert.assertEquals(Labels.of("env", "dev"), data.getLabels());
+        Assert.assertEquals(128.0, data.getValue(), 0.0);
+        Assert.assertEquals(128.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
+        Assert.assertEquals(1024.0, data.getValue(), 0.0);
+        Assert.assertEquals(1024.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimalGoodCase() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("temperature")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withValue(23.0).build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "temperature", null, null);
+        Assert.assertEquals(1, snapshot.getData().size());
+        GaugeDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.EMPTY, data.getLabels());
+        Assert.assertEquals(23.0, data.getValue(), 0.0);
+        Assert.assertNull(data.getExemplar());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testEmptyGauge() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("temperature")
+                .build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresent() {
+        CounterSnapshot.newBuilder().withName("test_total").build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        CounterDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("gauge")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
+                .build();
+        Iterator<GaugeDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (9dc21a2358170bab952c996021e109e66e161618jK5  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javajM5  addedjE5  M
jF5  K jO5  M
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xk6  @@ -0,0 +1,269 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class HistogramSnapshotTest {
+
+    @Test
+    public void testGoodCaseComplete() {
+        long createdTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(129.0)
+                .withTraceId("abcabc")
+                .withSpanId("defdef")
+                .withLabels(Labels.of("status", "200"))
+                .withTimestampMillis(exemplarTimestamp)
+                .build();
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("request sizes in bytes")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(
+                        HistogramDataPointSnapshot.newBuilder()
+                                .withSum(27000.0)
+                                .withNativeSchema(5)
+                                .withNativeZeroCount(2)
+                                .withNativeZeroThreshold(0.0000001)
+                                .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                        .addBucket(Double.POSITIVE_INFINITY, 0)
+                                        .addBucket(128.0, 7)
+                                        .addBucket(1024.0, 15)
+                                        .build())
+                                // The total number of observations in the native and classic histogram
+                                // is consistent (22 observations), but the individual bucket counts don't fit.
+                                // It doesn't matter for this test, but it would be good to use a more consistent
+                                // example in the test.
+                                .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                        .addBucket(1, 12)
+                                        .addBucket(2, 3)
+                                        .addBucket(4, 2)
+                                        .build())
+                                .withNativeBucketsForNegativeValues(NativeHistogramBuckets.newBuilder()
+                                        .addBucket(-1, 1)
+                                        .addBucket(0, 2)
+                                        .build())
+                                .withLabels(Labels.of("path", "/"))
+                                .withExemplars(Exemplars.of(exemplar1))
+                                .withCreatedTimestampMillis(createdTimestamp)
+                                .withScrapeTimestampMillis(scrapeTimestamp)
+                                .build())
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withCount(3) // TODO how is that not a compile error? This is a protected method!
+                                .withSum(400.2)
+                        .withNativeSchema(5)
+                                .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                        .addBucket(128.0, 0)
+                                        .addBucket(1024.0, 4)
+                                        .addBucket(Double.POSITIVE_INFINITY, 2)
+                                        .build())
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(-1, 1)
+                                .addBucket(3, 3)
+                                .addBucket(4, 2)
+                                .build())
+                                .withLabels(Labels.of("path", "/api/v1"))
+                                .withExemplars(Exemplars.of(exemplar1))
+                                .withCreatedTimestampMillis(createdTimestamp)
+                                .withScrapeTimestampMillis(scrapeTimestamp)
+                                .build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "request_size_bytes", "request sizes in bytes", "bytes");
+
+        Assert.assertEquals(2, snapshot.getData().size());
+        HistogramDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
+        Assert.assertTrue(data.hasSum());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertTrue(data.hasCreatedTimestamp());
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(22, data.getCount());
+        Assert.assertEquals(27000.0, data.getSum(), 0.0);
+        Assert.assertEquals(Labels.of("path", "/"), data.getLabels());
+        Assert.assertEquals(exemplar1.getValue(), data.getExemplars().get(128.0, 1024.0).getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp, data.getCreatedTimestampMillis());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        // classic histogram 1
+        int i = 0;
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(128.0, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(7, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(1024.0, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(15, bucket.getCount());
+                    break;
+                case 2:
+                    Assert.assertEquals(Double.POSITIVE_INFINITY, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(0, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 3 classic histogram buckets", 3, i);
+        // native histogram 1
+        Assert.assertEquals(5, data.getNativeSchema());
+        Assert.assertEquals(2, data.getNativeZeroCount());
+        Assert.assertEquals(0.0000001, data.getNativeZeroThreshold(), 0.0000001);
+        Assert.assertEquals(3, data.getNativeBucketsForPositiveValues().size());
+        i = 0;
+        for (NativeHistogramBucket bucket : data.getNativeBucketsForPositiveValues()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(1, bucket.getBucketIndex());
+                    Assert.assertEquals(12, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(2, bucket.getBucketIndex());
+                    Assert.assertEquals(3, bucket.getCount());
+                    break;
+                case 2:
+                    Assert.assertEquals(4, bucket.getBucketIndex());
+                    Assert.assertEquals(2, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 3 native buckets for positive values", 3, i);
+        i = 0;
+        Assert.assertEquals(2, data.getNativeBucketsForNegativeValues().size());
+        for (NativeHistogramBucket bucket : data.getNativeBucketsForNegativeValues()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(-1, bucket.getBucketIndex());
+                    Assert.assertEquals(1, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(0, bucket.getBucketIndex());
+                    Assert.assertEquals(2, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 2 native buckets for positive values", 2, i);
+        // classic histogram 2 (it's ok that this is incomplete, because we covered it with the other tests)
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(6, data.getCount());
+        // native histogram 2 (it's ok that this is incomplete, because we covered it with the other tests)
+        Assert.assertEquals(5, data.getNativeSchema());
+        Assert.assertEquals(0, data.getNativeZeroCount());
+        Assert.assertEquals(0, data.getNativeZeroThreshold(), 0);
+    }
+
+    @Test
+    public void testEmptyHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("empty_histogram")
+                .build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test
+    public void testMinimalClassicHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("minimal_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
+                        .build())
+                .build();
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasSum());
+        Assert.assertEquals(1, snapshot.getData().get(0).getClassicBuckets().size());
+    }
+
+    @Test
+    public void testMinimalNativeHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("hist")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withNativeSchema(5)
+                        .build())
+                .build();
+        Assert.assertEquals("hist", snapshot.getMetadata().getName());
+        Assert.assertFalse(snapshot.getMetadata().hasUnit());
+        Assert.assertEquals(1, snapshot.getData().size());
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(0, data.getCount());
+        Assert.assertFalse(data.hasSum());
+        Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
+        Assert.assertEquals(0, data.getNativeBucketsForPositiveValues().size());
+    }
+
+    @Test
+    public void testClassicCount() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("test_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(1.0, 3)
+                                .addBucket(2.0, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build())
+                        .build())
+                .build();
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasSum());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(5, data.getCount());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyData() {
+        // This will fail because one of nativeSchema and classicHistogramBuckets is required
+        HistogramDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test
+    public void testEmptyNativeData() {
+        HistogramDataPointSnapshot data = HistogramDataPointSnapshot.newBuilder()
+                .withNativeSchema(5)
+                .build();
+        Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
+        Assert.assertEquals(0, data.getNativeBucketsForPositiveValues().size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("test_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "a"))
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
+                        .build())
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "b"))
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{2}))
+                        .build())
+                .build();
+        Iterator<HistogramDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyClassicBuckets() {
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+
+    @Test
+    public void testMinimalNativeData() {
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
+                NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+
+    @Test
+    public void testMinimalClassicData() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        new HistogramDataPointSnapshot(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
+                NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+}u}(j4  (e5b7d55be16907e5898140948d7e2250ad1b6aadjK5  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajM5  addedjE5  K.jF5  K jO5  K.jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class InfoSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder()
+                .withName("target")
+                .withHelp("Target info")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway"))
+                        .build())
+                .build();
+        Assert.assertEquals("target", snapshot.getMetadata().getName());
+        Assert.assertEquals("Target info", snapshot.getMetadata().getHelp());
+        Assert.assertFalse(snapshot.getMetadata().hasUnit());
+        Assert.assertEquals(1, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmptyInfo() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder().withName("target").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder()
+                .withName("target")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway.v1"))
+                        .build())
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9200", "service_name", "gateway.v2"))
+                        .build())
+                .build();
+        Iterator<InfoSnapshot.InfoDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (8eaa8333a65d7157b364c52e20bbb1a74a20117fjK5  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javajM5  addedjE5  KPjF5  K jO5  KPjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotEquals;
+
+public class LabelsTest {
+
+    private <T extends Comparable<T>> void assertLessThan(T a, T b) {
+        Assert.assertTrue(a.compareTo(b) < 0);
+    }
+
+    private <T extends Comparable<T>> void assertGreaterThan(T a, T b) {
+        Assert.assertTrue(a.compareTo(b) > 0);
+    }
+
+    @Test
+    public void testCompareDifferentLabelNames() {
+        Labels labels1 = Labels.of("env", "prod", "status2", "200");
+        Labels labels2 = Labels.of("env", "prod", "status1", "200");
+        assertGreaterThan(labels1, labels2);
+        assertLessThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+    @Test
+    public void testCompareSameLabelNames() {
+        // If all label names are the same, labels should be sorted by label value.
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "500");
+        assertLessThan(labels1, labels2);
+        assertGreaterThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+    @Test
+    public void testCompareDifferentNumberOfLabels() {
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "200", "x_code", "none");
+        assertLessThan(labels1, labels2);
+        assertGreaterThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+
+    @Test
+    public void testCompareEquals() {
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "200");
+        Assert.assertEquals(0, labels1.compareTo(labels2));
+        Assert.assertEquals(0, labels2.compareTo(labels1));
+        Assert.assertEquals(labels1, labels2);
+        Assert.assertEquals(labels2, labels1);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelName() {
+        Labels.of("http.status_code", "200");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testReservedLabelName() {
+        Labels.of("__name__", "requests_total");
+    }
+
+    @Test
+    public void testSanitizeLabelName() {
+        Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabelName() {
+        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    }
+}u}(j4  (a655954f7c35a987d073e1fce0e46661c84ed336jK5  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javajM5  addedjE5  K7jF5  K jO5  K7jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,55 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MetricMetadataTest {
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyName() {
+        new MetricMetadata("");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNullName() {
+        new MetricMetadata(null);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalName() {
+        new MetricMetadata("http.server.duration");
+    }
+
+    @Test
+    public void testSanitizationIllegalCharacters() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
+        Assert.assertEquals("http_server_duration", metadata.getName());
+        Assert.assertEquals("help string", metadata.getHelp());
+        Assert.assertEquals("seconds", metadata.getUnit().toString());
+    }
+
+    @Test
+    public void testSanitizationCounter() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("my_events_total"));
+        Assert.assertEquals("my_events", metadata.getName());
+    }
+
+    @Test
+    public void testSanitizationInfo() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("target_info"));
+        Assert.assertEquals("target", metadata.getName());
+    }
+
+    @Test
+    public void testSanitizationWeirdCornerCase() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("_total_created"));
+        Assert.assertEquals("total", metadata.getName());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testSanitizeEmptyString() {
+        MetricMetadata.sanitizeMetricName("");
+    }
+}u}(j4  (492472c9408a101b92e3f33e6a00419c6b8bf62bjK5  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javajM5  addedjE5  K%jF5  K jO5  K%jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MetricSnapshotTest {
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabels() {
+        CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/hello", "status", "200"))
+                        .withValue(1.0)
+                        .build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/world", "status", "200"))
+                        .withValue(2.0)
+                        .build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("status", "200", "path", "/hello"))
+                        .withValue(3.0)
+                        .build())
+                .build();
+    }
+
+    @Test
+    public void testNoData() {
+        MetricSnapshot snapshot = CounterSnapshot.newBuilder().withName("test").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void testNullData() {
+        new CounterSnapshot(new MetricMetadata("test"), null);
+    }
+}u}(j4  (7066146c46da3afc1ab1efdfd5aac059e3e66682jK5  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javajM5  addedjE5  KVjF5  K jO5  KVjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XI  @@ -0,0 +1,86 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class MetricSnapshotsTest {
+
+    @Test
+    public void testEmpty() {
+        MetricSnapshots snapshots = MetricSnapshots.newBuilder().build();
+        Assert.assertFalse(snapshots.stream().findAny().isPresent());
+    }
+
+    @Test
+    public void testSort() {
+        CounterSnapshot c1 = CounterSnapshot.newBuilder()
+                .withName("counter1")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c2 = CounterSnapshot.newBuilder()
+                .withName("counter2")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c3 = CounterSnapshot.newBuilder()
+                .withName("counter3")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
+        Assert.assertEquals(3, snapshots.size());
+        Assert.assertEquals("counter1", snapshots.get(0).getMetadata().getName());
+        Assert.assertEquals("counter2", snapshots.get(1).getMetadata().getName());
+        Assert.assertEquals("counter3", snapshots.get(2).getMetadata().getName());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateName() {
+        // Q: What if you have a counter named "foo" and a gauge named "foo"?
+        // A: Great question. You might think this is a valid scenario, because the counter will produce
+        //    the values "foo_total" and "foo_created" while the gauge will produce the value "foo".
+        //    So from that perspective there is no conflict. However, the name for HELP, TYPE, UNIT is the same,
+        //    and that is the conflict. Therefore, you cannot have a counter named "foo" and a gauge named "foo".
+        CounterSnapshot c = CounterSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        GaugeSnapshot g = GaugeSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(GaugeSnapshot.GaugeDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        new MetricSnapshots(c, g);
+    }
+
+    @Test
+    public void testBuilder() {
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots.Builder builder = MetricSnapshots.newBuilder();
+        Assert.assertFalse(builder.containsMetricName("my_metric"));
+        builder.addMetricSnapshot(counter);
+        Assert.assertTrue(builder.containsMetricName("my_metric"));
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        CounterSnapshot c1 = CounterSnapshot.newBuilder()
+                .withName("counter1")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c2 = CounterSnapshot.newBuilder()
+                .withName("counter2")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c3 = CounterSnapshot.newBuilder()
+                .withName("counter3")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
+        Iterator<MetricSnapshot> iterator = snapshots.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j4  (2797be5565791a7f41bfa01176390c8a275d323ejK5  lprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucketsTest.javajM5  addedjE5  KAjF5  K jO5  KAjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XN	  @@ -0,0 +1,65 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.NativeHistogramBucket;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class NativeHistogramBucketsTest {
+
+    @Test
+    public void testGoodCase() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(-10, 12)
+                .addBucket(120, 17)
+                .build();
+        Assert.assertEquals(2, buckets.size());
+        Assert.assertEquals(-10, buckets.getBucketIndex(0));
+        Assert.assertEquals(12, buckets.getCount(0));
+        Assert.assertEquals(120, buckets.getBucketIndex(1));
+        Assert.assertEquals(17, buckets.getCount(1));
+    }
+
+    @Test
+    public void testEmpty() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder().build();
+        Assert.assertEquals(0, buckets.size());
+    }
+
+    @Test
+    public void testSort() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(7, 4)
+                .addBucket(2, 0)
+                .addBucket(5, 3)
+                .build();
+        Assert.assertEquals(3, buckets.size());
+        Assert.assertEquals(2, buckets.getBucketIndex(0));
+        Assert.assertEquals(5, buckets.getBucketIndex(1));
+        Assert.assertEquals(7, buckets.getBucketIndex(2));
+        Assert.assertEquals(0, buckets.getCount(0));
+        Assert.assertEquals(3, buckets.getCount(1));
+        Assert.assertEquals(4, buckets.getCount(2));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDifferentLength() {
+        int[] bucketIndexes = new int[] {0, 1, 2};
+        long[] cumulativeCounts = new long[] {13, 178, 1024, 3000};
+        NativeHistogramBuckets.of(bucketIndexes, cumulativeCounts);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(1, 1)
+                .addBucket(2, 1)
+                .build();
+        Iterator<NativeHistogramBucket> iterator = buckets.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+}u}(j4  (43b586119205de3dc0f50eae664fe44b1a6c2499jK5  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/QuantilesTest.javajM5  addedjE5  K5jF5  K jO5  K5jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X#  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class QuantilesTest {
+
+    @Test
+    public void testSort() {
+        Quantiles quantiles = Quantiles.newBuilder()
+                .addQuantile(0.99, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+        Assert.assertEquals(3, quantiles.size());
+        Assert.assertEquals(0.5, quantiles.get(0).getQuantile(), 0);
+        Assert.assertEquals(0.2, quantiles.get(0).getValue(), 0);
+        Assert.assertEquals(0.95, quantiles.get(1).getQuantile(), 0);
+        Assert.assertEquals(0.22, quantiles.get(1).getValue(), 0);
+        Assert.assertEquals(0.99, quantiles.get(2).getQuantile(), 0);
+        Assert.assertEquals(0.23, quantiles.get(2).getValue(), 0);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        Quantiles quantiles = Quantiles.newBuilder()
+                .addQuantile(0.99, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+        Iterator<Quantile> iterator = quantiles.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test
+    public void testEmpty() {
+        Assert.assertEquals(0, Quantiles.EMPTY.size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicate() {
+        Quantiles.newBuilder()
+                .addQuantile(0.95, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+    }
+}uF     }(j4  (54766debdca65622d507c6f1365900e54f2b0809jK5  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SnapshotTestUtil.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,17 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import org.junit.Assert;
+
+public class SnapshotTestUtil {
+
+    public static void assertMetadata(MetricSnapshot snapshot, String name, String help, String unit) {
+        Assert.assertEquals(name, snapshot.getMetadata().getName());
+        Assert.assertEquals(help, snapshot.getMetadata().getHelp());
+        if (unit != null) {
+            Assert.assertEquals(unit, snapshot.getMetadata().getUnit().toString());
+        } else {
+            Assert.assertNull(snapshot.getMetadata().getUnit());
+        }
+    }
+}u}(j4  (6c4fa61d35329e3482e6fcbbf2b06b49a826dc77jK5  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,145 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class StateSetSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_feature_flags")
+                .withHelp("Feature Flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "controller"))
+                        .withScrapeTimestampMillis(scrapeTimestamp)
+                        .addState("feature1", true)
+                        .addState("feature2", false)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "api"))
+                        .addState("feature1", false)
+                        .addState("feature2", false)
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "my_feature_flags", "Feature Flags", null);
+        Assert.assertEquals(2, snapshot.getData().size());
+        StateSetSnapshot.StateSetDataPointSnapshot data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
+        Assert.assertEquals(Labels.of("entity", "controller"), data.getLabels());
+        Assert.assertEquals(2, data.size());
+        Assert.assertEquals("feature1", data.getName(0));
+        Assert.assertTrue(data.isTrue(0));
+        Assert.assertEquals("feature2", data.getName(1));
+        Assert.assertFalse(data.isTrue(1));
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+    }
+
+    @Test
+    public void testStateSetDataSorted() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("b", true)
+                .addState("d", false)
+                .addState("c", true)
+                .addState("a", false)
+                .build();
+        Assert.assertEquals(4, data.size());
+        Assert.assertEquals("a", data.getName(0));
+        Assert.assertFalse(data.isTrue(0));
+        Assert.assertEquals("b", data.getName(1));
+        Assert.assertTrue(data.isTrue(1));
+        Assert.assertEquals("c", data.getName(2));
+        Assert.assertTrue(data.isTrue(2));
+        Assert.assertEquals("d", data.getName(3));
+        Assert.assertFalse(data.isTrue(3));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testMustHaveState() {
+        // Must have at least one state.
+        StateSetSnapshot.StateSetDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test
+    public void testMinimal() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_flag")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("flag", true)
+                        .build()
+                )
+                .build();
+        Assert.assertEquals(1, snapshot.data.size());
+    }
+
+    @Test
+    public void testEmpty() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_flag")
+                .build();
+        Assert.assertEquals(0, snapshot.data.size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("a", true)
+                .addState("b", true)
+                .addState("c", true)
+                .build();
+        Iterator<StateSetSnapshot.State> iterator = data.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateState() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("a", true)
+                .addState("b", true)
+                .addState("a", true)
+                .build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testStateSetImmutable() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "controller"))
+                        .addState("feature", true)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "api"))
+                        .addState("feature", true)
+                        .build()
+                )
+                .build();
+        Iterator<StateSetSnapshot.StateSetDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testLabelsUnique() {
+        StateSetSnapshot.newBuilder()
+                .withName("flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("feature", true)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("feature", true)
+                        .build()
+                )
+                .build();
+    }
+}u}(j4  (cf65f46bf2c6096f777b1b9d767511927d757b4fjK5  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javajM5  addedjE5  KijF5  K jO5  KijP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X+  @@ -0,0 +1,105 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.concurrent.TimeUnit;
+
+public class SummarySnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long createdTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withCreatedTimestampMillis(createdTimestamp)
+                        .withScrapeTimestampMillis(scrapeTimestamp)
+                        .withLabels(Labels.of("endpoint", "/"))
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 0.2)
+                                .addQuantile(0.95, 0.22)
+                                .addQuantile(0.99, 0.23)
+                                .build())
+                        .withExemplars(Exemplars.newBuilder()
+                                .addExemplar(Exemplar.newBuilder()
+                                        .withValue(0.2)
+                                        .withTraceId("abc123")
+                                        .withSpanId("123457")
+                                        .withTimestampMillis(exemplarTimestamp)
+                                        .build())
+                                .addExemplar(Exemplar.newBuilder()
+                                        .withValue(0.21)
+                                        .withTraceId("abc124")
+                                        .withSpanId("123458")
+                                        .withTimestampMillis(exemplarTimestamp)
+                                        .build())
+                                .build())
+                        .withCount(1093)
+                        .withSum(218.6)
+                        .build())
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("endpoint", "/test"))
+                        .withCount(1093)
+                        .withSum(218.6)
+                        .build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "latency_seconds", "latency in seconds", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        SummarySnapshot.SummaryDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.of("endpoint", "/"), data.getLabels());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(1093, data.getCount());
+        Assert.assertTrue(data.hasSum());
+        Assert.assertEquals(218.6, data.getSum(), 0);
+        Assert.assertTrue(data.hasCreatedTimestamp());
+        Assert.assertEquals(createdTimestamp, data.getCreatedTimestampMillis());
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        Quantiles quantiles = data.getQuantiles();
+        Assert.assertEquals(3, quantiles.size());
+        // quantiles are tested in QuantilesTest already, skipping here.
+        Assert.assertEquals(2, data.getExemplars().size());
+        // exemplars are tested in ExemplarsTest already, skipping here.
+
+        data = snapshot.getData().get(1);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertTrue(data.hasSum());
+    }
+
+    @Test
+    public void testMinimal() {
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder()
+                .withName("size_bytes")
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withCount(10)
+                        .withSum(12.0)
+                        .build())
+                .build();
+        Assert.assertEquals(1, snapshot.getData().size());
+        Assert.assertEquals(Labels.EMPTY, snapshot.getData().get(0).getLabels());
+    }
+
+    @Test
+    public void testEmptySnapshot() {
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder().withName("empty_summary").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmptyData() {
+        SummarySnapshot.SummaryDataPointSnapshot data = SummarySnapshot.SummaryDataPointSnapshot.newBuilder().build();
+        Assert.assertEquals(0, data.getQuantiles().size());
+        Assert.assertFalse(data.hasCount());
+        Assert.assertFalse(data.hasSum());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertEquals(0, data.getExemplars().size());
+    }
+}u}(j4  (b8a9827d28794d2698f99e4124b8e3a0eb82a596jK5  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javajM5  addedjE5  KGjF5  K jO5  KGjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class UnknownSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long exemplarTimestamp = System.currentTimeMillis();
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
+                .withName("my_unknown_seconds")
+                .withHelp("something in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.3)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(0.12)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "prod")
+                                .build())
+                        .build()
+                ).addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.29)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "dev")
+                                .build())
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "my_unknown_seconds", "something in seconds", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        UnknownSnapshot.UnknownDataPointSnapshot data = snapshot.getData().get(1); // env="prod"
+        Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
+        Assert.assertEquals(0.3, data.getValue(), 0.0);
+        Assert.assertEquals(0.12, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimal() {
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
+                .withName("test")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(1.0)
+                        .build())
+                .build();
+        Assert.assertEquals(1, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmpty() {
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder().withName("test").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMissing() {
+        UnknownSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        UnknownSnapshot.UnknownDataPointSnapshot.newBuilder().build();
+    }
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  *prometheus-metrics-model/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-model%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (f8e9ed1d30b72e989873e68fcb3e47947738c37ejK5  !prometheus-metrics-tracer/pom.xmljM5  addedjE5  K4jF5  K jO5  K4jP5  {https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fpom.xmljR5  zhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X\  @@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer</artifactId>
+  <packaging>pom</packaging>
+
+  <name>Prometheus Metrics Tracer</name>
+  <description>
+    Parent for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>io.opentelemetry</groupId>
+        <artifactId>opentelemetry-api</artifactId>
+        <version>1.28.0</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <modules>
+    <module>prometheus-metrics-tracer-common</module>
+    <module>prometheus-metrics-tracer-initializer</module>
+    <module>prometheus-metrics-tracer-otel</module>
+    <module>prometheus-metrics-tracer-otel-agent</module>
+  </modules>
+
+</project>u}(j4  (2bd042af919c6581d56c682462cc70f7087728f4jK5  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljM5  addedjE5  K"jF5  K jO5  K"jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xs  @@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-common</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer Common</name>
+  <description>
+    Common Module for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+</project>u}(j4  (b53fe4d20100ea67179ff52a5d7df8ba607641a0jK5  }prometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/tracer/common/SpanContext.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javajT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.tracer.common;
+
+public interface SpanContext {
+
+  public static final String EXEMPLAR_ATTRIBUTE_NAME = "exemplar";
+  public static final String EXEMPLAR_ATTRIBUTE_VALUE = "true";
+
+  /**
+   * @return the current trace id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentTraceId();
+
+  /**
+   * @return the current span id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentSpanId();
+  
+  /**
+   * @return the state of the current Span. If this value is false a component before in the chain take the decision to not record it. Subsequent calling service have
+   * to respect this value in order not to have partial TraceID with only some Span in it. This value is important to be sure to choose a recorded Trace in Examplar
+   * sampling process
+   */
+  boolean isCurrentSpanSampled();
+
+  void markCurrentSpanAsExemplar();
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  Lprometheus-metrics-tracer/prometheus-metrics-tracer-common/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (ec939e20e9255d37cbc7560f38c7c70357b256bdjK5  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljM5  addedjE5  K4jF5  K jO5  K4jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-initializer</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer Initializer</name>
+  <description>
+    Initialize Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>u}(j4  (caecb60552207ed6ec9e37445fde04b60dfd0cddjK5  prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/src/main/java/io/prometheus/metrics/tracer/initializer/SpanContextSupplier.javajM5  addedjE5  K-jF5  K jO5  K-jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javajT5  X
  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xq  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.tracer.initializer;
+
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.otel.OpenTelemetrySpanContext;
+import io.prometheus.metrics.tracer.otel_agent.OpenTelemetryAgentSpanContext;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+public class SpanContextSupplier {
+
+    private static final AtomicReference<SpanContext> spanContextRef = new AtomicReference<SpanContext>();
+
+    public static void setSpanContext(SpanContext spanContext) {
+        spanContextRef.set(spanContext);
+    }
+
+    public static boolean hasSpanContext() {
+        return getSpanContext() != null;
+    }
+
+    public static SpanContext getSpanContext() {
+        return spanContextRef.get();
+    }
+
+    static {
+        try {
+            if (OpenTelemetrySpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetrySpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+        try {
+            if (OpenTelemetryAgentSpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetryAgentSpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel_agent dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+    }
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  Qprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (e24405186b4bca359cf017f6674d9d49a7219d42jK5  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljM5  addedjE5  KNjF5  K jO5  KNjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X	  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer OpenTelemetry Agent</name>
+  <description>
+    Prometheus integration with the OpenTelemetry Java agent for distributed tracing.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <relocations>
+                <relocation>
+                  <pattern>io.opentelemetry.api</pattern>
+                  <shadedPattern>io.opentelemetry.javaagent.shaded.io.opentelemetry.api</shadedPattern>
+                </relocation>
+              </relocations>
+              <artifactSet>
+                <excludes>
+                  <exclude>io.prometheus:prometheus-metrics-tracer-common</exclude>
+                </excludes>
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>u}(j4  (36cba7076b092af8770b5f56e2f172571c67f9cfjK5  prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/src/main/java/io/prometheus/metrics/tracer/otel_agent/OpenTelemetryAgentSpanContext.javajM5  addedjE5  K4jF5  K jO5  K4jP5  X  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javajR5  X  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javajT5  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XT  @@ -0,0 +1,52 @@
+package io.prometheus.metrics.tracer.otel_agent;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.tracer.common.SpanContext;
+
+/**
+ * This is exactly the same as the {@code OpenTelemetrySpanContextSupplier}.
+ * However, the {@code io.opentelemetry.api} package is relocated to
+ * {@code io.opentelemetry.javaagent.shaded.io.opentelemetry.api} in the OpenTelemetry agent.
+ */
+public class OpenTelemetryAgentSpanContext implements SpanContext {
+
+  public static boolean isAvailable() {
+    try {
+      OpenTelemetryAgentSpanContext test = new OpenTelemetryAgentSpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+  @Override
+  public String getCurrentTraceId() {
+    String traceId = Span.current().getSpanContext().getTraceId();
+    return TraceId.isValid(traceId) ? traceId : null;
+  }
+
+  @Override
+  public String getCurrentSpanId() {
+    String spanId = Span.current().getSpanContext().getSpanId();
+    return SpanId.isValid(spanId) ? spanId : null;
+  }
+
+  @Override
+  public boolean isCurrentSpanSampled() {
+    return Span.current().getSpanContext().isSampled();
+  }
+
+  @Override
+  public void markCurrentSpanAsExemplar() {
+    Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+  }
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  Pprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (6ee789fdf7f61da9eedc33f7d650ebffe5e733e3jK5  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljM5  addedjE5  K0jF5  K jO5  K0jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer OpenTelemetry</name>
+  <description>
+    Prometheus integration with the OpenTelemetry distributed tracing library.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+</project>u}(j4  (dd338cea292518a3692b778903027da876b61ad6jK5  prometheus-metrics-tracer/prometheus-metrics-tracer-otel/src/main/java/io/prometheus/metrics/tracer/otel/OpenTelemetrySpanContext.javajM5  addedjE5  K/jF5  K jO5  K/jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javajT5  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X)  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.tracer.otel;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.tracer.common.SpanContext;
+
+public class OpenTelemetrySpanContext implements SpanContext {
+
+	public static boolean isAvailable() {
+    try {
+      OpenTelemetrySpanContext test = new OpenTelemetrySpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+	@Override
+	public String getCurrentTraceId() {
+		String traceId = Span.current().getSpanContext().getTraceId();
+		return TraceId.isValid(traceId) ? traceId : null;
+	}
+
+	@Override
+	public String getCurrentSpanId() {
+		String spanId = Span.current().getSpanContext().getSpanId();
+		return SpanId.isValid(spanId) ? spanId : null;
+	}
+
+	@Override
+	public boolean isCurrentSpanSampled() {
+		return Span.current().getSpanContext().isSampled();
+	}
+
+	@Override
+	public void markCurrentSpanAsExemplar() {
+		Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+	}
+}u}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  Jprometheus-metrics-tracer/prometheus-metrics-tracer-otel/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjK5  +prometheus-metrics-tracer/version-rules.xmljM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fversion-rules.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/prometheus-metrics-tracer%2Fversion-rules.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fversion-rules.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j4  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cjK5  protobuf-shaded/.gitignorejM5  addedjE5  KjF5  K jO5  KjP5  thttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2F.gitignorejR5  shttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2F.gitignorejT5  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  @@ -0,0 +1 @@
+src/main/javau}(j4  (5db4149b724982e6ff8f55ae96f4f8a07804d590jK5  protobuf-shaded/README.mdjM5  addedjE5  KjF5  K jO5  KjP5  shttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2FREADME.mdjR5  rhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2FREADME.mdjT5  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  @@ -0,0 +1 @@
+See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j4  (42cb34138a9bcae4a594f094ca5b771b62de4105jK5  protobuf-shaded/pom.xmljM5  addedjE5  KjF5  K jO5  KjP5  qhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2Fpom.xmljR5  phttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/protobuf-shaded%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xr  @@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>protobuf-shaded</artifactId>
+    <name>Shaded (relocated to another package) Protobuf</name>
+    <description>
+        Downloads Google Protobuf, compiles it, and reloacates/shades.
+        See also hbase-thirdparty/hbase-shaded-protobuf
+    </description>
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <!-- include the protos -->
+                    <include>google/**</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <!--Clean needs to purge src/main/java since this is where
+                     the unpack of protobuf is overlaid. Do it for usual
+                     clean goal but also before we unpack in case patches
+                     delete/add files. We use src/main/java instead of dir
+                     under 'target' because the jar plugin is dumb, hard to
+                     make it source from other then src/main/java.-->
+                <artifactId>maven-clean-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>pre-generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>${basedir}/src/main/java</directory>
+                            <includes>
+                                <include>**/**</include>
+                            </includes>
+                            <followSymlinks>false</followSymlinks>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+            <plugin>
+                <!--Download our dependency src, i.e. protobuf, and
+                     unpack it. Overlays src/main/java so ready for
+                    compile-time (the jar plugin expects src in
+                    src/main/java)-->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <!--
+                              The protobuf-java has no compile or runtime dependency so we
+                              only depend it here, without adding it to our dependencies
+                              section. Need to review later if protobuf-java has compile or
+                              runtime dependencies in the future.
+                            -->
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.google.protobuf</groupId>
+                                    <artifactId>protobuf-java</artifactId>
+                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
+                                    <version>3.21.7</version>
+                                    <classifier>sources</classifier>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
+                                    <includes>**/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>google/protobuf/*.proto</exclude>
+                        <exclude>google/protobuf/compiler/*.proto</exclude>
+                    </excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--Above we built a jar. Now at package step, do relocation/shade-->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>
+                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
+                                    </shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>google/protobuf/*.proto</exclude>
+                        <exclude>google/protobuf/compiler/*.proto</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j4  (16dd46d4f12193c14bd4e485174a5f901371da77jK5  simpleclient/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  nhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient%2Fpom.xmljR5  mhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X;  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j4  (e54830a6d8004739ebd6991e57fd90a5beed57a7jK5  simpleclient_bom/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  rhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_bom%2Fpom.xmljR5  qhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_bom%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X?  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j4  (d6a195f49944134cbdc277d3620eb507f86d084ajK5  simpleclient_caffeine/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  whttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_caffeine%2Fpom.xmljR5  vhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_caffeine%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.github.ben-manes.caffeine</groupId>u}(j4  (67c05bbcdb4cfcc4484d06f4cc7f16a8cc72f879jK5  simpleclient_common/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  uhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_common%2Fpom.xmljR5  thttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_common%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j4  (f6aeabbe558cdbbad5a448317ae3b5624730c48fjK5  simpleclient_dropwizard/pom.xmljM5  modifiedjE5  KjF5  K0jO5  K3jP5  yhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_dropwizard%2Fpom.xmljR5  xhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_dropwizard%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X	  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.dropwizard.metrics</groupId>
@@ -63,49 +63,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>u}(j4  (862ebd4c8c54a97ac08b108cdb0673034b871b5fjK5  $simpleclient_graphite_bridge/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  ~https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_graphite_bridge%2Fpom.xmljR5  }https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_graphite_bridge%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j4  (9ddb2f231b13ab06a81fee63bf3ce105540776a6jK5  simpleclient_guava/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  thttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_guava%2Fpom.xmljR5  shttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_guava%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>u3     }(j4  (58695646606877516cc68a13832e3830a3dc0431jK5  simpleclient_hibernate/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  xhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_hibernate%2Fpom.xmljR5  whttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_hibernate%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- We support Hibernate versions >= 4.2 -->u}(j4  (30c3f5ed79f448501246b4ccf971599110d3f4ddjK5  simpleclient_hotspot/pom.xmljM5  modifiedjE5  KjF5  K0jO5  K4jP5  vhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_hotspot%2Fpom.xmljR5  uhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_hotspot%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>
@@ -36,14 +36,14 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         
         <!-- Test Dependencies Follow -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -67,48 +67,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
 </project>u}(j4  (693bc9dccf3d1a2ba3122faac0d34adedd68abf7jK5  simpleclient_httpserver/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  yhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_httpserver%2Fpom.xmljR5  xhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_httpserver%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>
@@ -36,12 +36,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j4  (44a8dd332c8e21c85465dfbad45772b717946825jK5  simpleclient_jetty/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  thttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_jetty%2Fpom.xmljR5  shttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_jetty%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>
@@ -38,7 +38,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(j4  (5ed130a89db28eacdf2731f36bddf89ce170575djK5  simpleclient_jetty_jdk8/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  yhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_jetty_jdk8%2Fpom.xmljR5  xhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_jetty_jdk8%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>
@@ -16,19 +16,6 @@
         Collector of data from Jetty Statistics for Jetty versions which require JDK 8.
     </description>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
@@ -47,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(j4  (67d294ff7eb58eac134c447445ed586e96f3187ajK5  simpleclient_log4j/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  thttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_log4j%2Fpom.xmljR5  shttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_log4j%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j4  (13af55105af26d0bd311e939da3b9ea151802d1ejK5  simpleclient_log4j2/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  uhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_log4j2%2Fpom.xmljR5  thttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_log4j2%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j4  (51aaa5cdef9bfb4fb37bbab8474740d88337bd64jK5  simpleclient_logback/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  vhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_logback%2Fpom.xmljR5  uhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_logback%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>u}(j4  (6197919d58ef87fd8f6f05fbb6c108d4f764cc01jK5   simpleclient_pushgateway/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  zhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_pushgateway%2Fpom.xmljR5  yhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_pushgateway%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>
@@ -37,12 +37,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>u}(j4  (2e2033e41547903e43a9998f0332fd406ba3c524jK5  simpleclient_servlet/pom.xmljM5  modifiedjE5  KjF5  KjO5  K
jP5  vhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet%2Fpom.xmljR5  uhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>u}(j4  (df5068323a33744892e30f236a3492dead6de827jK5  #simpleclient_servlet_common/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  }https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet_common%2Fpom.xmljR5  |https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet_common%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>
@@ -40,12 +40,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j4  (ede162091d55ab298c96343edf8eb8fce6d0cfc2jK5  $simpleclient_servlet_jakarta/pom.xmljM5  modifiedjE5  KjF5  KjO5  K
jP5  ~https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet_jakarta%2Fpom.xmljR5  }https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_servlet_jakarta%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u}(j4  (0f8e40208fbe5c3b4c6d8bedf8cdf56412086909jK5   simpleclient_spring_boot/pom.xmljM5  modifiedjE5  KjF5  KjO5  K
jP5  zhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_spring_boot%2Fpom.xmljR5  yhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_spring_boot%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_boot%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_boot</artifactId>
@@ -51,17 +51,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
           <groupId>io.prometheus</groupId>
           <artifactId>simpleclient_spring_web</artifactId>
-          <version>0.16.1-SNAPSHOT</version>
+          <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>u}(j4  (982d8f2274b88bde88935de1130cf2809a51bcd0jK5  simpleclient_spring_web/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  yhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_spring_web%2Fpom.xmljR5  xhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_spring_web%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>
@@ -51,12 +51,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>u}(j4  (92f806f61fb61bf54e492975125275928f19b4d3jK5  simpleclient_tracer/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  uhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fpom.xmljR5  thttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X(  @@ -4,8 +4,8 @@
 
   <parent>
     <groupId>io.prometheus</groupId>
-    <artifactId>parent</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j4  (5536dfe89887ce6789f09401e63da87ae32151f2jK5  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j4  (dedf920421314c40bb06d69a6bc12f41bd3b466ajK5  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>
@@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j4  (488b3db0a344f652b735f1e9be805287ba74f1d5jK5  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljM5  modifiedjE5  KjF5  K	jO5  K
jP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>
@@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j4  (dd3fba81c862be1074d9a8a3e31c8203eb4be9f7jK5  simpleclient_vertx/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  thttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_vertx%2Fpom.xmljR5  shttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_vertx%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -1,23 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j4  (5ddc9f56747dfeb609a44f7e93908da7549d775fjK5  simpleclient_vertx4/pom.xmljM5  modifiedjE5  KjF5  KjO5  KjP5  uhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_vertx4%2Fpom.xmljR5  thttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/simpleclient_vertx4%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -1,23 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>u}(j4  (59dda206f3b26c5025ba10b482f2e25e3f5561ffjK5  tmp_example/pom.xmljM5  addedjE5  KbjF5  K jO5  KbjP5  mhttps://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fpom.xmljR5  lhttps://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fpom.xmljT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tmp_example</artifactId>
+
+    <name>Example for Manual Testing</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>io.opentelemetry</groupId>
+                <artifactId>opentelemetry-bom</artifactId>
+                <version>1.27.0</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-testing</artifactId>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+        </dependency>
+        -->
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>1.27.0-alpha</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-core</artifactId>
+            <version>1.36</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-generator-annprocess</artifactId>
+            <version>1.36</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <!-- <mainClass>com.example.ManualNativeHistogramBenchmark</mainClass> -->
+                                    <mainClass>com.example.LongRunningNativeHistogramLoadTest</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j4  (b5402f30ee042a51267ee047d7f26455643add63jK5  :tmp_example/src/main/java/com/example/BenchmarkRunner.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XS  @@ -0,0 +1,219 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.LongCounter;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
+import io.opentelemetry.context.propagation.ContextPropagators;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Threads;
+
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+//@State(Scope.Benchmark)
+public class BenchmarkRunner {
+
+    static double[] random = new double[10*1024*1024];
+    private static void initRandom() {
+        Random rand = new Random(0);
+        for (int i=0; i<random.length; i++) {
+            random[i] = Math.abs(rand.nextGaussian());
+        }
+        System.out.println("random init done");
+    }
+    public static void main(String[] args) throws Exception {
+        //org.openjdk.jmh.Main.main(args);
+        /*
+        BenchmarkRunner r = new BenchmarkRunner();
+        r.setUp();
+        for (int i=0; i<10; i++) {
+            //r.benchmarkOtelCounter();
+            //r.benchmarkPrometheusCounter();
+            r.benchmarkOtelHistogram();
+            r.benchmarkPrometheusHistogram();
+        }
+
+         */
+    }
+
+    /*
+    private DiscreteEventObserver goodCases;
+    private DiscreteEventObserver errorCases;
+
+    private Attributes goodCaseAttr;
+    private Attributes errorCaseAttr;
+    //private LongCounter otelCounter;
+    private LongCounter otelCounter;
+
+    private DoubleAdder doubleAdder;
+    private LongAdder longAdder;
+
+    private Histogram histogram;
+    DoubleHistogram otelHist;
+
+    private AtomicBoolean atomicBoolean = new AtomicBoolean();
+    //@Setup
+    public void setUp() {
+        Counter counter = Counter.newBuilder()
+                .withLabelNames("path", "status")
+                .withName("events_total")
+                //.withoutExemplars()
+                .register();
+        goodCases = counter.withLabelValues("/get", "200");
+        errorCases = counter.withLabelValues("/get", "500");
+
+        histogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+
+        // -------- otel, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        //SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
+        //        .addSpanProcessor(BatchSpanProcessor.builder(OtlpGrpcSpanExporter.builder().build()).build())
+                .setResource(resource)
+         //       .build();
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("lksd")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
+                                .build()
+                        )
+                .build();
+
+
+       // SdkLoggerProvider sdkLoggerProvider = SdkLoggerProvider.builder()
+       //         .addLogRecordProcessor(BatchLogRecordProcessor.builder(OtlpGrpcLogRecordExporter.builder().build()).build())
+        //        .setResource(resource)
+         //       .build();
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                //.setTracerProvider(sdkTracerProvider)
+                .setMeterProvider(sdkMeterProvider)
+                //.setLoggerProvider(sdkLoggerProvider)
+                .setPropagators(ContextPropagators.create(W3CTraceContextPropagator.getInstance()))
+                .buildAndRegisterGlobal();
+
+        Meter meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+
+        otelCounter = meter
+                .counterBuilder("processed_jobs")
+                //.ofDoubles()
+                .setDescription("Processed jobs")
+                .setUnit("1")
+                .build();
+
+        if (!"base2_exponential_bucket_histogram".equals(System.getenv("OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION"))) {
+            throw new RuntimeException("export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=base2_exponential_bucket_histogram");
+        }
+        otelHist = meter.histogramBuilder("lksd")
+                //.ofLongs()
+                .build();
+
+        goodCaseAttr = Attributes.builder().put("path", "/get").put("status", "200").build();
+        errorCaseAttr = Attributes.builder().put("path", "/get").put("status", "500").build();
+
+        doubleAdder = new DoubleAdder();
+        longAdder = new LongAdder();
+
+        initRandom();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public boolean benchmarkAtomicBoolean() {
+        return atomicBoolean.get();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public long benchmarkNanoTime() {
+        return System.nanoTime();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public long benchmarkCurrentTimeMillis() {
+        return System.currentTimeMillis();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkDoubleAdder() {
+        doubleAdder.add(1.0);
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkLongAdder() {
+        longAdder.add(1);
+    }
+
+    //@Benchmak
+    @Threads(4)
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkPrometheusHistogram() {
+        for (double observation : random) {
+            histogram.observe(observation);
+        }
+    }
+
+    //@Benchmark
+    @Threads(4)
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkOtelHistogram() {
+        for (double observation : random) {
+            otelHist.record(observation);
+        }
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkPrometheusCounter() {
+        for (int i = 100; i > 0; i--) {
+            if (i % 8 == 0) {
+                errorCases.inc();
+            } else {
+                goodCases.inc();
+            }
+        }
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkOtelCounter() {
+        for (int i = 100; i > 0; i--) {
+            if (i % 8 == 0) {
+                otelCounter.add(1, errorCaseAttr);
+            } else {
+                otelCounter.add(1, goodCaseAttr);
+            }
+        }
+    }
+    */
+}u}(j4  (fd110a7d62ef873f95d604ddf3104f3273d33771jK5  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javajM5  addedjE5  KpjF5  K jO5  KpjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,112 @@
+package com.example;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class LongRunningNativeHistogramLoadTest {
+
+    private final int N_THREADS = 8;
+    private final double[][] randoms = new double[N_THREADS][10 * 1024 * 1024];
+    private Histogram prometheusHistogram;
+
+    public static void main(String[] args) throws InterruptedException {
+        new LongRunningNativeHistogramLoadTest().run();
+    }
+
+    public void run() throws InterruptedException {
+        initRandomNumbers();
+        initPrometheusHistogram();
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(prometheusHistogram);
+        ExecutorService producers = Executors.newFixedThreadPool(N_THREADS);
+        ScheduledExecutorService scraper = Executors.newSingleThreadScheduledExecutor();
+
+        PrometheusProtobufWriter protoWriter = new PrometheusProtobufWriter();
+        OpenMetricsTextFormatWriter textWriter = new OpenMetricsTextFormatWriter(false, true);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        scraper.scheduleAtFixedRate(() -> {
+            try {
+                long start = System.nanoTime();
+                MetricSnapshots snapshots = registry.scrape();
+                Metrics.MetricFamily protobufData = protoWriter.convert(snapshots.get(0));
+                System.out.println("# ---------------------------------");
+                System.out.println("# " + dateFormat.format(Calendar.getInstance().getTime()));
+                System.out.println("# ---------------------------------");
+                textWriter.write(System.out, snapshots);
+                System.out.println(TextFormat.printer().shortDebugString(protobufData));
+                HistogramSnapshot.HistogramDataPointSnapshot data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
+                System.out.println("Schema: " + data.getNativeSchema());
+                System.out.println("Number of buckets: " + data.getNativeBucketsForPositiveValues().size());
+                long duration = System.nanoTime() - start;
+                System.out.println("[" + Thread.currentThread().getName() + "] scraping took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+                System.out.println();
+            } catch (Exception e) {
+                e.printStackTrace();
+                System.exit(-2);
+            }
+        }, 1, 2, TimeUnit.MINUTES);
+
+        // warmup
+        CountDownLatch cdl = new CountDownLatch(N_THREADS);
+        for (int thread = 0; thread < N_THREADS; thread++) {
+            producers.submit(cdl::countDown);
+        }
+        cdl.await();
+
+        for (int thread = 0; thread < N_THREADS; thread++) {
+            int finalThread = thread;
+            producers.submit(() -> {
+                double[] random = randoms[finalThread];
+                while (true) {
+                    try {
+                        long start = System.nanoTime();
+                        for (int i = 0; i < random.length; i++) {
+                            prometheusHistogram.observe(i);
+                        }
+                        long duration = System.nanoTime() - start;
+                        System.out.println("[" + Thread.currentThread().getName() + "] observing took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        System.exit(-1);
+                    }
+                }
+            });
+        }
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder()
+                .withName("test")
+                .withNativeResetDuration(60, TimeUnit.MINUTES)
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < N_THREADS; i++) {
+            for (int j = 0; j < randoms[i].length; j++) {
+                double observation = 0;
+                while (observation < 0.13 || observation > 2.4) { // simulate observations around 180ms
+                    observation = rand.nextGaussian() + 0.18;
+                }
+                randoms[i][j] = observation;
+            }
+        }
+        System.out.println("random init done");
+    }
+}u}(j4  (1b6bf2a3909909213477645c81e71a30430d3335jK5  /tmp_example/src/main/java/com/example/Main.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,22 @@
+package com.example;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+
+import java.io.IOException;
+
+public class Main {
+
+    public static void main(String[] args) throws IOException {
+        Counter counter = Counter.newBuilder()
+                .withLabelNames("path", "status")
+                .withName("events_total")
+                .register();
+        CounterDataPoint goodCase = counter.withLabelValues("/get", "200");
+        CounterDataPoint errorCase = counter.withLabelValues("/get", "500");
+        goodCase.inc();
+        errorCase.inc();
+        HTTPServer.newBuilder().withPort(9000).build();
+    }
+}u}(j4  (d19badefa4c286b3269bbd49b877a5523d37f3e9jK5  Itmp_example/src/main/java/com/example/ManualNativeHistogramBenchmark.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XY  @@ -0,0 +1,172 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Histogram;
+
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Consumer;
+
+public class ManualNativeHistogramBenchmark {
+
+
+    private final int MAX_THREADS = 48;
+    private final double[][] randoms = new double[MAX_THREADS][10 * 1024 * 1024];
+    private Meter meter;
+    private Histogram prometheusHistogram;
+    private DoubleHistogram otelHistogram;
+
+    public static void main(String[] args) throws InterruptedException {
+        ManualNativeHistogramBenchmark benchmark = new ManualNativeHistogramBenchmark();
+        benchmark.setUp();
+        for (int threads = 1; threads <= 48; threads++) {
+            System.out.println();
+            System.out.println("# " + threads + " Threads");
+            System.out.println();
+            benchmark.run(threads);
+        }
+    }
+
+    private void runParallel(String msg, Consumer<Integer> func, ExecutorService executorService, int nThreads) throws InterruptedException {
+        long start = System.nanoTime();
+        CountDownLatch cdl = new CountDownLatch(nThreads);
+        for (int thread = 0; thread < nThreads; thread++) {
+            int finalThread = thread;
+            executorService.submit(() -> {
+                func.accept(finalThread);
+                cdl.countDown();
+            });
+        }
+        cdl.await();
+        long duration = System.nanoTime() - start;
+        System.out.println(msg + " took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+    }
+
+    public void run(int nThreads) throws InterruptedException {
+        if (nThreads > MAX_THREADS) {
+            throw new IllegalStateException();
+        }
+        ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
+        CountDownLatch countDownLatch = new CountDownLatch(nThreads);
+        for (int i = 0; i < nThreads; i++) {
+            executorService.submit(countDownLatch::countDown);
+        }
+        countDownLatch.await();
+
+        int nWarmupIterations = 5;
+        int nRealIterations = 8;
+
+        // prometheus
+        for (int i = 0; i < nWarmupIterations; i++) {
+            runParallel("Prometheus warmup iteration " + (i + 1) + " of " + nWarmupIterations, this::runPrometheusBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+        for (int i = 0; i < nRealIterations; i++) {
+            runParallel("Prometheus iteration " + (i + 1) + " of " + nRealIterations, this::runPrometheusBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+
+        // otel
+        for (int i = 0; i < nWarmupIterations; i++) {
+            runParallel("OTel warmup iteration " + (i + 1) + " of " + nWarmupIterations, this::runOTelBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+        for (int i = 0; i < nRealIterations; i++) {
+            runParallel("OTel iteration " + (i + 1) + " of " + nRealIterations, this::runOTelBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+    }
+
+
+    public void runPrometheusBenchmark(int threadNumber) {
+        try {
+            for (double observation : randoms[threadNumber]) {
+                prometheusHistogram.observe(observation);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(-1);
+        }
+    }
+
+    public void runOTelBenchmark(int threadNumber) {
+        try {
+            for (double observation : randoms[threadNumber]) {
+                otelHistogram.record(observation);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(-1);
+        }
+    }
+
+    public void setUp() {
+        initPrometheusHistogram();
+        initOTelMeter();
+        initOTelHistogram();
+        initRandomNumbers();
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+    }
+
+    private void initOTelMeter() {
+
+        // OTel SDK initialization, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("test.histogram")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
+                                .build()
+                )
+                .build();
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                .setMeterProvider(sdkMeterProvider)
+                .buildAndRegisterGlobal();
+
+        meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+    }
+
+    private void initOTelHistogram() {
+        otelHistogram = meter.histogramBuilder("test.histogram")
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < MAX_THREADS; i++) {
+            for (int j = 0; j < randoms[i].length; j++) {
+                randoms[i][j] = Math.abs(rand.nextGaussian());
+            }
+        }
+        System.out.println("random init done");
+    }
+}u}(j4  (0c3aadfbd02979c5afaa24a82fd01759661d65fajK5  Ctmp_example/src/main/java/com/example/NativeHistogramBenchmark.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  Xf  @@ -0,0 +1,151 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Histogram;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Threads;
+
+import java.io.IOException;
+import java.util.Random;
+
+@State(Scope.Benchmark)
+public class NativeHistogramBenchmark {
+
+    private final double[] random = new double[10 * 1024 * 1024];
+    private Histogram prometheusHistogram;
+    private DoubleHistogram otelHistogram;
+
+    public static void main(String[] args) throws IOException {
+        org.openjdk.jmh.Main.main(args);
+    }
+
+    @Setup
+    public void setUp() {
+        initPrometheusHistogram();
+        initOTelHistogram();
+        initRandomNumbers();
+    }
+
+    @Benchmark
+    @Threads(1)
+    public void benchmarkPrometheusHistogram_1_thread() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(1)
+    public void benchmarkOtelHistogram_1_thread() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(2)
+    public void benchmarkPrometheusHistogram_2_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(2)
+    public void benchmarkOtelHistogram_2_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(4)
+    public void benchmarkPrometheusHistogram_4_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(4)
+    public void benchmarkOtelHistogram_4_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(8)
+    public void benchmarkPrometheusHistogram_8_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(8)
+    public void benchmarkOtelHistogram_8_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+    }
+
+    private void initOTelHistogram() {
+
+        // OTel SDK initialization, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("test.histogram")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
+                                .build()
+                )
+                .build();
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                .setMeterProvider(sdkMeterProvider)
+                .buildAndRegisterGlobal();
+
+        Meter meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+
+        otelHistogram = meter.histogramBuilder("test.histogram")
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < random.length; i++) {
+            random[i] = Math.abs(rand.nextGaussian());
+        }
+        System.out.println("random init done");
+    }
+}u}(j4  (c01be427bf0de90ad01afc6b48fce538165eccafjK5  Stmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajM5  addedjE5  MsjF5  K jO5  MsjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  XJ;  @@ -0,0 +1,371 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = new HTTPServer(1234);
+ * }
+ * </pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    static class NamedDaemonThreadFactory implements ThreadFactory {
+        private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+
+        private final int poolNumber = POOL_NUMBER.getAndIncrement();
+        private final AtomicInteger threadNumber = new AtomicInteger(1);
+        private final ThreadFactory delegate;
+        private final boolean daemon;
+
+        NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+            this.delegate = delegate;
+            this.daemon = daemon;
+        }
+
+        @Override
+        public Thread newThread(Runnable r) {
+            Thread t = delegate.newThread(r);
+            t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+            t.setDaemon(daemon);
+            return t;
+        }
+
+        static ThreadFactory defaultThreadFactory(boolean daemon) {
+            return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    /**
+     * We keep the original constructors of {@link HTTPServer} for compatibility, but new configuration
+     * parameters like {@code sampleNameFilter} must be configured using the Builder.
+     */
+    public static class Builder {
+
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private HttpServer httpServer = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private boolean daemon = false;
+        private Predicate<String> sampleNameFilter;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder() {}
+
+        /**
+         * Port to bind to. Must not be called together with {@link #withInetSocketAddress(InetSocketAddress)}
+         * or {@link #withHttpServer(HttpServer)}. Default is 0, indicating that a random port will be selected.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        public Builder withProperties(ExporterHttpServerProperties properties) {
+            this.properties = properties;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to. Must not be called together with
+         * {@link #withInetAddress(InetAddress)} or {@link #withInetSocketAddress(InetSocketAddress)}
+         * or {@link #withHttpServer(HttpServer)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address. Must not be called together with {@link #withHostname(String)} or
+         * {@link #withInetSocketAddress(InetSocketAddress)} or {@link #withHttpServer(HttpServer)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Listen on this address. Must not be called together with {@link #withPort(int)},
+         * {@link #withHostname(String)}, {@link #withInetAddress(InetAddress)}, or {@link #withHttpServer(HttpServer)}.
+         */
+        public Builder withInetSocketAddress(InetSocketAddress address) {
+            this.inetSocketAddress = address;
+            return this;
+        }
+
+        /**
+         * Use this httpServer. The {@code httpServer} is expected to already be bound to an address.
+         * Must not be called together with {@link #withPort(int)}, or {@link #withHostname(String)},
+         * or {@link #withInetAddress(InetAddress)}, or {@link #withInetSocketAddress(InetSocketAddress)},
+         * or {@link #withExecutorService(ExecutorService)}.
+         */
+        public Builder withHttpServer(HttpServer httpServer) {
+            this.httpServer = httpServer;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         * Must not be called together with the {@link #withHttpServer(HttpServer)}.
+         *
+         * @param executorService
+         * @return
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * By default, the {@link HTTPServer} uses non-daemon threads. Set this to {@code true} to
+         * run the {@link HTTPServer} with daemon threads.
+         */
+        public Builder withDaemonThreads(boolean daemon) {
+            this.daemon = daemon;
+            return this;
+        }
+
+        /**
+         * Optional: Only export time series where {@code sampleNameFilter.test(name)} returns true.
+         */
+        public Builder withSampleNameFilter(Predicate<String> sampleNameFilter) {
+            this.sampleNameFilter = sampleNameFilter;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} to use to support authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} to use to support TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort();
+            }
+            if (port != null) {
+                return port;
+            }
+            ExporterHttpServerProperties defaultProperties = PrometheusProperties.get().getExporterHttpServerProperties();
+            if (defaultProperties != null && defaultProperties.getPort() != null) {
+                return defaultProperties.getPort();
+            }
+            return 0; // random port will be selected
+        }
+
+        /**
+         * Build the HTTPServer
+         * @throws IOException
+         */
+        public HTTPServer build() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+
+            if (httpServer != null) {
+                assertNull(executorService, "cannot configure 'httpServer' and `executorService'");
+                assertZero(port, "cannot configure 'httpServer' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'httpServer' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'httpServer' and 'inetAddress' at the same time");
+                assertNull(inetSocketAddress, "cannot configure 'httpServer' and 'inetSocketAddress' at the same time");
+                assertNull(httpsConfigurator, "cannot configure 'httpServer' and 'httpsConfigurator' at the same time");
+                return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilter, authenticator);
+            } else if (inetSocketAddress != null) {
+                assertZero(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                inetSocketAddress = new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                inetSocketAddress = new InetSocketAddress(hostname, findPort());
+            } else {
+                inetSocketAddress = new InetSocketAddress(findPort());
+            }
+
+            HttpServer httpServer = null;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(inetSocketAddress, 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(inetSocketAddress, 3);
+            }
+
+            return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilter, authenticator);
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+
+        private void assertZero(int i, String msg) {
+            if (i != 0) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+
+
+
+    private HTTPServer(ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, boolean daemon, Predicate<String> sampleNameFilter, Authenticator authenticator) {
+        if (httpServer.getAddress() == null)
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+
+        server = httpServer;
+        List<ExpositionFormatWriter> expositionFormatWriters = Arrays.asList(
+                new PrometheusTextFormatWriter(true),
+                new OpenMetricsTextFormatWriter(true, true),
+                new PrometheusProtobufWriter());
+        HttpHandler mHandler = new MetricsHandler(registry, expositionFormatWriters, sampleNameFilter);
+        HttpHandler hHandler = new HealthyHandler();
+        HttpContext mContext = server.createContext("/", mHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        mContext = server.createContext("/metrics", mHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        mContext = server.createContext("/-/healthy", hHandler);
+        if (authenticator != null) {
+            mContext.setAuthenticator(authenticator);
+        }
+        if (executorService != null) {
+            this.executorService = executorService;
+        } else {
+            ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(daemon));
+            executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+            this.executorService = executor;
+        }
+        server.setExecutor(this.executorService);
+        start(daemon);
+    }
+
+    /**
+     * Start an HTTP server by making sure that its background thread inherit proper daemon flag.
+     */
+    private void start(boolean daemon) {
+        if (daemon == Thread.currentThread().isDaemon()) {
+            server.start();
+        } else {
+            FutureTask<Void> startTask = new FutureTask<Void>(new Runnable() {
+                @Override
+                public void run() {
+                    server.start();
+                }
+            }, null);
+            NamedDaemonThreadFactory.defaultThreadFactory(daemon).newThread(startTask).start();
+            try {
+                startTask.get();
+            } catch (ExecutionException e) {
+                throw new RuntimeException("Unexpected exception on starting HTTPSever", e);
+            } catch (InterruptedException e) {
+                // This is possible only if the current tread has been interrupted,
+                // but in real use cases this should not happen.
+                // In any case, there is nothing to do, except to propagate interrupted flag.
+                Thread.currentThread().interrupt();
+            }
+        }
+    }
+
+    /**
+     * Stop the HTTP server.
+     * @deprecated renamed to close(), so that the HTTPServer can be used in try-with-resources.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+}u      }(j4  (ccf47a1aa43c7fac4008193117b30a84e967a71ajK5  Wtmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final static byte[] HEALTHY_RESPONSE = "Exporter is Healthy.".getBytes(StandardCharsets.UTF_8);
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        // TODO: This is not complete (http status? compression? content length?)
+        exchange.getResponseBody().write(HEALTHY_RESPONSE);
+        exchange.close();
+    }
+}u}(j4  (26cce5bb35d8fb21e4c9392f16d688d17dcd4046jK5  Wtmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javajM5  addedjE5  KjF5  K jO5  KjP5  https://github.com/prometheus/client_java/blob/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajR5  https://github.com/prometheus/client_java/raw/d516e835c45fa29e0dc102a24d37ac255b94f8fe/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajT5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=d516e835c45fa29e0dc102a24d37ac255b94f8fejV5  X}  @@ -0,0 +1,137 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final List<ExpositionFormatWriter> expositionFormatWriters = new ArrayList<>();
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue() {
+            return new ByteArrayOutputStream(1 << 20); // 1 MB
+        }
+    }
+
+    private final PrometheusRegistry registry;
+    private final LocalByteArray response = new LocalByteArray();
+    private final Predicate<String> sampleNameFilter;
+
+    public MetricsHandler(PrometheusRegistry registry, List<ExpositionFormatWriter> expositionFormatWriters) {
+        this(registry, expositionFormatWriters, null);
+    }
+
+    public MetricsHandler(PrometheusRegistry registry,
+                          List<ExpositionFormatWriter> expositionFormatWriters,
+                          Predicate<String> sampleNameFilter) {
+        this.registry = registry;
+        this.sampleNameFilter = sampleNameFilter;
+        this.expositionFormatWriters.addAll(expositionFormatWriters);
+        if (expositionFormatWriters.isEmpty()) {
+            throw new IllegalStateException("Need at least one exposition format");
+        }
+    }
+
+    private ExpositionFormatWriter findExpositionFormatWriter(String acceptHeader) {
+        for (ExpositionFormatWriter writer : expositionFormatWriters) {
+            if (writer.accepts(acceptHeader)) {
+                return writer;
+            }
+        }
+        return expositionFormatWriters.get(0);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        String query = t.getRequestURI().getRawQuery();
+        ByteArrayOutputStream response = this.response.get();
+        response.reset();
+        String acceptHeader = t.getRequestHeaders().getFirst("Accept");
+        ExpositionFormatWriter writer = findExpositionFormatWriter(acceptHeader);
+        t.getResponseHeaders().set("Content-Type", writer.getContentType());
+        Predicate<String> nameFilterFromQueryParameter = getNamesFilterFromQueryParameter(query);
+        Predicate<String> filter = sampleNameFilter;
+        if (filter != null && nameFilterFromQueryParameter != null) {
+            filter = filter.and(nameFilterFromQueryParameter);
+        } else if (nameFilterFromQueryParameter != null) {
+            filter = nameFilterFromQueryParameter;
+        }
+        if (filter == null) {
+            writer.write(response, registry.scrape());
+        } else {
+            writer.write(response, registry.scrape(filter)); // TODO: filter is "includes", but expected parameter is "excludes"
+        }
+        response.close();
+        if (shouldUseCompression(t)) {
+            t.getResponseHeaders().set("Content-Encoding", "gzip");
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
+            final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
+            try {
+                response.writeTo(os);
+            } finally {
+                os.close();
+            }
+        } else {
+            long contentLength = response.size();
+            if (contentLength > 0) {
+                t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
+            }
+            if (t.getRequestMethod().equals("HEAD")) {
+                contentLength = -1;
+            }
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
+            response.writeTo(t.getResponseBody());
+        }
+        t.close();
+    }
+
+    private boolean shouldUseCompression(HttpExchange exchange) {
+        List<String> encodingHeaders = exchange.getRequestHeaders().get("Accept-Encoding");
+        if (encodingHeaders == null) return false;
+
+        for (String encodingHeader : encodingHeaders) {
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private Predicate<String> getNamesFilterFromQueryParameter(String query) throws IOException {
+        Set<String> names = new HashSet<>();
+        if (query != null) {
+            String[] pairs = query.split("&");
+            for (String pair : pairs) {
+                int idx = pair.indexOf("=");
+                if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals("name[]")) {
+                    names.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                }
+            }
+        }
+        if (!names.isEmpty()) {
+        return names::contains;
+        } else {
+            return null;
+        }
+    }
+}ueu(cb5dac428cb7890cbbc2dace1d3cc897535ac06f}(sha(cb5dac428cb7890cbbc2dace1d3cc897535ac06fnode_idEC_kwDOAHoJt9oAKGNiNWRhYzQyOGNiNzg5MGNiYmMyZGFjZTFkM2NjODk3NTM1YWMwNmYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T20:58:18Zu	committer}(j);  Fabian Stäberj+;  fabian@fstab.dej-;  2023-08-29T20:58:18Zumessage5[maven-release-plugin] prepare release v1.0.0-alpha-3tree}(j!;  (54ca4b50e18571020e09b68cc975bb780e97dd33urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/54ca4b50e18571020e09b68cc975bb780e97dd33uj9;  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cb5dac428cb7890cbbc2dace1d3cc897535ac06f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj9;  dhttps://api.github.com/repos/prometheus/client_java/commits/cb5dac428cb7890cbbc2dace1d3cc897535ac06fhtml_urlYhttps://github.com/prometheus/client_java/commit/cb5dac428cb7890cbbc2dace1d3cc897535ac06fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/commentsj';  }(loginfstabidJ' j#;  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j9;  "https://api.github.com/users/fstabjE;  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj/;  }(jJ;  fstabjL;  J' j#;  MDQ6VXNlcjMzMDUzNQ==jN;  2https://avatars.githubusercontent.com/u/330535?v=4jP;  h3j9;  "https://api.github.com/users/fstabjE;  https://github.com/fstabjS;  ,https://api.github.com/users/fstab/followersjU;  9https://api.github.com/users/fstab/following{/other_user}jW;  2https://api.github.com/users/fstab/gists{/gist_id}jY;  9https://api.github.com/users/fstab/starred{/owner}{/repo}j[;  0https://api.github.com/users/fstab/subscriptionsj];  'https://api.github.com/users/fstab/orgsj_;  (https://api.github.com/users/fstab/reposja;  3https://api.github.com/users/fstab/events{/privacy}jc;  2https://api.github.com/users/fstab/received_eventsje;  Userjg;  uparents]}(j!;  (de20057419d811cc00b1b70476c7f0cc2253c2eej9;  dhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2eejE;  Yhttps://github.com/prometheus/client_java/commit/de20057419d811cc00b1b70476c7f0cc2253c2eeuastats}(totalK	additionsKS	deletionsK^ufiles](}(j!;  (1aa6fad17f8448b4813133428045ea68c6ed65b7filenamebenchmarks/pom.xmlstatusmodifiedj;  Kj;  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j!;  (a8eeb5d4899c6e6dc613e80cf502fd8fd3f3297aj;  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(j!;  (c431418ed65338d41f9b1faac6b53f8004f437c1j;  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(j!;  (65484d6e1a964c16071cb9d2c5104c8e07518e43j;  0examples/example-exemplars-tail-sampling/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(j!;  (467fb348d3540f7f12fd2280e78f7c5e2666e1c0j;  ,examples/example-exporter-httpserver/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-httpserver%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-httpserver%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,12 +5,12 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>>Example - HTTPServer Exporter</name>
+    <name>&gt;Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>u}(j!;  (a90000162976d67cffbf4c60adc1df18b8061945j;  /examples/example-exporter-opentelemetry/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-opentelemetry</artifactId>u}(j!;  (fc2cfb93084d8ea116fcdfcc9704281a42167ff9j;  0examples/example-exporter-servlet-tomcat/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-servlet-tomcat</artifactId>u}(j!;  (df80b2dc93e1886d75231276c6887c3b6c5ae5c3j;  examples/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  jhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fpom.xmlj;  ihttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/examples%2Fpom.xmlj;  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j!;  (3b1f6e7bf6f480163b55858fa7b9c5b61743b7b9j;  #integration-tests/it-common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-common%2Fpom.xmlj;  ~https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-common</artifactId>u}(j!;  (e4c82f5d72aa2f8536ab7f877eb5e1f4be2c814dj;  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-httpserver-sample</artifactId>
@@ -59,8 +58,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
                                 </transformer>
                             </transformers>u}(j!;  (d540031c377c2d883381a847189618fdd76ed5f2j;  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-jetty-sample</artifactId>
@@ -69,8 +68,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
                                 </transformer>
                             </transformers>u}(j!;  (14dc2264170775b2622597530fc42a07fc136e62j;  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
@@ -64,8 +63,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
                                 </transformer>
                             </transformers>u}(j!;  (46210fb410338d1e258af347f3f4fde0e3c346baj;  6integration-tests/it-exporter/it-exporter-test/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-test</artifactId>u}(j!;  (6cfe693920f8e46354ffb01d64e598afcd272578j;  %integration-tests/it-exporter/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fit-exporter%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  Xy  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter</artifactId>
@@ -29,7 +29,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j!;  (606f76c19ed294e2c332c4a2fbd85311de0cd1b1j;  integration-tests/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  shttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fpom.xmlj;  rhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration-tests%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X
  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration-tests</artifactId>u}(j!;  (4ca25a7cb88835a42732dce722982167d627406fj;  #integration_tests/it_common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_common%2Fpom.xmlj;  ~https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j!;  (b9273570915bf76bb9a52e590da4929148f866ddj;  1integration_tests/it_exemplars_otel_agent/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j!;  (9fb9b25466d0534e21016a36fded5f00accc97a5j;  /integration_tests/it_exemplars_otel_sdk/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j!;  (d64cb5d18c6caf1458c3c63a21c5a965978376aej;  *integration_tests/it_java_versions/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_java_versions%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_java_versions%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j!;  (30ad7acff60ea1dc2bc2a7ac1ef45ee9152f74d9j;  #integration_tests/it_log4j2/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_log4j2%2Fpom.xmlj;  ~https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_log4j2%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j!;  (b5ad62158281fc7bf60981f2d5440a07535b33f3j;  (integration_tests/it_pushgateway/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_pushgateway%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_pushgateway%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j!;  (d5778e6f8f81735ec093db9732f530e04b2c602ej;  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j!;  (2daf4dfacef43eb4557b60356fdea520c9724bf5j;  integration_tests/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  shttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fpom.xmlj;  rhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/integration_tests%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j!;  (97dcd97cc7f92303f2511635b9008ca4b35ac4a5j;  pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  _https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/pom.xmlj;  ^https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/pom.xmlj;  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j!;  (8e1b23b441b35318db3678458aac791cb88836ecj;  !prometheus-metrics-config/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  {https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-config%2Fpom.xmlj;  zhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-config%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j!;  (29006bdf7c2df80aeb863facdea6ab8ba151e742j;  prometheus-metrics-core/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  yhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-core%2Fpom.xmlj;  xhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-core%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j!;  (390439f708c64cce40b7221a67c0610565455480j;  *prometheus-metrics-exporter-common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-common%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X$  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-common</artifactId>u}(j!;  (3b14f9dc5951b00250a865dfc60b0b40a6ebb987j;  .prometheus-metrics-exporter-httpserver/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-httpserver%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-httpserver%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-httpserver</artifactId>u}(j!;  (0a2cd8150ec347d082ce4093dcbb53e3f00bae3fj;  1prometheus-metrics-exporter-opentelemetry/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  XI  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
@@ -163,7 +162,7 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j!;  (8bfdfc26181d5cc1dabb07cc6e6fddca5a46a561j;  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j!;  (fd3e07332d06c402d4511cad6bbfb1eb82029349j;  -prometheus-metrics-exposition-formats/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exposition-formats%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-exposition-formats%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j!;  (5e5624b09aaa5e795f56e4d58a3d3034ba34b7bcj;   prometheus-metrics-model/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  zhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-model%2Fpom.xmlj;  yhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-model%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j!;  (fabe5129d2da4978e1d3db7360108d3938f74815j;  .prometheus-metrics-shaded-dependencies/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-dependencies</artifactId>u}(j!;  (5c1794ba45988c0c8fa5d39c218725621dd26e22j;  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj;  modifiedj;  Kj;  Kj;  K	j;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  Xl  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
@@ -100,8 +99,8 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j!;  (4f6338bd6f169c41d181612c37dc5b140bdafb54j;  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X9  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>u}(j!;  (d0273c9a85bf9c97e875c17c6655d875e4e80dc1j;  !prometheus-metrics-tracer/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  {https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fpom.xmlj;  zhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j!;  (c9ec1c6a92f489d1f086c2df29a2e02251383e93j;  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j!;  (d20c307b3afa65db5e3507af4aaca53b0e7ee694j;  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j!;  (0c2f2fac8b597ad8b242a75fd51e846ddab9f013j;  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j!;  (d78f16b88328e3e8d4199ee7b3ac6d5f05c0cda7j;  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j!;  (2818fd55874acf3f2141ef5ad4f9c6f2cbed209cj;  simpleclient/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  nhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient%2Fpom.xmlj;  mhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j!;  (756e119ae0748be0770f53e6db1a7a01395b192ej;  simpleclient_bom/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  rhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_bom%2Fpom.xmlj;  qhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_bom%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j!;  (20569d35101deaf371c3d81ee1ccbf644299f400j;  simpleclient_caffeine/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  whttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_caffeine%2Fpom.xmlj;  vhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_caffeine%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j!;  (aa51669f15fe134a3f1983e0d4d7a6a0018fb0c2j;  simpleclient_common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  uhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_common%2Fpom.xmlj;  thttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j!;  (9620fb10b6d15feaf8372dcb98ed30da19bf92afj;  simpleclient_dropwizard/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  yhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_dropwizard%2Fpom.xmlj;  xhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_dropwizard%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j!;  (84c8754d7e530ac8e87ea4e3405e3b7c855e3b26j;  $simpleclient_graphite_bridge/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  ~https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_graphite_bridge%2Fpom.xmlj;  }https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_graphite_bridge%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j!;  (daa0976c8d643772d10c3412052659362604a07aj;  simpleclient_guava/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  thttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_guava%2Fpom.xmlj;  shttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_guava%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j!;  (29d10e14a5406aed92740e3c5d46249f41acd05dj;  simpleclient_hibernate/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  xhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_hibernate%2Fpom.xmlj;  whttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_hibernate%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j!;  (2919ee0558297f6a69055b7d5ce2e3b7859a0c8cj;  simpleclient_hotspot/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  vhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_hotspot%2Fpom.xmlj;  uhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_hotspot%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j!;  (b2e14542758826a5f683ceb407f245c672ffdbdfj;  simpleclient_httpserver/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  yhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_httpserver%2Fpom.xmlj;  xhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_httpserver%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j!;  (e6c9be70ef22d10c0619820508ded24f09aa27a0j;  simpleclient_jetty/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  thttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_jetty%2Fpom.xmlj;  shttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_jetty%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j!;  (0c90d94b7e8ca4be49c04418fa8b81f26542810bj;  simpleclient_jetty_jdk8/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  yhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_jetty_jdk8%2Fpom.xmlj;  xhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_jetty_jdk8%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j!;  (601b78883a48e92d3fc3db6eea861c2b7a4816faj;  simpleclient_log4j/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  thttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_log4j%2Fpom.xmlj;  shttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_log4j%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u<     }(j!;  (278d3927a32539e72e24f0ffa7878ba4d6024bf6j;  simpleclient_log4j2/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  uhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_log4j2%2Fpom.xmlj;  thttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_log4j2%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j!;  (68c5cf33186f1830cc79f9d40c2ff0eb92509a9aj;  simpleclient_logback/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  vhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_logback%2Fpom.xmlj;  uhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_logback%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j!;  (14e1db742a2265a61a5f526ed9d6780f0047cbb8j;   simpleclient_pushgateway/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  zhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_pushgateway%2Fpom.xmlj;  yhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_pushgateway%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j!;  (9e50abf59e089ac5b84d244757d2df6f27e9947ej;  simpleclient_servlet/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  vhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet%2Fpom.xmlj;  uhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j!;  (e3e087827f08325ea527919aea26207e4cf5c0ccj;  #simpleclient_servlet_common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  }https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet_common%2Fpom.xmlj;  |https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet_common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j!;  (f714b6fae44739fb5ea7b935561d8284cbe8225aj;  $simpleclient_servlet_jakarta/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  ~https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet_jakarta%2Fpom.xmlj;  }https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_servlet_jakarta%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j!;  (8b5543dd4b501c4fb38e8f142ab16426b5e410b3j;  simpleclient_spring_web/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  yhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_spring_web%2Fpom.xmlj;  xhttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_spring_web%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j!;  (c98b788ead7ca38ec60ea0d92b8400ec5c849707j;  simpleclient_tracer/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  uhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fpom.xmlj;  thttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j!;  (1b1381afc0dd5b1f10860cf4324fa4be44d062a0j;  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j!;  (01558b9ee33ade44a07978646f82d0a2354382acj;  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j!;  (15120bf103fe3eb6f1d82fbc8a0fadf8ce3cb1d3j;  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj;  https://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j!;  (dadab7e3e7f8f4fd0bc0aad027a3451180d8a93aj;  simpleclient_vertx/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  thttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_vertx%2Fpom.xmlj;  shttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_vertx%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j!;  (75dd831a8eb955671c27f558b6e0beef6aacf787j;  simpleclient_vertx4/pom.xmlj;  modifiedj;  Kj;  Kj;  Kj;  uhttps://github.com/prometheus/client_java/blob/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_vertx4%2Fpom.xmlj;  thttps://github.com/prometheus/client_java/raw/cb5dac428cb7890cbbc2dace1d3cc897535ac06f/simpleclient_vertx4%2Fpom.xmlj;  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=cb5dac428cb7890cbbc2dace1d3cc897535ac06fj;  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(4e7df612409c99e2f055cd2fbd1430f825cfea43}(sha(4e7df612409c99e2f055cd2fbd1430f825cfea43node_idEC_kwDOAHoJt9oAKDRlN2RmNjEyNDA5Yzk5ZTJmMDU1Y2QyZmJkMTQzMGY4MjVjZmVhNDMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(j=  Fabian Stäberj=  fabian@fstab.dej=  2023-08-06T17:51:45ZumessageHAdd HTTPServer exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j=  (5ba537ed88f3c1fc4fc371df79c118c342909a92urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/5ba537ed88f3c1fc4fc371df79c118c342909a92uj=  hhttps://api.github.com/repos/prometheus/client_java/git/commits/4e7df612409c99e2f055cd2fbd1430f825cfea43
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj=  dhttps://api.github.com/repos/prometheus/client_java/commits/4e7df612409c99e2f055cd2fbd1430f825cfea43html_urlYhttps://github.com/prometheus/client_java/commit/4e7df612409c99e2f055cd2fbd1430f825cfea43comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/4e7df612409c99e2f055cd2fbd1430f825cfea43/commentsj=  }(loginfstabidJ' j=  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j=  "https://api.github.com/users/fstabj=  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj=  }(j=  fstabj=  J' j=  MDQ6VXNlcjMzMDUzNQ==j=  2https://avatars.githubusercontent.com/u/330535?v=4j=  h3j=  "https://api.github.com/users/fstabj=  https://github.com/fstabj=  ,https://api.github.com/users/fstab/followersj=  9https://api.github.com/users/fstab/following{/other_user}j=  2https://api.github.com/users/fstab/gists{/gist_id}j=  9https://api.github.com/users/fstab/starred{/owner}{/repo}j=  0https://api.github.com/users/fstab/subscriptionsj=  'https://api.github.com/users/fstab/orgsj=  (https://api.github.com/users/fstab/reposj=  3https://api.github.com/users/fstab/events{/privacy}j=  2https://api.github.com/users/fstab/received_eventsj=  Userj=  uparents]}(j=  (644da5a0b6e121cf83b8654e86616c138caefabaj=  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabaj=  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalM		additionsM		deletionsK@ufiles](}(j=  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedj=  K%j=  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43patchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(j=  (fd1f204d1d1ed425f184838aea568a893c9ae334j>  #examples/example-httpserver/pom.xmlj>  addedj=  KFj=  K j>  KFj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2Fpom.xmlj>  ~https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j=  (ca5b8ef247c64d730329be29c4a14995be834d89j>  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj>  addedj=  K!j=  K j>  K!j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X5  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .build();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j=  (571e55a2b5d259f0401a881e9631fa0acce8e791j>  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj>  modifiedj=  Kj=  Kj>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(j=  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cj>  examples/pom.xmlj>  modifiedj=  Kj=  K j>  Kj	>  jhttps://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fpom.xmlj>  ihttps://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/examples%2Fpom.xmlj
>  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(j=  (aa81b08e8189c21bee10839e7605abd4b2c49b12j>  #integration-tests/it-common/pom.xmlj>  addedj=  K8j=  K j>  K8j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fpom.xmlj>  ~https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j=  (d60e5397941da631e78c1289365208a3becd4641j>  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javaj>  addedj=  K$j=  K j>  K$j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(j=  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j>  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javaj>  addedj=  Kej=  K j>  Kej	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(j=  (4eafa72596ce3619761aa5c3681eeabb90322228j>  Iintegration-tests/it-common/src/test/resources/project_version.propertiesj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(j=  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj>  -integration-tests/it-common/version-rules.xmlj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fversion-rules.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-common%2Fversion-rules.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j=  (8767c971d0f813a8af5a6dee7d7276f15ae79be6j>  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj>  addedj=  KIj=  K j>  KIj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j=  (6111b6c28ef5b8586d91365f50d7c6d1c4b08a7fj>  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj>  addedj=  Kbj=  K j>  Kbj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj
>  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .build();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j=  (a470df5c021d465c51388b5a740ba88a49d40858j>  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj>  addedj=  KSj=  K j>  KSj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j=  (efa119c4e2292afc04d79a6f1b049bca20e923bej>  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj>  addedj=  Kqj=  K j>  Kqj	>  X  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj>  X
  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj
>  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j=  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j>  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj>  addedj=  KNj=  K j>  KNj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j=  (21956ae78f5aca3a25abb6b5bb32a80999930390j>  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj>  addedj=  Kqj=  K j>  Kqj	>  X  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj>  X  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj
>  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(j=  (8d7404585288239abecdd5265b2984d493cb0628j>  6integration-tests/it-exporter/it-exporter-test/pom.xmlj>  addedj=  KBj=  K j>  KBj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j=  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj>  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj>  addedj=  MVj=  K j>  MVj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}uT      }(j=  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j>  %integration-tests/it-exporter/pom.xmlj>  addedj=  K1j=  K j>  K1j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fit-exporter%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u}(j=  (cce89906f28eebfb57aa16a5ab222f52117f4794j>  integration-tests/pom.xmlj>  addedj=  K@j=  K j>  K@j	>  shttps://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fpom.xmlj>  rhttps://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/integration-tests%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(j=  (fc8359e560a3e05c90838b2ece08e0853d823358j>  pom.xmlj>  modifiedj=  Kj=  K j>  Kj	>  _https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/pom.xmlj>  ^https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/pom.xmlj
>  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(j=  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcj>  *prometheus-metrics-exporter-common/pom.xmlj>  addedj=  K5j=  K j>  K5j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(j=  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4j>  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javaj>  addedj=  K
j=  K j>  K
j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(j=  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj>  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javaj>  addedj=  KGj=  K j>  KGj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(j=  (4e3db6955fe7fbf010877f9faef50315ac489eedj>  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javaj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(j=  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fj>  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javaj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(j=  (318e865f55bdd893d762a5f4e759a502e8bbc983j>  4prometheus-metrics-exporter-common/version-rules.xmlj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fversion-rules.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-common%2Fversion-rules.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j=  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160j>  .prometheus-metrics-exporter-httpserver/pom.xmlj>  addedj=  K+j=  K j>  K+j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(j=  (e8a54e0cf687d16358a139f83d42f5960106395aj>  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javaj>  addedj=  KCj=  K j>  KCj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(j=  (c46cdd30a901490f29cc6889fbf157a5eecbd1b9j>  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xx"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .build();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server.
+     * @deprecated renamed to close(), so that the HTTPServer can be used in try-with-resources.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build the HTTPServer
+         */
+        public HTTPServer build() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(j=  (03b647d99ed2bc1d67a3c66a11c33d900b53d501j>  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javaj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(j=  (4f1b4f63a7e59feb619963afc5d901560bc83e08j>  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javaj>  addedj=  Kwj=  K j>  Kwj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u}(j=  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bj>  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj>  addedj=  K-j=  K j>  K-j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(j=  (378ac6ddc334fbe20d07b3510cf6434894770c6bj>  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javaj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(j=  (318e865f55bdd893d762a5f4e759a502e8bbc983j>  8prometheus-metrics-exporter-httpserver/version-rules.xmlj>  addedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j=  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79j>  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj>  modifiedj=  Kj=  Kj>  K	j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(j=  (656d661ebddd423ba12fc58b1dbd136062e5a282j>  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javaj>  addedj=  K^j=  K j>  K^j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(j=  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ej>  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javaj>  modifiedj=  Kj=  K4j>  K8j	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj
>  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(j=  (3db354c56f52afb4c46e0a080ef010b492c401d6j>  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javan     j>  modifiedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(j=  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfej>  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj>  modifiedj=  Kj=  Kj>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(j=  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72j>  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj>  modifiedj=  Kj=  Kj>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(j=  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfj>  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj>  modifiedj=  Kj=  K j>  Kj	>  https://github.com/prometheus/client_java/blob/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj>  https://github.com/prometheus/client_java/raw/4e7df612409c99e2f055cd2fbd1430f825cfea43/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj
>  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=4e7df612409c99e2f055cd2fbd1430f825cfea43j>  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(27fe3b733165230c4f5ae6f9bbf3242b095b8ad7}(sha(27fe3b733165230c4f5ae6f9bbf3242b095b8ad7node_idEC_kwDOAHoJt9oAKDI3ZmUzYjczMzE2NTIzMGM0ZjVhZTZmOWJiZjMyNDJiMDk1YjhhZDccommit}(author}(namedhoardemaildoug.hoard@gmail.comdate2023-08-05T23:03:17Zu	committer}(jc?  dhoardje?  doug.hoard@gmail.comjg?  2023-08-05T23:03:51Zumessage`Changed to remove use of inefficient String method

Signed-off-by: dhoard <doug.hoard@gmail.com>tree}(j[?  (a04cccc7b10e87865f8a4f2780a3065b517f862burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a04cccc7b10e87865f8a4f2780a3065b517f862bujs?  hhttps://api.github.com/repos/prometheus/client_java/git/commits/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujs?  dhttps://api.github.com/repos/prometheus/client_java/commits/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7html_urlYhttps://github.com/prometheus/client_java/commit/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7/commentsja?  }(logindhoardidJV'j]?  MDQ6VXNlcjE5Mzc2NDcw
avatar_url4https://avatars.githubusercontent.com/u/19376470?v=4gravatar_idh3js?  #https://api.github.com/users/dhoardj?  https://github.com/dhoard
followers_url-https://api.github.com/users/dhoard/followers
following_url:https://api.github.com/users/dhoard/following{/other_user}	gists_url3https://api.github.com/users/dhoard/gists{/gist_id}starred_url:https://api.github.com/users/dhoard/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/dhoard/subscriptionsorganizations_url(https://api.github.com/users/dhoard/orgs	repos_url)https://api.github.com/users/dhoard/repos
events_url4https://api.github.com/users/dhoard/events{/privacy}received_events_url3https://api.github.com/users/dhoard/received_eventstypeUser
site_adminuji?  }(j?  dhoardj?  JV'j]?  MDQ6VXNlcjE5Mzc2NDcwj?  4https://avatars.githubusercontent.com/u/19376470?v=4j?  h3js?  #https://api.github.com/users/dhoardj?  https://github.com/dhoardj?  -https://api.github.com/users/dhoard/followersj?  :https://api.github.com/users/dhoard/following{/other_user}j?  3https://api.github.com/users/dhoard/gists{/gist_id}j?  :https://api.github.com/users/dhoard/starred{/owner}{/repo}j?  1https://api.github.com/users/dhoard/subscriptionsj?  (https://api.github.com/users/dhoard/orgsj?  )https://api.github.com/users/dhoard/reposj?  4https://api.github.com/users/dhoard/events{/privacy}j?  3https://api.github.com/users/dhoard/received_eventsj?  Userj?  uparents]}(j[?  (98967b8367216f4107ad5621f260ed895c930262js?  dhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262j?  Yhttps://github.com/prometheus/client_java/commit/98967b8367216f4107ad5621f260ed895c930262uastats}(totalK
	additionsK	deletionsKufiles]}(j[?  (58c0ebfa9381d5ef96cef2786d75238983757bd5filenameVsimpleclient_common/src/main/java/io/prometheus/client/exporter/common/TextFormat.javastatusmodifiedj?  Kj?  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javaraw_urlhttps://github.com/prometheus/client_java/raw/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.java?ref=27fe3b733165230c4f5ae6f9bbf3242b095b8ad7patchX  @@ -137,8 +137,9 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
   }
 
   private static void writeEscapedHelp(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");
@@ -153,8 +154,9 @@ private static void writeEscapedHelp(Writer writer, String s) throws IOException
   }
 
   private static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");uau(ee5a9c04e4419edad57b7512063db999cff39b03}(sha(ee5a9c04e4419edad57b7512063db999cff39b03node_idEC_kwDOAHoJt9oAKGVlNWE5YzA0ZTQ0MTllZGFkNTdiNzUxMjA2M2RiOTk5Y2ZmMzliMDMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-05T22:09:54Zu	committer}(j?  Fabian Stäberj?  fabian@fstab.dej?  2023-08-05T22:09:54Zumessage"Add integration test for exporterstree}(j?  (8c876e78fa1b6a16492fb5fe84f35766b3f096f2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/8c876e78fa1b6a16492fb5fe84f35766b3f096f2uj?  hhttps://api.github.com/repos/prometheus/client_java/git/commits/ee5a9c04e4419edad57b7512063db999cff39b03
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj?  dhttps://api.github.com/repos/prometheus/client_java/commits/ee5a9c04e4419edad57b7512063db999cff39b03html_urlYhttps://github.com/prometheus/client_java/commit/ee5a9c04e4419edad57b7512063db999cff39b03comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/ee5a9c04e4419edad57b7512063db999cff39b03/commentsj?  }(loginfstabidJ' j?  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j?  "https://api.github.com/users/fstabj?  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj?  }(j?  fstabj?  J' j?  MDQ6VXNlcjMzMDUzNQ==j?  2https://avatars.githubusercontent.com/u/330535?v=4j?  h3j?  "https://api.github.com/users/fstabj?  https://github.com/fstabj@  ,https://api.github.com/users/fstab/followersj@  9https://api.github.com/users/fstab/following{/other_user}j@  2https://api.github.com/users/fstab/gists{/gist_id}j@  9https://api.github.com/users/fstab/starred{/owner}{/repo}j
@  0https://api.github.com/users/fstab/subscriptionsj@  'https://api.github.com/users/fstab/orgsj@  (https://api.github.com/users/fstab/reposj@  3https://api.github.com/users/fstab/events{/privacy}j@  2https://api.github.com/users/fstab/received_eventsj@  Userj@  uparents]}(j?  (d60e2a6d49d835fd5796572536543eafceb9ac3cj?  dhttps://api.github.com/repos/prometheus/client_java/commits/d60e2a6d49d835fd5796572536543eafceb9ac3cj?  Yhttps://github.com/prometheus/client_java/commit/d60e2a6d49d835fd5796572536543eafceb9ac3cuastats}(totalM	additionsM	deletionsKufiles](}(j?  (571e55a2b5d259f0401a881e9631fa0acce8e791filenameeexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javastatusmodifiedj0@  Kj1@  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=ee5a9c04e4419edad57b7512063db999cff39b03patchX  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(j?  (aa81b08e8189c21bee10839e7605abd4b2c49b12j6@  #integration-tests/it-common/pom.xmlj8@  addedj0@  K8j1@  K j:@  K8j;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fpom.xmlj=@  ~https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fpom.xmlj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j?  (d60e5397941da631e78c1289365208a3becd4641j6@  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javaj8@  addedj0@  K$j1@  K j:@  K$j;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(j?  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j6@  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javaj8@  addedj0@  Kej1@  K j:@  Kej;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(j?  (4eafa72596ce3619761aa5c3681eeabb90322228j6@  Iintegration-tests/it-common/src/test/resources/project_version.propertiesj8@  addedj0@  Kj1@  K j:@  Kj;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(j?  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj6@  -integration-tests/it-common/version-rules.xmlj8@  addedj0@  Kj1@  K j:@  Kj;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fversion-rules.xmlj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-common%2Fversion-rules.xmlj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j?  (eeccba3d29524a93c8756bb193da7033ac4b6d7dj6@  Hintegration-tests/it-exporter/it-exporter-servlet-jakarta-sample/pom.xmlj8@  modifiedj0@  Kj1@  Kj:@  Kj;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fpom.xmlj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fpom.xmlj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fpom.xml?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X	  @@ -51,7 +51,7 @@
     </dependencies>
 
     <build>
-        <finalName>jakarta-servlet-sample</finalName>
+        <finalName>servlet-jakarta-sample</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j?  (b5ac7fa1e251ac4f95c09bf841a11bb879da6e93j6@  integration-tests/it-exporter/it-exporter-servlet-jakarta-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jakarta/JakartaServletSample.javaj8@  modifiedj0@  Kj1@  Kj:@  K	j;@  X  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.javaj=@  X  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.javaj?@  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.java?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X   @@ -11,6 +11,9 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
@@ -21,10 +24,10 @@ enum Mode {
         error
     }
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         if (args.length != 2) {
-            System.err.println("Usage: java -jar jakarta-servlet.jar <port> <mode>");
+            System.err.println("Usage: java -jar servlet-jakarta.jar <port> <mode>");
             System.err.println("Where mode is \"success\" or \"error\".");
             System.exit(1);
         }
@@ -58,6 +61,8 @@ public MetricSnapshot collect() {
         Tomcat tomcat = new Tomcat();
         tomcat.setPort(port);
 
+        Path tmpDir = Files.createTempDirectory("servlet-jakarta-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
         Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
         ctx.addServletMappingDecoded("/metrics", "metrics");u}(j?  (d00a51967ef456994e9530d9ed0bfebf4d6d6061j6@  6integration-tests/it-exporter/it-exporter-test/pom.xmlj8@  modifiedj0@  Kj1@  Kj:@  Kj;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X  @@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -30,4 +31,31 @@
             <email>fabian@fstab.de</email>
         </developer>
     </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 </project>u}(j?  (d82e9ede39605e89f917859cd07e6af0147e5f3aj6@  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj8@  addedj0@  Kj1@  K j:@  Kj;@  https://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj=@  https://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X  @@ -0,0 +1,138 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "httpserver-sample",
+                "servlet-jakarta-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-exporter-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 0.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape();
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 0.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        Assert.assertTrue(expected.equals(actual) || expected.replace(" ", "").equals(actual));
+    }
+
+    private Response scrape(String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics");
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod("GET");
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(j?  (cce89906f28eebfb57aa16a5ab222f52117f4794j6@  integration-tests/pom.xmlj8@  modifiedj0@  Kj1@  Kj:@  K$j;@  shttps://github.com/prometheus/client_java/blob/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fpom.xmlj=@  rhttps://github.com/prometheus/client_java/raw/ee5a9c04e4419edad57b7512063db999cff39b03/integration-tests%2Fpom.xmlj?@  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=ee5a9c04e4419edad57b7512063db999cff39b03jA@  X4  @@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -12,6 +13,10 @@
     <packaging>pom</packaging>
 
     <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
 
     <licenses>
         <license>
@@ -22,6 +27,7 @@
     </licenses>
 
     <modules>
+        <module>it-common</module>
         <module>it-exporter</module>
     </modules>
 
@@ -46,25 +52,13 @@
         </pluginManagement>
     </build>
     <dependencyManagement>
-      <dependencies>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>testcontainers</artifactId>
-            <version>1.17.2</version>
-            <scope>test</scope>
-        </dependency>
-          <dependency>
-              <groupId>com.squareup.okhttp3</groupId>
-              <artifactId>okhttp</artifactId>
-              <version>4.10.0</version>
-              <scope>test</scope>
-          </dependency>
-          <dependency>
-              <groupId>ch.qos.logback</groupId>
-              <artifactId>logback-classic</artifactId>
-              <version>1.2.11</version>
-              <scope>test</scope>
-          </dependency>
-      </dependencies>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
     </dependencyManagement>
 </project>ueu(7bb2d38c044744cd453e4d448ced60e85c1dab70}(sha(7bb2d38c044744cd453e4d448ced60e85c1dab70node_idEC_kwDOAHoJt9oAKDdiYjJkMzhjMDQ0NzQ0Y2Q0NTNlNGQ0NDhjZWQ2MGU4NWMxZGFiNzAcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-20T07:04:21Zu	committer}(j@  Fabian Stäberj@  fabian@fstab.dej@  2023-06-20T07:04:21Zumessageexample apptree}(j@  (a7014b678169f3a5892c3c9ac3c6c4aab840d34furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a7014b678169f3a5892c3c9ac3c6c4aab840d34fuj@  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7bb2d38c044744cd453e4d448ced60e85c1dab70
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj@  dhttps://api.github.com/repos/prometheus/client_java/commits/7bb2d38c044744cd453e4d448ced60e85c1dab70html_urlYhttps://github.com/prometheus/client_java/commit/7bb2d38c044744cd453e4d448ced60e85c1dab70comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7bb2d38c044744cd453e4d448ced60e85c1dab70/commentsj@  }(loginfstabidJ' j@  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j@  "https://api.github.com/users/fstabj@  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj@  }(j@  fstabj@  J' j@  MDQ6VXNlcjMzMDUzNQ==j@  2https://avatars.githubusercontent.com/u/330535?v=4j@  h3j@  "https://api.github.com/users/fstabj@  https://github.com/fstabj@  ,https://api.github.com/users/fstab/followersj@  9https://api.github.com/users/fstab/following{/other_user}j@  2https://api.github.com/users/fstab/gists{/gist_id}j@  9https://api.github.com/users/fstab/starred{/owner}{/repo}j@  0https://api.github.com/users/fstab/subscriptionsj@  'https://api.github.com/users/fstab/orgsj@  (https://api.github.com/users/fstab/reposj@  3https://api.github.com/users/fstab/events{/privacy}j@  2https://api.github.com/users/fstab/received_eventsj@  Userj@  uparents]}(j@  (9ffe2ac6685c1a0956d19b7b158721c7f97de7a5j@  dhttps://api.github.com/repos/prometheus/client_java/commits/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5j@  Yhttps://github.com/prometheus/client_java/commit/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5uastats}(totalM8	additionsM	deletionsMufiles](}(j@  (bfb661db7b723789649328b49edd4e14c311345afilenamepom.xmlstatusmodifiedj@  Kj@  KchangesKblob_url_https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70patchXv  @@ -45,7 +45,7 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
-        <module>prometheus-metrics-exporter-httpserver</module>
+        <module>tmp_example</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(j@  (09b41dbdce32b44d3e9d11c469625c970b57c903j@  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javaj@  modifiedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -63,6 +63,7 @@ public void reset() {
     }
 
     public void observe(double value) {
+        System.nanoTime();
         if (!acceptingNewExemplars.get()) {
             // This is the hot path. This should be as efficient as possible.
             return;u}(j@  (b624fe75cbdfc9287e171d6ffa7a20903f6df7eaj@  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -4,6 +4,7 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.registry.Collector;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
@@ -15,7 +16,7 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.function.DoubleSupplier;
 
-public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver {
+public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver, Collector {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;u}(j@  (e733dd7f32f5187501a4683d00acdd7d0198e94bj@  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/ObservingMetric.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -45,7 +45,7 @@ protected ObservingMetric(Builder<?, ?> builder) {
     public MetricSnapshot collect() {
         if (labelNames.length == 0 && data.size() == 0) {
             // This is a metric without labels that has not been used yet. Initialize the data on the fly.
-            withLabels();
+            withLabelValues();
         }
         List<Labels> labels = new ArrayList<>(data.size());
         List<V> metricData = new ArrayList<>(data.size());
@@ -57,7 +57,7 @@ public MetricSnapshot collect() {
         return collect(labels, metricData);
     }
 
-    public O withLabels(String... labelValues) {
+    public O withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
         }
@@ -74,7 +74,7 @@ public void remove(String... labelValues) {
     protected V getNoLabels() {
         if (noLabels == null) {
             // Note that this will throw an IllegalArgumentException if labelNames is not empty.
-            noLabels = (V) withLabels();
+            noLabels = (V) withLabelValues();
         }
         return noLabels;
     }u}(j@  (6f92ff96b4771b5338b283f4a31a88145897f828j@  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -76,9 +76,9 @@ public void testIncrement() {
         assertEquals(1.0, getValue(noLabels), .001);
         noLabels.inc(2);
         assertEquals(3.0, getValue(noLabels), .001);
-        noLabels.withLabels().inc(4);
+        noLabels.withLabelValues().inc(4);
         assertEquals(7.0, getValue(noLabels), .001);
-        noLabels.withLabels().inc();
+        noLabels.withLabelValues().inc();
         assertEquals(8.0, getValue(noLabels), .001);
     }
 
@@ -98,10 +98,10 @@ public void testEmptyCountersHaveNoLabels() {
     @Test
     public void testLabels() {
         assertEquals(0, getNumberOfLabels(labels));
-        labels.withLabels("a").inc();
+        labels.withLabelValues("a").inc();
         assertEquals(1, getNumberOfLabels(labels));
         assertEquals(1.0, getValue(labels, "l", "a"), .001);
-        labels.withLabels("b").inc(3);
+        labels.withLabelValues("b").inc(3);
         assertEquals(2, getNumberOfLabels(labels));
         assertEquals(1.0, getValue(labels, "l", "a"), .001);
         assertEquals(3.0, getValue(labels, "l", "b"), .001);
@@ -133,8 +133,8 @@ public void testSnapshotComplete() {
                 .withConstLabels(Labels.of("const1name", "const1value", "const2name", "const2value"))
                 .withLabelNames("path", "status")
                 .build();
-        counter.withLabels("/", "200").inc(2);
-        counter.withLabels("/", "500").inc();
+        counter.withLabelValues("/", "200").inc(2);
+        counter.withLabelValues("/", "500").inc();
         CounterSnapshot snapshot = (CounterSnapshot) counter.collect();
         Assert.assertEquals("test_seconds", snapshot.getMetadata().getName());
         Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());u}(j@  (3b07c445bd557ebb080acaa6ef20db08db9e47cbj@  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -94,8 +94,8 @@ public void noLabelsDefaultZeroValue() {
 
     @Test
     public void testLabels() {
-        labels.withLabels("a").inc();
-        labels.withLabels("b").inc(3);
+        labels.withLabelValues("a").inc();
+        labels.withLabelValues("b").inc(3);
         assertEquals(1.0, getValue(labels, "l", "a"), .001);
         assertEquals(3.0, getValue(labels, "l", "b"), .001);
     }u}(j@  (1ae202a9e5fb188d0b8dbc7fafebea00a7b1a01aj@  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj@  modifiedj@  Kj@  Kj@  K&j A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -784,8 +784,8 @@ public void markCurrentSpanAsExemplar() {
                 .withSpanId("spanId-10")
                 .withTraceId("traceId-10")
                 .build();
-        histogram.withLabels("/hello").observe(0.5);
-        histogram.withLabels("/world").observe(0.5); // different labels are tracked independently, i.e. we don't need to wait for sampleIntervalMillis
+        histogram.withLabelValues("/hello").observe(0.5);
+        histogram.withLabelValues("/world").observe(0.5); // different labels are tracked independently, i.e. we don't need to wait for sampleIntervalMillis
 
         HistogramSnapshot snapshot = histogram.collect();
         assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
@@ -800,8 +800,8 @@ public void markCurrentSpanAsExemplar() {
         assertNull(getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
 
         Thread.sleep(sampleIntervalMillis + 1);
-        histogram.withLabels("/hello").observe(4.5);
-        histogram.withLabels("/world").observe(4.5);
+        histogram.withLabelValues("/hello").observe(4.5);
+        histogram.withLabelValues("/world").observe(4.5);
 
         snapshot = histogram.collect();
         assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
@@ -816,14 +816,14 @@ public void markCurrentSpanAsExemplar() {
         assertExemplarEquals(ex2b, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
 
         Thread.sleep(sampleIntervalMillis + 1);
-        histogram.withLabels("/hello").observe(1.5);
-        histogram.withLabels("/world").observe(1.5);
+        histogram.withLabelValues("/hello").observe(1.5);
+        histogram.withLabelValues("/world").observe(1.5);
         Thread.sleep(sampleIntervalMillis + 1);
-        histogram.withLabels("/hello").observe(2.5);
-        histogram.withLabels("/world").observe(2.5);
+        histogram.withLabelValues("/hello").observe(2.5);
+        histogram.withLabelValues("/world").observe(2.5);
         Thread.sleep(sampleIntervalMillis + 1);
-        histogram.withLabels("/hello").observe(3.5);
-        histogram.withLabels("/world").observe(3.5);
+        histogram.withLabelValues("/hello").observe(3.5);
+        histogram.withLabelValues("/world").observe(3.5);
 
         snapshot = histogram.collect();
         assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
@@ -842,7 +842,7 @@ public void markCurrentSpanAsExemplar() {
                 .withLabels(Labels.of("key2", "value2", "key1", "value1", "trace_id", "traceId-11", "span_id", "spanId-11"))
                 .build();
         Thread.sleep(sampleIntervalMillis + 1);
-        histogram.withLabels("/hello").observeWithExemplar(3.4, Labels.of("key1", "value1", "key2", "value2"));
+        histogram.withLabelValues("/hello").observeWithExemplar(3.4, Labels.of("key1", "value1", "key2", "value2"));
         snapshot = histogram.collect();
         // custom exemplars have preference, so the automatic exemplar is replaced
         assertExemplarEquals(custom, getExemplar(snapshot, 4.0, "path", "/hello"));
@@ -983,14 +983,14 @@ public void markCurrentSpanAsExemplar() {
                 .withLabels(Labels.of("key1", "value1", "key2", "value2"))
                 .build();
 
-        histogram.withLabels("/hello").observe(3.11);
-        histogram.withLabels("/world").observe(3.12);
+        histogram.withLabelValues("/hello").observe(3.11);
+        histogram.withLabelValues("/world").observe(3.12);
         assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
         assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
         assertEquals(1, getData(histogram, "path", "/world").getExemplars().size());
         assertExemplarEquals(ex2, getData(histogram, "path", "/world").getExemplars().iterator().next());
 
-        histogram.withLabels("/world").observeWithExemplar(3.13, Labels.of("key1", "value1", "key2", "value2"));
+        histogram.withLabelValues("/world").observeWithExemplar(3.13, Labels.of("key1", "value1", "key2", "value2"));
         assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
         assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
         assertEquals(2, getData(histogram, "path", "/world").getExemplars().size());
@@ -1214,16 +1214,16 @@ public void testObserveWithLabels() {
                 .withConstLabels(Labels.of("env", "prod"))
                 .withLabelNames("path", "status")
                 .build();
-        histogram.withLabels("/hello", "200").observe(0.11);
-        histogram.withLabels("/hello", "200").observe(0.2);
-        histogram.withLabels("/hello", "500").observe(0.19);
+        histogram.withLabelValues("/hello", "200").observe(0.11);
+        histogram.withLabelValues("/hello", "200").observe(0.2);
+        histogram.withLabelValues("/hello", "500").observe(0.19);
         HistogramSnapshot.HistogramData data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
         HistogramSnapshot.HistogramData data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
         assertEquals(2, data200.getCount());
         assertEquals(0.31, data200.getSum(), 0.0000001);
         assertEquals(1, data500.getCount());
         assertEquals(0.19, data500.getSum(), 0.0000001);
-        histogram.withLabels("/hello", "200").observe(0.13);
+        histogram.withLabelValues("/hello", "200").observe(0.13);
         data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
         data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
         assertEquals(3, data200.getCount());
@@ -1240,7 +1240,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
                 .withLabelNames("status")
                 .build();
         int nThreads = 8;
-        DistributionObserver obs = histogram.withLabels("200");
+        DistributionObserver obs = histogram.withLabelValues("200");
         ExecutorService executor = Executors.newFixedThreadPool(nThreads);
         CompletionService<List<HistogramSnapshot>> completionService = new ExecutorCompletionService<>(executor);
         CountDownLatch startSignal = new CountDownLatch(nThreads);u}(j@  (704143c2dc0d61ee8d62a89353e6ffc974d9182bj@  aprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/ObservingMetricTest.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -1,6 +1,5 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.core.metrics.Counter;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -15,9 +14,9 @@ public void testLabelRemoveWhileCollecting() throws Exception {
         Field data = counter.getClass().getSuperclass().getDeclaredField("data");
         data.setAccessible(true);
 
-        counter.withLabels("a", "b").inc(1.0);
-        counter.withLabels("c", "d").inc(3.0);
-        counter.withLabels("e", "f").inc(7.0);
+        counter.withLabelValues("a", "b").inc(1.0);
+        counter.withLabelValues("c", "d").inc(3.0);
+        counter.withLabelValues("e", "f").inc(7.0);
 
         // collect() iterates over data.entrySet().
         // remove() removes entries from data.u}(j@  (eaf66a0c508f53378ec1489e7d8465e6329dc8f2j@  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -30,8 +30,8 @@ public void testEnumStateSet() {
                 .withLabelNames("environment")
                 .withStates(MyFeatureFlag.class)
                 .build();
-        stateSet.withLabels("dev").setTrue(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
-        stateSet.withLabels("prod").setFalse(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        stateSet.withLabelValues("dev").setTrue(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        stateSet.withLabelValues("prod").setFalse(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
         StateSetSnapshot snapshot = stateSet.collect();
         Assert.assertEquals(2, snapshot.getData().size());
         Assert.assertEquals(2, getData(stateSet, "environment", "dev").size());u}(j@  (3f2cd8f11cf57f3790c3a37bf51077f8fbd4b84aj@  .prometheus-metrics-exporter-httpserver/pom.xmlj@  removedj@  K j@  KAj@  KAj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fpom.xmljA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fpom.xmljA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
-    <packaging>bundle</packaging>
-
-    <name>Prometheus Java Simpleclient Httpserver</name>
-    <description>
-        Httpserver exposition for the simpleclient.
-    </description>
-
-    <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
-
-    <dependencies>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
-        </dependency>
-        <!-- Test Dependencies Follow -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.13.2</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>3.23.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <version>2.4.0-b180830.0359</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>u#/     }(j@  (6ac0ec0f91e52441f54473ccc39568617e4901daj@  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj@  removedj@  K j@  KQj@  KQj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,81 +0,0 @@
-package io.prometheus.metrics.exporter.httpserver;
-
-import com.sun.net.httpserver.HttpExchange;
-import com.sun.net.httpserver.HttpHandler;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.nio.charset.Charset;
-import java.util.function.Predicate;
-import java.util.function.Supplier;
-
-/**
- * Handler for the /metrics endpoint
- */
-public class MetricsHandler implements HttpHandler {
-
-    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
-        @Override
-        protected ByteArrayOutputStream initialValue()
-        {
-            return new ByteArrayOutputStream(1 << 20); // 1 MB
-        }
-    }
-
-    private final Supplier<MetricSnapshots> registry;
-    private final LocalByteArray response = new LocalByteArray();
-    private final Supplier<Predicate<String>> sampleNameFilterSupplier;
-
-    public MetricsHandler(Supplier<MetricSnapshots> registry) {
-        this(registry, null);
-    }
-
-    public MetricsHandler(Supplier<MetricSnapshots> registry, Supplier<Predicate<String>> sampleNameFilterSupplier) {
-        this.registry = registry;
-        this.sampleNameFilterSupplier = sampleNameFilterSupplier;
-    }
-
-    @Override
-    public void handle(HttpExchange t) throws IOException {
-        String query = t.getRequestURI().getRawQuery();
-        String contextPath = t.getHttpContext().getPath();
-        ByteArrayOutputStream response = this.response.get();
-        response.reset();
-        OutputStreamWriter osw = new OutputStreamWriter(response, Charset.forName("UTF-8"));
-            String contentType = TextFormat.chooseContentType(t.getRequestHeaders().getFirst("Accept"));
-            t.getResponseHeaders().set("Content-Type", contentType);
-            Predicate<String> filter = sampleNameFilterSupplier == null ? null : sampleNameFilterSupplier.get();
-            filter = SampleNameFilter.restrictToNamesEqualTo(filter, parseQuery(query));
-            if (filter == null) {
-                TextFormat.writeFormat(contentType, osw, registry.metricFamilySamples());
-            } else {
-                TextFormat.writeFormat(contentType, osw, registry.filteredMetricFamilySamples(filter));
-            }
-
-        osw.close();
-
-        if (shouldUseCompression(t)) {
-            t.getResponseHeaders().set("Content-Encoding", "gzip");
-            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
-            final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
-            try {
-                response.writeTo(os);
-            } finally {
-                os.close();
-            }
-        } else {
-            long contentLength = response.size();
-            if (contentLength > 0) {
-                t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
-            }
-            if (t.getRequestMethod().equals("HEAD")) {
-                contentLength = -1;
-            }
-            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
-            response.writeTo(t.getResponseBody());
-        }
-        t.close();
-    }
-}u}(j@  (69078be5e8dda8aa8518d2498b2eab781329c021j@  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/SampleNameFilterSupplier.javaj@  removedj@  K j@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FSampleNameFilterSupplier.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X6  @@ -1,26 +0,0 @@
-package io.prometheus.metrics.exporter.httpserver;
-
-import io.prometheus.client.Predicate;
-import io.prometheus.client.Supplier;
-
-/**
- * For convenience, an implementation of a {@code Supplier<Predicate<String>>} that
- * always returns the same sampleNameFilter.
- */
-public class SampleNameFilterSupplier implements Supplier<Predicate<String>> {
-
-    private final Predicate<String> sampleNameFilter;
-
-    public static SampleNameFilterSupplier of(Predicate<String> sampleNameFilter) {
-        return new SampleNameFilterSupplier(sampleNameFilter);
-    }
-
-    private SampleNameFilterSupplier(Predicate<String> sampleNameFilter) {
-        this.sampleNameFilter = sampleNameFilter;
-    }
-
-    @Override
-    public Predicate<String> get() {
-        return sampleNameFilter;
-    }
-}u}(j@  (84c4d15f7facdfa96c6596d9c9305cc0a9a86e94j@  gprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/ExampleExporter.javaj@  removedj@  K j@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FExampleExporter.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,24 +0,0 @@
-package io.prometheus.client.exporter;
-
-import io.prometheus.client.Counter;
-import io.prometheus.client.Gauge;
-import io.prometheus.client.Histogram;
-import io.prometheus.client.Summary;
-
-public class ExampleExporter {
-
-    static final Gauge g = Gauge.build().name("gauge").help("blah").register();
-    static final Counter c = Counter.build().name("counter").help("meh").register();
-    static final Summary s = Summary.build().name("summary").help("meh").register();
-    static final Histogram h = Histogram.build().name("histogram").help("meh").register();
-    static final Gauge l = Gauge.build().name("labels").help("blah").labelNames("l").register();
-
-    public static void main(String[] args) throws Exception {
-        new HTTPServer(1234);
-        g.set(1);
-        c.inc(2);
-        s.observe(3);
-        h.observe(4);
-        l.labels("foo").inc(5);
-    }
-}u}(j@  (5b7865de41003b50caf712ac139cff5b9ea393c9j@  cprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/HttpRequest.javaj@  removedj@  K j@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpRequest.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  Xw  @@ -1,244 +0,0 @@
-package io.prometheus.client.exporter;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.xml.bind.DatatypeConverter;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.security.GeneralSecurityException;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Scanner;
-import java.util.Set;
-
-/**
- * Class to perform HTTP testing
- */
-public class HttpRequest {
-
-    enum METHOD { GET, HEAD }
-
-    private final Configuration configuration;
-
-    /**
-     * Constructor
-     *
-     * @param configuration configuration
-     */
-    private HttpRequest(Configuration configuration) {
-        this.configuration = configuration;
-    }
-
-    /**
-     * Method to execute an HTTP request
-     *
-     * @return HttpResponse
-     * @throws IOException
-     */
-    public HttpResponse execute() throws IOException {
-        if (configuration.url.toLowerCase().startsWith("https://") && (configuration.trustManagers != null)) {
-            try {
-                SSLContext sslContext = SSLContext.getInstance("SSL");
-                sslContext.init(null, configuration.trustManagers, new java.security.SecureRandom());
-                HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
-            } catch (GeneralSecurityException e) {
-                throw new IOException(e);
-            }
-
-            if (configuration.hostnameVerifier != null) {
-                HttpsURLConnection.setDefaultHostnameVerifier(configuration.hostnameVerifier);
-            }
-        }
-
-        URLConnection urlConnection = new URL(configuration.url).openConnection();
-        ((HttpURLConnection) urlConnection).setRequestMethod(configuration.method.toString());
-
-        Set<Map.Entry<String, List<String>>> entries = configuration.headers.entrySet();
-        for (Map.Entry<String, List<String>> entry : entries) {
-            for (String value : entry.getValue()) {
-                urlConnection.addRequestProperty(entry.getKey(), value);
-            }
-        }
-
-        urlConnection.setUseCaches(false);
-        urlConnection.setDoInput(true);
-        urlConnection.setDoOutput(true);
-        urlConnection.connect();
-
-        Scanner scanner = new Scanner(urlConnection.getInputStream(), "UTF-8").useDelimiter("\\A");
-
-        return new HttpResponse(
-                ((HttpURLConnection) urlConnection).getResponseCode(),
-                urlConnection.getHeaderFields(),
-                        urlConnection.getContentLength(), scanner.hasNext() ? scanner.next() : "");
-    }
-
-    /**
-     * Class to build an HttpRequest
-     */
-    static class Builder {
-
-        private final Configuration configuration;
-
-        /**
-         * Constructor
-         */
-        public Builder() {
-            configuration = new Configuration();
-        }
-
-        /**
-         * Method to set the HTTP request method
-         *
-         * @param method
-         * @return Builder
-         */
-        public Builder withMethod(METHOD method) {
-            configuration.method = method;
-            return this;
-        }
-
-        /**
-         * Method to set the HTTP request URL
-         *
-         * @param url
-         * @return Builder
-         */
-        public Builder withURL(String url) {
-            configuration.url = url;
-            return this;
-        }
-
-        /**
-         * Method to add an HTTP request header
-         *
-         * @param name
-         * @param value
-         * @return Builder
-         */
-        public Builder withHeader(String name, String value) {
-            configuration.addHeader(name, value);
-            return this;
-        }
-
-        /**
-         * Method to set the HTTP request "Authorization" header
-         *
-         * @param username
-         * @param password
-         * @return Builder
-         */
-        public Builder withAuthorization(String username, String password) {
-            configuration.setHeader("Authorization", encodeCredentials(username, password));
-            return this;
-        }
-
-        /**
-         * Method to set the HTTP request trust managers when using an SSL URL
-         *
-         * @param trustManagers
-         * @return Builder
-         */
-        public Builder withTrustManagers(TrustManager[] trustManagers) {
-            configuration.trustManagers = trustManagers;
-            return this;
-        }
-
-        /**
-         * Method to set the HTTP request hostname verifier when using an SSL URL
-         *
-         * @param hostnameVerifier
-         * @return Builder
-         */
-        public Builder withHostnameVerifier(HostnameVerifier hostnameVerifier) {
-            configuration.hostnameVerifier = hostnameVerifier;
-            return this;
-        }
-
-        /**
-         * Method to build the HttpRequest
-         *
-         * @return HttpRequest
-         */
-        public HttpRequest build() {
-            return new HttpRequest(configuration);
-        }
-    }
-
-    /**
-     * Class used for Builder configuration
-     */
-    private static class Configuration {
-
-        public METHOD method;
-        public String url;
-        public Map<String, List<String>> headers;
-        public TrustManager[] trustManagers;
-        public HostnameVerifier hostnameVerifier;
-
-        /**
-         * Constructor
-         */
-        Configuration() {
-            method = METHOD.GET;
-            headers = new HashMap<String, List<String>>();
-        }
-
-        /**
-         * Method to add (append) an HTTP request header
-         *
-         * @param name
-         * @param value
-         * @return Configuration
-         */
-        void addHeader(String name, String value) {
-            name = name.toLowerCase();
-            List<String> values = headers.get(name);
-            if (values == null) {
-                values = new LinkedList<String>();
-                headers.put(name, values);
-            }
-
-            values.add(value);
-        }
-
-        /**
-         * Method to set (overwrite) an HTTP request header, removing all previous header values
-         *
-         * @param name
-         * @param value
-         * @return Configuration
-         */
-        void setHeader(String name, String value) {
-            List<String> values = new LinkedList<String>();
-            values.add(value);
-            headers.put(name, values);
-        }
-    }
-
-    /**
-     * Method to encode "Authorization" credentials
-     *
-     * @param username
-     * @param password
-     * @return String
-     */
-    private final static String encodeCredentials(String username, String password) {
-        // Per RFC4648 table 2. We support Java 6, and java.util.Base64 was only added in Java 8,
-        try {
-            byte[] credentialsBytes = (username + ":" + password).getBytes("UTF-8");
-            return "Basic " + DatatypeConverter.printBase64Binary(credentialsBytes);
-        } catch (UnsupportedEncodingException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-}u}(j@  (9ad49be415c755fc3f16d1c2926a9feae5b9eae9j@  dprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/HttpResponse.javaj@  removedj@  K j@  Kmj@  Kmj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FHttpResponse.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,109 +0,0 @@
-package io.prometheus.client.exporter;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Class to perform HTTP testing
- */
-class HttpResponse {
-
-    private int responseCode;
-    private Map<String, List<String>> headers;
-    private long contentLength = -1;
-    private String body;
-
-    /**
-     * Constructor
-     *
-     * @param responseCode
-     * @param headers
-     * @param contentLength
-     * @param body
-     */
-    HttpResponse(int responseCode, Map<String, List<String>> headers, long contentLength, String body) throws IOException {
-        this.responseCode = responseCode;
-        this.body = body;
-        this.contentLength = contentLength;
-        this.headers = new HashMap<String, List<String>>();
-
-        Set<Map.Entry<String, List<String>>> headerSet = headers.entrySet();
-        for (String header : headers.keySet()) {
-            if (header != null) {
-                List<String> values = headers.get(header);
-                this.headers.put(header.toLowerCase(), values);
-            }
-        }
-
-        if (getHeader("content-length") != null && getHeader("transfer-encoding") != null) {
-            throw new IOException("Invalid HTTP response, should only contain Connect-Length or Transfer-Encoding");
-        }
-    }
-
-    /**
-     * Method to get the HTTP response code
-     *
-     * @return int
-     */
-    public int getResponseCode() {
-        return this.responseCode;
-    }
-
-    /**
-     * Method to get a list of HTTP response headers values
-     *
-     * @param name
-     * @return List<String>
-     */
-    public List<String> getHeaderList(String name) {
-        return headers.get(name.toLowerCase());
-    }
-
-    /**
-     * Method to get the first HTTP response header value
-     *
-     * @param name
-     * @return String
-     */
-    public String getHeader(String name) {
-        String value = null;
-
-        List<String> valueList = getHeaderList(name);
-        if (valueList != null && (valueList.size() >= 0)) {
-            value = valueList.get(0);
-        }
-
-        return value;
-    }
-
-    /**
-     * Method to get the first HTTP response header value as a Long.
-     * Returns null of the header doesn't exist
-     *
-     * @param name
-     * @return Long
-     */
-    public Long getHeaderAsLong(String name) {
-        String value = getHeader(name);
-        if (value != null) {
-            try {
-                return Long.valueOf(value);
-            } catch (Exception e) {
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Method to get the HTTP response body
-     *
-     * @return String
-     */
-    public String getBody() {
-        return body;
-    }
-}u}(j@  (aaddd5e2239c79e0806c4ecf0745bd1ce3e05831j@  gprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/TestDaemonFlags.javaj@  removedj@  K j@  K+j@  K+j A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestDaemonFlags.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,43 +0,0 @@
-package io.prometheus.client.exporter;
-
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.FutureTask;
-
-import static org.assertj.core.api.Java6Assertions.assertThat;
-
-public class TestDaemonFlags {
-
-    @Test
-    public void testDefaultIsNotDaemon() throws IOException, ExecutionException, InterruptedException {
-        assertThat(usesDaemonExecutor(new HTTPServer(0))).isFalse();
-    }
-
-    @Test
-    public void testDaemon() throws IOException, ExecutionException, InterruptedException {
-        assertThat(usesDaemonExecutor(new HTTPServer(0, true))).isTrue();
-    }
-
-    @Test
-    public void testNonDaemon() throws IOException, ExecutionException, InterruptedException {
-        assertThat(usesDaemonExecutor(new HTTPServer(0, false))).isFalse();
-    }
-
-    private boolean usesDaemonExecutor(HTTPServer httpServer) throws IOException, InterruptedException, ExecutionException {
-        try {
-            FutureTask<Boolean> task = new FutureTask<Boolean>(new Callable<Boolean>() {
-                @Override
-                public Boolean call() throws Exception {
-                    return Thread.currentThread().isDaemon();
-                }
-            });
-            httpServer.server.getExecutor().execute(task);
-            return task.get();
-        } finally {
-            httpServer.stop();
-        }
-    }
-}u}(j@  (2b18f4e829c4c65de610cdf23149e52c8410bb50j@  fprometheus-metrics-exporter-httpserver/src/test/java/io/prometheus/client/exporter/TestHTTPServer.javaj@  removedj@  K j@  Mbj@  Mbj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.javajA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2FTestHTTPServer.java?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  XS  @@ -1,610 +0,0 @@
-package io.prometheus.client.exporter;
-
-import com.sun.net.httpserver.Authenticator;
-import com.sun.net.httpserver.BasicAuthenticator;
-import com.sun.net.httpserver.HttpServer;
-import com.sun.net.httpserver.HttpsConfigurator;
-import com.sun.net.httpserver.HttpsParameters;
-import io.prometheus.client.CollectorRegistry;
-import io.prometheus.client.Gauge;
-import io.prometheus.client.SampleNameFilter;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLParameters;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.X509TrustManager;
-import javax.xml.bind.DatatypeConverter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.InetSocketAddress;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.cert.X509Certificate;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import static org.assertj.core.api.Java6Assertions.assertThat;
-
-public class TestHTTPServer {
-
-  CollectorRegistry registry;
-
-  private final static SSLContext SSL_CONTEXT;
-
-  private final static HttpsConfigurator HTTPS_CONFIGURATOR;
-
-  // Code put in a static block due to possible Exceptions
-  static {
-    try {
-      SSL_CONTEXT = createSSLContext(
-              "SSL",
-              "PKCS12",
-              "./src/test/resources/keystore.pkcs12",
-              "changeit");
-    } catch (GeneralSecurityException e) {
-      throw new RuntimeException("Exception creating SSL_CONTEXT", e);
-    } catch (IOException e) {
-      throw new RuntimeException("Exception creating SSL_CONTEXT", e);
-    }
-
-    HTTPS_CONFIGURATOR = createHttpsConfigurator(SSL_CONTEXT);
-  }
-
-  /**
-   * TrustManager[] that trusts all certificates
-   */
-  private final static TrustManager[] TRUST_ALL_CERTS_TRUST_MANAGERS = new TrustManager[]{
-          new X509TrustManager() {
-            public X509Certificate[] getAcceptedIssuers() {
-              return new X509Certificate[0];
-            }
-
-            public void checkClientTrusted(X509Certificate[] certs, String authType) {
-            }
-
-            public void checkServerTrusted(X509Certificate[] certs, String authType) {
-            }
-          }
-  };
-
-  /**
-   * HostnameVerifier that accepts any hostname
-   */
-  private final static HostnameVerifier TRUST_ALL_HOSTS_HOSTNAME_VERIFIER = new HostnameVerifier() {
-    @Override
-    public boolean verify(String hostname, SSLSession session) {
-      return true;
-    }
-  };
-
-  HttpRequest.Builder createHttpRequestBuilder(HTTPServer httpServer, String urlPath) {
-    return new HttpRequest.Builder().withURL("http://localhost:" + httpServer.getPort() + urlPath);
-  }
-
-  HttpRequest.Builder createHttpRequestBuilderWithSSL(HTTPServer httpServer, String urlPath) {
-    return new HttpRequest.Builder().withURL("https://localhost:" + httpServer.getPort() + urlPath)
-            .withTrustManagers(TRUST_ALL_CERTS_TRUST_MANAGERS)
-            .withHostnameVerifier(TRUST_ALL_HOSTS_HOSTNAME_VERIFIER);
-  }
-
-  HttpRequest.Builder createHttpRequestBuilder(HttpServer httpServer, String urlPath) {
-    return new HttpRequest.Builder().withURL("http://localhost:" + httpServer.getAddress().getPort() + urlPath);
-  }
-
-  @Before
-  public void init() throws IOException {
-    registry = new CollectorRegistry();
-    Gauge.build("a", "a help").register(registry);
-    Gauge.build("b", "a help").register(registry);
-    Gauge.build("c", "a help").register(registry);
-  }
-
-  @Test(expected = IllegalArgumentException.class)
-  public void testRefuseUsingUnbound() throws IOException {
-    CollectorRegistry registry = new CollectorRegistry();
-    HTTPServer httpServer = new HTTPServer(HttpServer.create(), registry, true);
-    httpServer.close();
-  }
-
-  @Test
-  public void testSimpleRequest() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testBadParams() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?x").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testSingleName() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).doesNotContain("b 0.0");
-      assertThat(body).doesNotContain("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testMultiName() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).doesNotContain("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testSampleNameFilter() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withSampleNameFilter(new SampleNameFilter.Builder()
-                    .nameMustNotStartWith("a")
-                    .build())
-            .build();
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
-      assertThat(body).doesNotContain("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).doesNotContain("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testSampleNameFilterEmptyBody() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withSampleNameFilter(new SampleNameFilter.Builder()
-                    .nameMustNotStartWith("a")
-                    .nameMustNotStartWith("b")
-                    .build())
-            .build();
-
-    try {
-      HttpResponse httpResponse = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute();
-      assertThat(httpResponse.getBody()).isEmpty();
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testDecoding() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?n%61me[]=%61").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).doesNotContain("b 0.0");
-      assertThat(body).doesNotContain("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testGzipCompression() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics")
-              .withHeader("Accept", "gzip")
-              .withHeader("Accept", "deflate")
-              .build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testOpenMetrics() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics")
-              .withHeader("Accept", "application/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1")
-              .build().execute().getBody();
-      assertThat(body).contains("# EOF");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHealth() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/-/healthy").build().execute().getBody();
-      assertThat(body).contains("Exporter is Healthy");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHealthGzipCompression() throws IOException {
-    HTTPServer httpServer = new HTTPServer(new InetSocketAddress(0), registry);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/-/healthy")
-              .withHeader("Accept", "gzip")
-              .withHeader("Accept", "deflate")
-              .build().execute().getBody();
-      assertThat(body).contains("Exporter is Healthy");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testBasicAuthSuccess() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
-              .withAuthorization("user", "secret")
-              .build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testBasicAuthCredentialsMissing() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b").build().execute().getBody();
-      Assert.fail("expected IOException with HTTP 401");
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("401"));
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testBasicAuthWrongCredentials() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
-              .withAuthorization("user", "wrong")
-              .build().execute().getBody();
-      Assert.fail("expected IOException with HTTP 401");
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("401"));
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHEADRequest() throws IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .build();
-
-    try {
-      HttpResponse httpResponse = createHttpRequestBuilder(httpServer, "/metrics?name[]=a&name[]=b")
-              .withMethod(HttpRequest.METHOD.HEAD)
-              .build().execute();
-      Assert.assertNotNull(httpResponse);
-      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
-      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
-      assertThat(httpResponse.getBody()).isEmpty();
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHEADRequestWithSSL() throws GeneralSecurityException, IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
-            .build();
-
-    try {
-      HttpResponse httpResponse = createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
-              .withMethod(HttpRequest.METHOD.HEAD)
-              .build().execute();
-      Assert.assertNotNull(httpResponse);
-      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
-      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
-      assertThat(httpResponse.getBody()).isEmpty();
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testSimpleRequestHttpServerWithHTTPMetricHandler() throws IOException {
-    InetSocketAddress inetSocketAddress = new InetSocketAddress("localhost", 0);
-    HttpServer httpServer = HttpServer.create(inetSocketAddress, 0);
-    httpServer.createContext("/metrics", new HTTPServer.HTTPMetricHandler(registry));
-    httpServer.start();
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.stop(0);
-    }
-  }
-
-  @Test
-  public void testHEADRequestWithSSLAndBasicAuthSuccess() throws GeneralSecurityException, IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      HttpResponse httpResponse = createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
-              .withMethod(HttpRequest.METHOD.HEAD)
-              .withAuthorization("user", "secret")
-              .build().execute();
-      Assert.assertNotNull(httpResponse);
-      Assert.assertNotNull(httpResponse.getHeaderAsLong("content-length"));
-      Assert.assertTrue(httpResponse.getHeaderAsLong("content-length") == 74);
-      assertThat(httpResponse.getBody()).isEmpty();
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHEADRequestWithSSLAndBasicAuthCredentialsMissing() throws GeneralSecurityException, IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
-              .withMethod(HttpRequest.METHOD.HEAD)
-              .build().execute();
-      Assert.fail("expected IOException with HTTP 401");
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("401"));
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testHEADRequestWithSSLAndBasicAuthWrongCredentials() throws GeneralSecurityException, IOException {
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withRegistry(registry)
-            .withHttpsConfigurator(HTTPS_CONFIGURATOR)
-            .withAuthenticator(createAuthenticator("/", "user", "secret"))
-            .build();
-
-    try {
-      createHttpRequestBuilderWithSSL(httpServer, "/metrics?name[]=a&name[]=b")
-              .withMethod(HttpRequest.METHOD.HEAD)
-              .withAuthorization("user", "wrong")
-              .build().execute();
-      Assert.fail("expected IOException with HTTP 401");
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("401"));
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test
-  public void testExecutorService() throws IOException {
-    ExecutorService executorService = Executors.newFixedThreadPool(20);
-
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withExecutorService(executorService)
-            .withRegistry(registry)
-            .build();
-
-    Assert.assertEquals(httpServer.executorService, executorService);
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  @Test(expected = IllegalStateException.class)
-  public void testExecutorServiceWithHttpServer() throws IOException {
-    InetSocketAddress inetSocketAddress = new InetSocketAddress("localhost", 0);
-
-    HttpServer externalHttpServer = HttpServer.create(inetSocketAddress, 0);
-    externalHttpServer.createContext("/metrics", new HTTPServer.HTTPMetricHandler(registry));
-    externalHttpServer.start();
-
-    ExecutorService executorService = Executors.newFixedThreadPool(20);
-
-    HTTPServer httpServer = new HTTPServer.Builder()
-            .withExecutorService(executorService)
-            .withHttpServer(externalHttpServer)
-            .withRegistry(registry)
-            .build();
-
-    try {
-      String body = createHttpRequestBuilder(httpServer, "/metrics").build().execute().getBody();
-      assertThat(body).contains("a 0.0");
-      assertThat(body).contains("b 0.0");
-      assertThat(body).contains("c 0.0");
-    } finally {
-      httpServer.close();
-    }
-  }
-
-  /**
-   * Encodes authorization credentials
-   *
-   * @param username
-   * @param password
-   * @return String
-   */
-  private final static String encodeCredentials(String username, String password) {
-    // Per RFC4648 table 2. We support Java 6, and java.util.Base64 was only added in Java 8,
-    try {
-      byte[] credentialsBytes = (username + ":" + password).getBytes("UTF-8");
-      return "Basic " +  DatatypeConverter.printBase64Binary(credentialsBytes);
-    } catch (UnsupportedEncodingException e) {
-      throw new IllegalArgumentException(e);
-    }
-  }
-
-  /**
-   * Create an SSLContext
-   *
-   * @param sslContextType
-   * @param keyStoreType
-   * @param keyStorePath
-   * @param keyStorePassword
-   * @return SSLContext
-   * @throws GeneralSecurityException
-   * @throws IOException
-   */
-  private final static SSLContext createSSLContext(String sslContextType, String keyStoreType, String keyStorePath, String keyStorePassword)
-          throws GeneralSecurityException, IOException {
-    SSLContext sslContext = null;
-    FileInputStream fileInputStream = null;
-
-    try {
-      File file = new File(keyStorePath);
-
-      if ((file.exists() == false) || (file.isFile() == false) || (file.canRead() == false)) {
-        throw new IllegalArgumentException("cannot read 'keyStorePath', path = [" + file.getAbsolutePath() + "]");
-      }
-
-      fileInputStream = new FileInputStream(keyStorePath);
-
-      KeyStore keyStore = KeyStore.getInstance(keyStoreType);
-      keyStore.load(fileInputStream, keyStorePassword.toCharArray());
-
-      KeyManagerFactory keyManagerFactor = KeyManagerFactory.getInstance("SunX509");
-      keyManagerFactor.init(keyStore, keyStorePassword.toCharArray());
-
-      TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
-      trustManagerFactory.init(keyStore);
-
-      sslContext = SSLContext.getInstance(sslContextType);
-      sslContext.init(keyManagerFactor.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
-    } finally {
-      if (fileInputStream != null) {
-        try {
-          fileInputStream.close();
-        } catch (IOException e) {
-          // IGNORE
-        }
-      }
-    }
-
-    return sslContext;
-  }
-
-  /**
-   * Creates an Authenticator
-   *
-   * @param realm
-   * @param validUsername
-   * @param validPassword
-   * @return Authenticator
-   */
-  private final static Authenticator createAuthenticator(String realm, final String validUsername, final String validPassword) {
-    return new BasicAuthenticator(realm) {
-      @Override
-      public boolean checkCredentials(String username, String password) {
-        return validUsername.equals(username) && validPassword.equals(password);
-      }
-    };
-  }
-
-  /**
-   * Creates an HttpsConfiguration
-   * 
-   * @param sslContext
-   * @return HttpsConfigurator
-   */
-  private static HttpsConfigurator createHttpsConfigurator(SSLContext sslContext) {
-    return new HttpsConfigurator(sslContext) {
-      @Override
-      public void configure(HttpsParameters params) {
-        try {
-          SSLContext c = getSSLContext();
-          SSLEngine engine = c.createSSLEngine();
-          params.setNeedClientAuth(false);
-          params.setCipherSuites(engine.getEnabledCipherSuites());
-          params.setProtocols(engine.getEnabledProtocols());
-          SSLParameters sslParameters = c.getSupportedSSLParameters();
-          params.setSSLParameters(sslParameters);
-        } catch (Exception e) {
-          throw new RuntimeException("Exception creating HttpsConfigurator", e);
-        }
-      }
-    };
-  }
-}u}(j@  (4e635ac82d941565f32321e720aead0c1fde9fb9j@  Iprometheus-metrics-exporter-httpserver/src/test/resources/keystore.pkcs12j@  removedj@  K j@  K j@  K j A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12jA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12jA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Ftest%2Fresources%2Fkeystore.pkcs12?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5u}(j@  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj@  8prometheus-metrics-exporter-httpserver/version-rules.xmlj@  removedj@  K j@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljA  https://github.com/prometheus/client_java/raw/9ffe2ac6685c1a0956d19b7b158721c7f97de7a5/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=9ffe2ac6685c1a0956d19b7b158721c7f97de7a5jA  X  @@ -1,6 +0,0 @@
-<ruleset comparisonMethod="maven"
-         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
-    <rules>
-    </rules>
-</ruleset>
\ No newline at end of fileu}(j@  (2d1ce9dcdeb3a31694fd5f5620ca04ab951c8b35j@  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javaj@  addedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface ExpositionFormatWriter {
+    boolean accepts(String acceptHeader);
+    void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
+    String getContentType();
+}u}(j@  (9044e662be54205d4b7db4d28a1a1bfdfc219623j@  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X~  @@ -33,7 +33,7 @@
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
  */
-public class OpenMetricsTextFormatWriter {
+public class OpenMetricsTextFormatWriter implements ExpositionFormatWriter {
 
     public final static String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
     private final boolean createdTimestampsEnabled;
@@ -45,6 +45,19 @@ public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled) {
         this.createdTimestampsEnabled = createdTimestampsEnabled;
     }
 
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        }
+        return acceptHeader.contains("application/openmetrics-text");
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
     public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
         OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
         for (MetricSnapshot snapshot : metricSnapshots) {u}(j@  (9fb6b6fb3c1eebb98f9bb0ac7b6390eccb677e29j@  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -30,10 +30,26 @@
  * <p>
  * As of today, this is the only exposition format that supports native histograms.
  */
-public class PrometheusProtobufWriter {
+public class PrometheusProtobufWriter implements ExpositionFormatWriter {
 
     public final String CONTENT_TYPE = "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited";
 
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+            return acceptHeader.contains("application/vnd.google.protobuf")
+                    && acceptHeader.contains("proto=io.prometheus.client.MetricFamily");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    @Override
     public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
         for (MetricSnapshot snapshot : metricSnapshots) {
             if (snapshot.getData().size() > 0) {u}(j@  (15971c2a7598b334cf5a0bf00de5971676fc35baj@  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javaj@  modifiedj@  Kj@  Kj@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  XV  @@ -30,7 +30,7 @@
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
  */
-public class PrometheusTextFormatWriter {
+public class PrometheusTextFormatWriter implements ExpositionFormatWriter {
 
     public final static String CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
 
@@ -40,6 +40,20 @@ public PrometheusTextFormatWriter(boolean writeCreatedTimestamps) {
         this.writeCreatedTimestamps = writeCreatedTimestamps;
     }
 
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+        return acceptHeader.contains("text/plain");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
     public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
         // See https://prometheus.io/docs/instrumenting/exposition_formats/
         // "unknown", "gauge", "counter", "stateset", "info", "histogram", "gaugehistogram", and "summary".u}(j@  (df791a86a09519cfc123287ad43e5a9c43ce277aj@  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj@  modifiedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  Xh  @@ -23,4 +23,15 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>u}(j@  (6bdd685c0d6a5b8fcd52c508c96efdabc06cdf0dj@  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj@  modifiedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljA  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  Xh  @@ -38,4 +38,15 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>u}(j@  (dbc9f5ec59ad80bdbb9d4727a185942d7e969d11j@  tmp_example/pom.xmlj@  addedj@  K(j@  K j@  K(j A  mhttps://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fpom.xmljA  lhttps://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fpom.xmljA  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X[  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>0.16.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tmp_example</artifactId>
+
+    <name>Example for Manual Testing</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j@  (3e29ed8ea6b9830cccdfb1fb6570fa754e8d5be9j@  /tmp_example/src/main/java/com/example/Main.javaj@  addedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javajA  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X2  @@ -0,0 +1,22 @@
+package com.example;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.observer.DiscreteEventObserver;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.IOException;
+
+public class Main {
+
+    public static void main(String[] args) throws IOException {
+        Counter counter = Counter.newBuilder()
+                .withLabelNames("path")
+                .withName("events_total")
+                .build();
+        DiscreteEventObserver goodCase = counter.withLabelValues("/get");
+        PrometheusRegistry.defaultRegistry.register(counter);
+        counter.inc(1.0);
+        HTTPServer server = HTTPServer.newBuilder().withPort(9000).build();
+    }
+}u}(j@  (48de3b999a53c44fb83dc1a27e520d3b156a335bj@  Stmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj@  renamedj@  K9j@  Kj@  Mj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajA  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  XD  @@ -2,30 +2,24 @@
 
 import com.sun.net.httpserver.Authenticator;
 import com.sun.net.httpserver.HttpContext;
-import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpHandler;
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import io.prometheus.client.CollectorRegistry;
-import io.prometheus.client.Predicate;
-import io.prometheus.client.SampleNameFilter;
-import io.prometheus.client.Supplier;
-import io.prometheus.client.exporter.common.TextFormat;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-
-import java.io.ByteArrayOutputStream;
+import io.prometheus.metrics.config.HttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
 import java.io.Closeable;
 import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.net.HttpURLConnection;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
-import java.net.URLDecoder;
-import java.nio.charset.Charset;
-import java.util.HashSet;
+import java.util.Arrays;
 import java.util.List;
-import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -34,8 +28,7 @@
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Supplier;
-import java.util.zip.GZIPOutputStream;
+import java.util.function.Predicate;
 
 /**
  * Expose Prometheus metrics using a plain Java HttpServer.
@@ -59,109 +52,6 @@ public class HTTPServer implements Closeable {
         }
     }
 
-    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
-        @Override
-        protected ByteArrayOutputStream initialValue()
-        {
-            return new ByteArrayOutputStream(1 << 20);
-        }
-    }
-
-    /**
-     * Handles Metrics collections from the given registry.
-     */
-    public static class HTTPMetricHandler implements HttpHandler {
-        private final Supplier<MetricSnapshots> registry;
-        private final LocalByteArray response = new LocalByteArray();
-        private final Supplier<Predicate<String>> sampleNameFilterSupplier;
-        private final static String HEALTHY_RESPONSE = "Exporter is Healthy.";
-
-        public HTTPMetricHandler(CollectorRegistry registry) {
-            this(registry, null);
-        }
-
-        public HTTPMetricHandler(CollectorRegistry registry, Supplier<Predicate<String>> sampleNameFilterSupplier) {
-            this.registry = registry;
-            this.sampleNameFilterSupplier = sampleNameFilterSupplier;
-        }
-
-        @Override
-        public void handle(HttpExchange t) throws IOException {
-            String query = t.getRequestURI().getRawQuery();
-            String contextPath = t.getHttpContext().getPath();
-            ByteArrayOutputStream response = this.response.get();
-            response.reset();
-            OutputStreamWriter osw = new OutputStreamWriter(response, Charset.forName("UTF-8"));
-            if ("/-/healthy".equals(contextPath)) {
-                osw.write(HEALTHY_RESPONSE);
-            } else {
-                String contentType = TextFormat.chooseContentType(t.getRequestHeaders().getFirst("Accept"));
-                t.getResponseHeaders().set("Content-Type", contentType);
-                Predicate<String> filter = sampleNameFilterSupplier == null ? null : sampleNameFilterSupplier.get();
-                filter = SampleNameFilter.restrictToNamesEqualTo(filter, parseQuery(query));
-                if (filter == null) {
-                    TextFormat.writeFormat(contentType, osw, registry.metricFamilySamples());
-                } else {
-                    TextFormat.writeFormat(contentType, osw, registry.filteredMetricFamilySamples(filter));
-                }
-            }
-
-            osw.close();
-
-            if (shouldUseCompression(t)) {
-                t.getResponseHeaders().set("Content-Encoding", "gzip");
-                t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
-                final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
-                try {
-                    response.writeTo(os);
-                } finally {
-                    os.close();
-                }
-            } else {
-                long contentLength = response.size();
-                if (contentLength > 0) {
-                    t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
-                }
-                if (t.getRequestMethod().equals("HEAD")) {
-                    contentLength = -1;
-                }
-                t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
-                response.writeTo(t.getResponseBody());
-            }
-            t.close();
-        }
-    }
-
-    protected static boolean shouldUseCompression(HttpExchange exchange) {
-        List<String> encodingHeaders = exchange.getRequestHeaders().get("Accept-Encoding");
-        if (encodingHeaders == null) return false;
-
-        for (String encodingHeader : encodingHeaders) {
-            String[] encodings = encodingHeader.split(",");
-            for (String encoding : encodings) {
-                if (encoding.trim().equalsIgnoreCase("gzip")) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    protected static Set<String> parseQuery(String query) throws IOException {
-        Set<String> names = new HashSet<String>();
-        if (query != null) {
-            String[] pairs = query.split("&");
-            for (String pair : pairs) {
-                int idx = pair.indexOf("=");
-                if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals("name[]")) {
-                    names.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
-                }
-            }
-        }
-        return names;
-    }
-
-
     static class NamedDaemonThreadFactory implements ThreadFactory {
         private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
 
@@ -191,24 +81,30 @@ static ThreadFactory defaultThreadFactory(boolean daemon) {
     protected final HttpServer server;
     protected final ExecutorService executorService;
 
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
     /**
      * We keep the original constructors of {@link HTTPServer} for compatibility, but new configuration
      * parameters like {@code sampleNameFilter} must be configured using the Builder.
      */
     public static class Builder {
 
-        private int port = 0;
+        private Integer port = null;
         private String hostname = null;
         private InetAddress inetAddress = null;
         private InetSocketAddress inetSocketAddress = null;
         private HttpServer httpServer = null;
         private ExecutorService executorService = null;
-        private CollectorRegistry registry = CollectorRegistry.defaultRegistry;
+        private PrometheusRegistry registry = null;
+        private HttpServerProperties properties = null;
         private boolean daemon = false;
         private Predicate<String> sampleNameFilter;
-        private Supplier<Predicate<String>> sampleNameFilterSupplier;
-        private Authenticator authenticator;
-        private HttpsConfigurator httpsConfigurator;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder() {}
 
         /**
          * Port to bind to. Must not be called together with {@link #withInetSocketAddress(InetSocketAddress)}
@@ -219,6 +115,11 @@ public Builder withPort(int port) {
             return this;
         }
 
+        public Builder withProperties(HttpServerProperties properties) {
+            this.properties = properties;
+            return this;
+        }
+
         /**
          * Use this hostname to resolve the IP address to bind to. Must not be called together with
          * {@link #withInetAddress(InetAddress)} or {@link #withInetSocketAddress(InetSocketAddress)}
@@ -283,32 +184,16 @@ public Builder withDaemonThreads(boolean daemon) {
 
         /**
          * Optional: Only export time series where {@code sampleNameFilter.test(name)} returns true.
-         * <p>
-         * Use this if the sampleNameFilter remains the same throughout the lifetime of the HTTPServer.
-         * If the sampleNameFilter changes during runtime, use {@link #withSampleNameFilterSupplier(Supplier)}.
          */
         public Builder withSampleNameFilter(Predicate<String> sampleNameFilter) {
             this.sampleNameFilter = sampleNameFilter;
             return this;
         }
 
         /**
-         * Optional: Only export time series where {@code sampleNameFilter.test(name)} returns true.
-         * <p>
-         * Use this if the sampleNameFilter may change during runtime, like for example if you have a
-         * hot reload mechanism for your filter config.
-         * If the sampleNameFilter remains the same throughout the lifetime of the HTTPServer,
-         * use {@link #withSampleNameFilter(Predicate)} instead.
-         */
-        public Builder withSampleNameFilterSupplier(Supplier<Predicate<String>> sampleNameFilterSupplier) {
-            this.sampleNameFilterSupplier = sampleNameFilterSupplier;
-            return this;
-        }
-
-        /**
-         * Optional: Default is {@link CollectorRegistry#defaultRegistry}.
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
          */
-        public Builder withRegistry(CollectorRegistry registry) {
+        public Builder withRegistry(PrometheusRegistry registry) {
             this.registry = registry;
             return this;
         }
@@ -329,14 +214,27 @@ public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
             return this;
         }
 
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort();
+            }
+            if (port != null) {
+                return port;
+            }
+            HttpServerProperties defaultProperties = PrometheusProperties.getInstance().getHttpServerConfig();
+            if (defaultProperties != null && defaultProperties.getPort() != null) {
+                return defaultProperties.getPort();
+            }
+            return 0; // random port will be selected
+        }
+
         /**
          * Build the HTTPServer
          * @throws IOException
          */
         public HTTPServer build() throws IOException {
-            if (sampleNameFilter != null) {
-                assertNull(sampleNameFilterSupplier, "cannot configure 'sampleNameFilter' and 'sampleNameFilterSupplier' at the same time");
-                sampleNameFilterSupplier = SampleNameFilterSupplier.of(sampleNameFilter);
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
             }
 
             if (httpServer != null) {
@@ -346,18 +244,18 @@ public HTTPServer build() throws IOException {
                 assertNull(inetAddress, "cannot configure 'httpServer' and 'inetAddress' at the same time");
                 assertNull(inetSocketAddress, "cannot configure 'httpServer' and 'inetSocketAddress' at the same time");
                 assertNull(httpsConfigurator, "cannot configure 'httpServer' and 'httpsConfigurator' at the same time");
-                return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilterSupplier, authenticator);
+                return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilter, authenticator);
             } else if (inetSocketAddress != null) {
                 assertZero(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
                 assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
                 assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
             } else if (inetAddress != null) {
                 assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
-                inetSocketAddress = new InetSocketAddress(inetAddress, port);
+                inetSocketAddress = new InetSocketAddress(inetAddress, findPort());
             } else if (hostname != null) {
-                inetSocketAddress = new InetSocketAddress(hostname, port);
+                inetSocketAddress = new InetSocketAddress(hostname, findPort());
             } else {
-                inetSocketAddress = new InetSocketAddress(port);
+                inetSocketAddress = new InetSocketAddress(findPort());
             }
 
             HttpServer httpServer = null;
@@ -368,7 +266,7 @@ public HTTPServer build() throws IOException {
                 httpServer = HttpServer.create(inetSocketAddress, 3);
             }
 
-            return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilterSupplier, authenticator);
+            return new HTTPServer(executorService, httpServer, registry, daemon, sampleNameFilter, authenticator);
         }
 
         private void assertNull(Object o, String msg) {
@@ -384,62 +282,19 @@ private void assertZero(int i, String msg) {
         }
     }
 
-    /**
-     * Start an HTTP server serving Prometheus metrics from the given registry using the given {@link HttpServer}.
-     * The {@code httpServer} is expected to already be bound to an address
-     */
-    public HTTPServer(HttpServer httpServer, CollectorRegistry registry, boolean daemon) throws IOException {
-        this(null, httpServer, registry, daemon, null, null);
-    }
-
-    /**
-     * Start an HTTP server serving Prometheus metrics from the given registry.
-     */
-    public HTTPServer(InetSocketAddress addr, CollectorRegistry registry, boolean daemon) throws IOException {
-        this(HttpServer.create(addr, 3), registry, daemon);
-    }
-
-    /**
-     * Start an HTTP server serving Prometheus metrics from the given registry using non-daemon threads.
-     */
-    public HTTPServer(InetSocketAddress addr, CollectorRegistry registry) throws IOException {
-        this(addr, registry, false);
-    }
-
-    /**
-     * Start an HTTP server serving the default Prometheus registry.
-     */
-    public HTTPServer(int port, boolean daemon) throws IOException {
-        this(new InetSocketAddress(port), CollectorRegistry.defaultRegistry, daemon);
-    }
-
-    /**
-     * Start an HTTP server serving the default Prometheus registry using non-daemon threads.
-     */
-    public HTTPServer(int port) throws IOException {
-        this(port, false);
-    }
-
-    /**
-     * Start an HTTP server serving the default Prometheus registry.
-     */
-    public HTTPServer(String host, int port, boolean daemon) throws IOException {
-        this(new InetSocketAddress(host, port), CollectorRegistry.defaultRegistry, daemon);
-    }
 
-    /**
-     * Start an HTTP server serving the default Prometheus registry using non-daemon threads.
-     */
-    public HTTPServer(String host, int port) throws IOException {
-        this(new InetSocketAddress(host, port), CollectorRegistry.defaultRegistry, false);
-    }
 
-    private HTTPServer(ExecutorService executorService, HttpServer httpServer, CollectorRegistry registry, boolean daemon, Supplier<Predicate<String>> sampleNameFilterSupplier, Authenticator authenticator) {
+    private HTTPServer(ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, boolean daemon, Predicate<String> sampleNameFilter, Authenticator authenticator) {
         if (httpServer.getAddress() == null)
             throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
 
         server = httpServer;
-        HttpHandler mHandler = new HTTPMetricHandler(registry, sampleNameFilterSupplier);
+        List<ExpositionFormatWriter> expositionFormatWriters = Arrays.asList(
+                new PrometheusTextFormatWriter(true),
+                new OpenMetricsTextFormatWriter(true),
+                new PrometheusProtobufWriter());
+        HttpHandler mHandler = new MetricsHandler(registry, expositionFormatWriters, sampleNameFilter);
+        HttpHandler hHandler = new HealthyHandler();
         HttpContext mContext = server.createContext("/", mHandler);
         if (authenticator != null) {
             mContext.setAuthenticator(authenticator);
@@ -448,7 +303,7 @@ private HTTPServer(ExecutorService executorService, HttpServer httpServer, Colle
         if (authenticator != null) {
             mContext.setAuthenticator(authenticator);
         }
-        mContext = server.createContext("/-/healthy", mHandler);
+        mContext = server.createContext("/-/healthy", hHandler);
         if (authenticator != null) {
             mContext.setAuthenticator(authenticator);
         }      previous_filenamenprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javau}(j@  (ccf47a1aa43c7fac4008193117b30a84e967a71aj@  Wtmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javaj@  addedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajA  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final static byte[] HEALTHY_RESPONSE = "Exporter is Healthy.".getBytes(StandardCharsets.UTF_8);
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        // TODO: This is not complete (http status? compression? content length?)
+        exchange.getResponseBody().write(HEALTHY_RESPONSE);
+        exchange.close();
+    }
+}u}(j@  (26cce5bb35d8fb21e4c9392f16d688d17dcd4046j@  Wtmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj@  addedj@  Kj@  K j@  Kj A  https://github.com/prometheus/client_java/blob/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajA  https://github.com/prometheus/client_java/raw/7bb2d38c044744cd453e4d448ced60e85c1dab70/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajA  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=7bb2d38c044744cd453e4d448ced60e85c1dab70jA  X}  @@ -0,0 +1,137 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final List<ExpositionFormatWriter> expositionFormatWriters = new ArrayList<>();
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue() {
+            return new ByteArrayOutputStream(1 << 20); // 1 MB
+        }
+    }
+
+    private final PrometheusRegistry registry;
+    private final LocalByteArray response = new LocalByteArray();
+    private final Predicate<String> sampleNameFilter;
+
+    public MetricsHandler(PrometheusRegistry registry, List<ExpositionFormatWriter> expositionFormatWriters) {
+        this(registry, expositionFormatWriters, null);
+    }
+
+    public MetricsHandler(PrometheusRegistry registry,
+                          List<ExpositionFormatWriter> expositionFormatWriters,
+                          Predicate<String> sampleNameFilter) {
+        this.registry = registry;
+        this.sampleNameFilter = sampleNameFilter;
+        this.expositionFormatWriters.addAll(expositionFormatWriters);
+        if (expositionFormatWriters.isEmpty()) {
+            throw new IllegalStateException("Need at least one exposition format");
+        }
+    }
+
+    private ExpositionFormatWriter findExpositionFormatWriter(String acceptHeader) {
+        for (ExpositionFormatWriter writer : expositionFormatWriters) {
+            if (writer.accepts(acceptHeader)) {
+                return writer;
+            }
+        }
+        return expositionFormatWriters.get(0);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        String query = t.getRequestURI().getRawQuery();
+        ByteArrayOutputStream response = this.response.get();
+        response.reset();
+        String acceptHeader = t.getRequestHeaders().getFirst("Accept");
+        ExpositionFormatWriter writer = findExpositionFormatWriter(acceptHeader);
+        t.getResponseHeaders().set("Content-Type", writer.getContentType());
+        Predicate<String> nameFilterFromQueryParameter = getNamesFilterFromQueryParameter(query);
+        Predicate<String> filter = sampleNameFilter;
+        if (filter != null && nameFilterFromQueryParameter != null) {
+            filter = filter.and(nameFilterFromQueryParameter);
+        } else if (nameFilterFromQueryParameter != null) {
+            filter = nameFilterFromQueryParameter;
+        }
+        if (filter == null) {
+            writer.write(response, registry.scrape());
+        } else {
+            writer.write(response, registry.scrape(filter)); // TODO: filter is "includes", but expected parameter is "excludes"
+        }
+        response.close();
+        if (shouldUseCompression(t)) {
+            t.getResponseHeaders().set("Content-Encoding", "gzip");
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
+            final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
+            try {
+                response.writeTo(os);
+            } finally {
+                os.close();
+            }
+        } else {
+            long contentLength = response.size();
+            if (contentLength > 0) {
+                t.getResponseHeaders().set("Content-Length", String.valueOf(contentLength));
+            }
+            if (t.getRequestMethod().equals("HEAD")) {
+                contentLength = -1;
+            }
+            t.sendResponseHeaders(HttpURLConnection.HTTP_OK, contentLength);
+            response.writeTo(t.getResponseBody());
+        }
+        t.close();
+    }
+
+    private boolean shouldUseCompression(HttpExchange exchange) {
+        List<String> encodingHeaders = exchange.getRequestHeaders().get("Accept-Encoding");
+        if (encodingHeaders == null) return false;
+
+        for (String encodingHeader : encodingHeaders) {
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private Predicate<String> getNamesFilterFromQueryParameter(String query) throws IOException {
+        Set<String> names = new HashSet<>();
+        if (query != null) {
+            String[] pairs = query.split("&");
+            for (String pair : pairs) {
+                int idx = pair.indexOf("=");
+                if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals("name[]")) {
+                    names.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                }
+            }
+        }
+        if (!names.isEmpty()) {
+        return names::contains;
+        } else {
+            return null;
+        }
+    }
+}ueu(d68dac0194735867bd02293043b13fe8c12bc12e}(sha(d68dac0194735867bd02293043b13fe8c12bc12enode_idEC_kwDOAHoJt9oAKGQ2OGRhYzAxOTQ3MzU4NjdiZDAyMjkzMDQzYjEzZmU4YzEyYmMxMmUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:16:15Zu	committer}(jA  Fabian StäberjA  fabian@fstab.dejA  2023-07-17T10:16:15Zumessage=[maven-release-plugin] prepare for next development iterationtree}(jA  (d3e77068785d25893916f3da46f98eea5ddcb835urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d3e77068785d25893916f3da46f98eea5ddcb835ujB  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d68dac0194735867bd02293043b13fe8c12bc12e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujB  dhttps://api.github.com/repos/prometheus/client_java/commits/d68dac0194735867bd02293043b13fe8c12bc12ehtml_urlYhttps://github.com/prometheus/client_java/commit/d68dac0194735867bd02293043b13fe8c12bc12ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d68dac0194735867bd02293043b13fe8c12bc12e/commentsjA  }(loginfstabidJ' jA  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jB  "https://api.github.com/users/fstabjB  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujB  }(jB  fstabjB  J' jA  MDQ6VXNlcjMzMDUzNQ==j B  2https://avatars.githubusercontent.com/u/330535?v=4j"B  h3jB  "https://api.github.com/users/fstabjB  https://github.com/fstabj%B  ,https://api.github.com/users/fstab/followersj'B  9https://api.github.com/users/fstab/following{/other_user}j)B  2https://api.github.com/users/fstab/gists{/gist_id}j+B  9https://api.github.com/users/fstab/starred{/owner}{/repo}j-B  0https://api.github.com/users/fstab/subscriptionsj/B  'https://api.github.com/users/fstab/orgsj1B  (https://api.github.com/users/fstab/reposj3B  3https://api.github.com/users/fstab/events{/privacy}j5B  2https://api.github.com/users/fstab/received_eventsj7B  Userj9B  uparents]}(jA  (7a35c12ee30d8722cfeb524c115239bbbec2600bjB  dhttps://api.github.com/repos/prometheus/client_java/commits/7a35c12ee30d8722cfeb524c115239bbbec2600bjB  Yhttps://github.com/prometheus/client_java/commit/7a35c12ee30d8722cfeb524c115239bbbec2600buastats}(totalKd	additionsK2	deletionsK2ufiles](}(jA  (7d207b99a2f5484a47057fb5b74847c7f840a3e2filenamebenchmarks/pom.xmlstatusmodifiedjSB  KjTB  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12epatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jA  (b76818b770e28e8bad259bdce8adfc16fa0cbc2fjYB  examples/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  jhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/examples%2Fpom.xmlj`B  ihttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/examples%2Fpom.xmljbB  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jA  (51c0fa5f00bf773bfd14fe817439ea7ecd84ade9jYB  'examples/tomcat-servlet-example/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/examples%2Ftomcat-servlet-example%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/examples%2Ftomcat-servlet-example%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(jA  (5a200b51d434fd6c0857411134be3f22ef62558fjYB  #integration_tests/it_common/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_common%2Fpom.xmlj`B  ~https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_common%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jA  (519d5355e268b4a24805febe370286b6e771ddf1jYB  1integration_tests/it_exemplars_otel_agent/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jA  (c2a6763cc2108740fcec7eae7a51a6fefe564c87jYB  /integration_tests/it_exemplars_otel_sdk/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jA  (34df8597cbf4eecefa9954de0d2f7d37fb7527afjYB  *integration_tests/it_java_versions/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_java_versions%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_java_versions%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jA  (d3236f7d3759f98f3416e6385e8a195006c94f48jYB  #integration_tests/it_log4j2/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_log4j2%2Fpom.xmlj`B  ~https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_log4j2%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jA  (739e8684bb8d9bf6ed9b067c6c454fe8dae10f75jYB  (integration_tests/it_pushgateway/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_pushgateway%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_pushgateway%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jA  (11db7010bd22b49a9537bbf9984402846f659252jYB  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jA  (2ede9491e4602cfcc52358eb29442cfdfc6f8551jYB  integration_tests/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  shttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fpom.xmlj`B  rhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/integration_tests%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jA  (7b24d41e2859ba5fc8dc23855f88c6f63cced068jYB  pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  _https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/pom.xmlj`B  ^https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/pom.xmljbB  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>v1.0.0-alpha-1</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(jA  (6bb2555837b85b18466eed2d601343b009a6215ajYB  !prometheus-metrics-config/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  {https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-config%2Fpom.xmlj`B  zhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-config%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jA  (15f75c01e1c45c569307bbab13fbd16151b04570jYB  prometheus-metrics-core/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  yhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-core%2Fpom.xmlj`B  xhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-core%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jA  (95129ce21c4375573a0c84d408c2c8000a4c0433jYB  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jA  (fafdde58ddd13317f6373177e959d2af55c23f15jYB  -prometheus-metrics-exposition-formats/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-exposition-formats%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-exposition-formats%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jA  (a28d6c18a8c93459c0d97b4daf4b3f59e4eca64cjYB   prometheus-metrics-model/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  zhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-model%2Fpom.xmlj`B  yhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-model%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jA  (19d0a2f5277a8580f9072329f70798aebfa64bebjYB  !prometheus-metrics-tracer/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  {https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fpom.xmlj`B  zhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jA  (807b126ddccbc27496ddf27c1920abc122ff9442jYB  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jA  (da05c105697915f641b14b9f02c641197d779786jYB  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jA  (0fdd4cf494cf7a962794627f3e0d42495a39b8fajYB  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jA  (da389af0cf4d0fa24ebca4ae7b8a2cbc09b8c9d5jYB  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jA  (ef4e04e773cd4f7cffd285f019cc1435dfb216d8jYB  protobuf-shaded/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  qhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/protobuf-shaded%2Fpom.xmlj`B  phttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/protobuf-shaded%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(jA  (1b6c4ae1d0fec50fdd0ff07368f2ffeffc08f1d4jYB  simpleclient/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  nhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient%2Fpom.xmlj`B  mhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jA  (18e4372ccc7d872d9079adec4f863e69a69cc01cjYB  simpleclient_bom/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  rhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_bom%2Fpom.xmlj`B  qhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_bom%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jA  (44c9105c6582e4e349383b7bbc32036b0cde1fa2jYB  simpleclient_caffeine/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  whttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_caffeine%2Fpom.xmlj`B  vhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_caffeine%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jA  (cbed662ec66e985ada43eba01c5c8f4b148296bejYB  simpleclient_common/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  uhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_common%2Fpom.xmlj`B  thttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_common%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jA  (64f1c46af4191cc89605c6523818b2fe09a41f88jYB  simpleclient_dropwizard/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  yhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_dropwizard%2Fpom.xmlj`B  xhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_dropwizard%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jA  (f2b27bac68cb715c2be7c8855baa4b08f16d126bjYB  $simpleclient_graphite_bridge/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  ~https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_graphite_bridge%2Fpom.xmlj`B  }https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_graphite_bridge%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jA  (06d9a07dcfcf0822720f7cf47199b3c03a9fad73jYB  simpleclient_guava/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  thttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_guava%2Fpom.xmlj`B  shttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_guava%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jA  (933fc4a459b1286442c5a2f9bfc941e6002e0deejYB  simpleclient_hibernate/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  xhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_hibernate%2Fpom.xmlj`B  whttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_hibernate%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jA  (b7d9af5598a2cc872c81786b559124e4b7d993eejYB  simpleclient_hotspot/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  vhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_hotspot%2Fpom.xmlj`B  uhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_hotspot%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jA  (ce830ebd744605d7ab9540d3b51f454b794b745fjYB  simpleclient_httpserver/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  yhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_httpserver%2Fpom.xmlj`B  xhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_httpserver%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jA  (b5bd23c7b6d3a991b43ca3d3d4bae24d9ee9ee3ejYB  simpleclient_jetty/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  thttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_jetty%2Fpom.xmlj`B  shttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_jetty%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jA  (1628141a75cf48bbbbbf245e87037714e01605b8jYB  simpleclient_jetty_jdk8/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  yhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_jetty_jdk8%2Fpom.xmlj`B  xhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_jetty_jdk8%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jA  (72f5a210bcf76a222db8c8c3585cda374b74c886jYB  simpleclient_log4j/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  thttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_log4j%2Fpom.xmlj`B  shttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_log4j%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jA  (4a772b5e2f61d468e4d9da8cf6e0bcd6146df2f9jYB  simpleclient_log4j2/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  uhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_log4j2%2Fpom.xmlj`B  thttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_log4j2%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jA  (73ef79f4247428aa3ce11f8f1bb71f7001177711jYB  simpleclient_logback/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  vhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_logback%2Fpom.xmlj`B  uhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_logback%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jA  (334d299aa02f822cf727fae857c0ec005941cee5jYB   simpleclient_pushgateway/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  zhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_pushgateway%2Fpom.xmlj`B  yhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_pushgateway%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jA  (055caf224b22209a770495299ccbe7d42be061a9jYB  simpleclient_servlet/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  vhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet%2Fpom.xmlj`B  uhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jA  (02a49fd7d7e6f682ce7758cf0407db6f7dc5c6b4jYB  #simpleclient_servlet_common/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  }https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet_common%2Fpom.xmlj`B  |https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet_common%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jA  (4a86834915729d3a4ca0c1e0ccda28ea86a4cf77jYB  $simpleclient_servlet_jakarta/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  ~https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet_jakarta%2Fpom.xmlj`B  }https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_servlet_jakarta%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jA  (9833ddf60557b180641c0f279423481fdc9e768ejYB  simpleclient_spring_web/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  yhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_spring_web%2Fpom.xmlj`B  xhttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_spring_web%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jA  (0d5b9245d1085bf3b070162abec760022b8b185bjYB  simpleclient_tracer/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  uhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fpom.xmlj`B  thttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jA  (ff5a09c58a22b80db04cf7ddb58204e07699a9f6jYB  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jA  (f0b4a2114a9d0b7fb7f282145b77094943e0cfbejYB  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jA  (f08539d4b4ba995e8bf91f910ce3f7062bc2fb02jYB  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  https://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj`B  https://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jA  (ac11b3bea8b38b78ffb7e1af68d4e59e7e119d87jYB  simpleclient_vertx/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  thttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_vertx%2Fpom.xmlj`B  shttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_vertx%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jA  (153f32248c61a81a25958458f6110a4fa0d23ee2jYB  simpleclient_vertx4/pom.xmlj[B  modifiedjSB  KjTB  Kj]B  Kj^B  uhttps://github.com/prometheus/client_java/blob/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_vertx4%2Fpom.xmlj`B  thttps://github.com/prometheus/client_java/raw/d68dac0194735867bd02293043b13fe8c12bc12e/simpleclient_vertx4%2Fpom.xmljbB  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=d68dac0194735867bd02293043b13fe8c12bc12ejdB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(f647a366adb62ba65bba95475d77d5e1e010026c}(sha(f647a366adb62ba65bba95475d77d5e1e010026cnode_idEC_kwDOAHoJt9oAKGY2NDdhMzY2YWRiNjJiYTY1YmJhOTU0NzVkNzdkNWUxZTAxMDAyNmMcommit}(author}(name	wangkaishemailwangkaicloud@163.comdate2023-06-29T02:03:09Zu	committer}(jC  	wangkaishjC  wangkaicloud@163.comjC  2023-06-29T02:17:36Zumessage`Fix "expected label name, got \"BCLOSE\"" error

Signed-off-by: wangkaish <wangkaicloud@163.com>tree}(jC  (07248af47566a2f566303caaae1b3664ddd6f866urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/07248af47566a2f566303caaae1b3664ddd6f866uj D  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f647a366adb62ba65bba95475d77d5e1e010026c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj D  dhttps://api.github.com/repos/prometheus/client_java/commits/f647a366adb62ba65bba95475d77d5e1e010026chtml_urlYhttps://github.com/prometheus/client_java/commit/f647a366adb62ba65bba95475d77d5e1e010026ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f647a366adb62ba65bba95475d77d5e1e010026c/commentsjC  }(login	wangkaishidJa jC  MDQ6VXNlcjE1ODg0NTY1
avatar_url4https://avatars.githubusercontent.com/u/15884565?v=4gravatar_idh3j D  &https://api.github.com/users/wangkaishjD  https://github.com/wangkaish
followers_url0https://api.github.com/users/wangkaish/followers
following_url=https://api.github.com/users/wangkaish/following{/other_user}	gists_url6https://api.github.com/users/wangkaish/gists{/gist_id}starred_url=https://api.github.com/users/wangkaish/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/wangkaish/subscriptionsorganizations_url+https://api.github.com/users/wangkaish/orgs	repos_url,https://api.github.com/users/wangkaish/repos
events_url7https://api.github.com/users/wangkaish/events{/privacy}received_events_url6https://api.github.com/users/wangkaish/received_eventstypeUser
site_adminujC  }(jD  	wangkaishjD  Ja jC  MDQ6VXNlcjE1ODg0NTY1jD  4https://avatars.githubusercontent.com/u/15884565?v=4jD  h3j D  &https://api.github.com/users/wangkaishjD  https://github.com/wangkaishjD  0https://api.github.com/users/wangkaish/followersjD  =https://api.github.com/users/wangkaish/following{/other_user}jD  6https://api.github.com/users/wangkaish/gists{/gist_id}j D  =https://api.github.com/users/wangkaish/starred{/owner}{/repo}j"D  4https://api.github.com/users/wangkaish/subscriptionsj$D  +https://api.github.com/users/wangkaish/orgsj&D  ,https://api.github.com/users/wangkaish/reposj(D  7https://api.github.com/users/wangkaish/events{/privacy}j*D  6https://api.github.com/users/wangkaish/received_eventsj,D  Userj.D  uparents]}(jC  (db2304d042a8f9373504b167efcfbbea13a9e1cdj D  dhttps://api.github.com/repos/prometheus/client_java/commits/db2304d042a8f9373504b167efcfbbea13a9e1cdjD  Yhttps://github.com/prometheus/client_java/commit/db2304d042a8f9373504b167efcfbbea13a9e1cduastats}(totalKb	additionsK2	deletionsK0ufiles]}(jC  (4d09ec4e18b20de062953d162a10412e4a4328a2filenameVsimpleclient_common/src/main/java/io/prometheus/client/exporter/common/TextFormat.javastatusmodifiedjHD  K2jID  K0changesKbblob_urlhttps://github.com/prometheus/client_java/blob/f647a366adb62ba65bba95475d77d5e1e010026c/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javaraw_urlhttps://github.com/prometheus/client_java/raw/f647a366adb62ba65bba95475d77d5e1e010026c/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.java?ref=f647a366adb62ba65bba95475d77d5e1e010026cpatchX"  @@ -1,11 +1,11 @@
 package io.prometheus.client.exporter.common;
 
 import java.io.IOException;
-import java.io.StringWriter;
 import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -22,7 +22,8 @@ public class TextFormat {
    *
    * @since 0.10.0
    */
-  public final static String CONTENT_TYPE_OPENMETRICS_100 = "application/openmetrics-text; version=1.0.0; charset=utf-8";
+  public final static String CONTENT_TYPE_OPENMETRICS_100 =
+          "application/openmetrics-text; version=1.0.0; charset=utf-8";
 
   /**
    * Return the content type that should be used for a given Accept HTTP header.
@@ -48,14 +49,15 @@ public static String chooseContentType(String acceptHeader) {
    *
    * @since 0.10.0
    */
-  public static void writeFormat(String contentType, Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
+  public static void writeFormat(
+          String contentType, Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
     if (CONTENT_TYPE_004.equals(contentType)) {
-        write004(writer, mfs);
-        return;
+      write004(writer, mfs);
+      return;
     }
     if (CONTENT_TYPE_OPENMETRICS_100.equals(contentType)) {
-        writeOpenMetrics100(writer, mfs);
-        return;
+      writeOpenMetrics100(writer, mfs);
+      return;
     }
     throw new IllegalArgumentException("Unknown contentType " + contentType);
   }
@@ -67,7 +69,7 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
     Map<String, Collector.MetricFamilySamples> omFamilies = new TreeMap<String, Collector.MetricFamilySamples>();
     /* See http://prometheus.io/docs/instrumenting/exposition_formats/
      * for the output format specification. */
-    while(mfs.hasMoreElements()) {
+    while (mfs.hasMoreElements()) {
       Collector.MetricFamilySamples metricFamilySamples = mfs.nextElement();
       String name = metricFamilySamples.name;
       writer.write("# HELP ");
@@ -97,33 +99,23 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
       String createdName = name + "_created";
       String gcountName = name + "_gcount";
       String gsumName = name + "_gsum";
-      for (Collector.MetricFamilySamples.Sample sample: metricFamilySamples.samples) {
+      for (Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples) {
         /* OpenMetrics specific sample, put in a gauge at the end. */
         if (sample.name.equals(createdName)
-            || sample.name.equals(gcountName)
-            || sample.name.equals(gsumName)) {
+                || sample.name.equals(gcountName)
+                || sample.name.equals(gsumName)) {
           Collector.MetricFamilySamples omFamily = omFamilies.get(sample.name);
           if (omFamily == null) {
-            omFamily = new Collector.MetricFamilySamples(sample.name, Collector.Type.GAUGE, metricFamilySamples.help, new ArrayList<Collector.MetricFamilySamples.Sample>());
+            omFamily = new Collector.MetricFamilySamples(sample.name,
+                    Collector.Type.GAUGE, metricFamilySamples.help,
+                    new ArrayList<Collector.MetricFamilySamples.Sample>());
             omFamilies.put(sample.name, omFamily);
           }
           omFamily.samples.add(sample);
           continue;
         }
-        writer.write(sample.name);
-        if (sample.labelNames.size() > 0) {
-          writer.write('{');
-          for (int i = 0; i < sample.labelNames.size(); ++i) {
-            writer.write(sample.labelNames.get(i));
-            writer.write("=\"");
-            writeEscapedLabelValue(writer, sample.labelValues.get(i));
-            writer.write("\",");
-          }
-          writer.write('}');
-        }
-        writer.write(' ');
-        writer.write(Collector.doubleToGoString(sample.value));
-        if (sample.timestampMs != null){
+        appendSamples(writer, sample);
+        if (sample.timestampMs != null) {
           writer.write(' ');
           writer.write(sample.timestampMs.toString());
         }
@@ -136,6 +128,30 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
     }
   }
 
+  private static void appendSamples(Writer writer, Collector.MetricFamilySamples.Sample sample) throws IOException {
+    writer.write(sample.name);
+    List<String> labelNames = sample.labelNames;
+    List<String> labelValues = sample.labelValues;
+    int sampleSize = labelNames.size();
+    if (sampleSize > 0) {
+      writer.write('{');
+      writer.write(labelNames.get(0));
+      writer.write("=\"");
+      writeEscapedLabelValue(writer, labelValues.get(0));
+      writer.write("\"");
+      for (int i = 1; i < sampleSize; ++i) {
+        writer.write(",");
+        writer.write(labelNames.get(i));
+        writer.write("=\"");
+        writeEscapedLabelValue(writer, labelValues.get(i));
+        writer.write("\"");
+      }
+      writer.write('}');
+    }
+    writer.write(' ');
+    writer.write(Collector.doubleToGoString(sample.value));
+  }
+
   private static void writeEscapedHelp(Writer writer, String s) throws IOException {
     for (int i = 0; i < s.length(); i++) {
       char c = s.charAt(i);
@@ -197,8 +213,9 @@ private static String typeString(Collector.Type t) {
    *
    * @since 0.10.0
    */
-  public static void writeOpenMetrics100(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
-    while(mfs.hasMoreElements()) {
+  public static void writeOpenMetrics100(
+          Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
+    while (mfs.hasMoreElements()) {
       Collector.MetricFamilySamples metricFamilySamples = mfs.nextElement();
       String name = metricFamilySamples.name;
 
@@ -221,31 +238,16 @@ public static void writeOpenMetrics100(Writer writer, Enumeration<Collector.Metr
       writer.write(' ');
       writeEscapedLabelValue(writer, metricFamilySamples.help);
       writer.write('\n');
- 
-      for (Collector.MetricFamilySamples.Sample sample: metricFamilySamples.samples) {
-        writer.write(sample.name);
-        if (sample.labelNames.size() > 0) {
-          writer.write('{');
-          for (int i = 0; i < sample.labelNames.size(); ++i) {
-            if (i > 0) {
-              writer.write(",");
-            }
-            writer.write(sample.labelNames.get(i));
-            writer.write("=\"");
-            writeEscapedLabelValue(writer, sample.labelValues.get(i));
-            writer.write("\"");
-          }
-          writer.write('}');
-        }
-        writer.write(' ');
-        writer.write(Collector.doubleToGoString(sample.value));
-        if (sample.timestampMs != null){
+
+      for (Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples) {
+        appendSamples(writer, sample);
+        if (sample.timestampMs != null) {
           writer.write(' ');
           omWriteTimestamp(writer, sample.timestampMs);
         }
         if (sample.exemplar != null) {
           writer.write(" # {");
-          for (int i=0; i<sample.exemplar.getNumberOfLabels(); i++) {
+          for (int i = 0; i < sample.exemplar.getNumberOfLabels(); i++) {
             if (i > 0) {
               writer.write(",");
             }uau(e2b404b325e02687e147103df65e20ffccd46601}(sha(e2b404b325e02687e147103df65e20ffccd46601node_idEC_kwDOAHoJt9oAKGUyYjQwNGIzMjVlMDI2ODdlMTQ3MTAzZGY2NWUyMGZmY2NkNDY2MDEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:28:36Zu	committer}(jeD  Fabian StäberjgD  fabian@fstab.dejiD  2023-08-26T21:28:36ZumessageFix mermaid flowcharttree}(j]D  (588f623d472e73dfb362faef46d828bc1aca9a8furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/588f623d472e73dfb362faef46d828bc1aca9a8fujuD  hhttps://api.github.com/repos/prometheus/client_java/git/commits/e2b404b325e02687e147103df65e20ffccd46601
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujuD  dhttps://api.github.com/repos/prometheus/client_java/commits/e2b404b325e02687e147103df65e20ffccd46601html_urlYhttps://github.com/prometheus/client_java/commit/e2b404b325e02687e147103df65e20ffccd46601comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/e2b404b325e02687e147103df65e20ffccd46601/commentsjcD  }(loginfstabidJ' j_D  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3juD  "https://api.github.com/users/fstabjD  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url7      9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujkD  }(jD  fstabjD  J' j_D  MDQ6VXNlcjMzMDUzNQ==jD  2https://avatars.githubusercontent.com/u/330535?v=4jD  h3juD  "https://api.github.com/users/fstabjD  https://github.com/fstabjD  ,https://api.github.com/users/fstab/followersjD  9https://api.github.com/users/fstab/following{/other_user}jD  2https://api.github.com/users/fstab/gists{/gist_id}jD  9https://api.github.com/users/fstab/starred{/owner}{/repo}jD  0https://api.github.com/users/fstab/subscriptionsjD  'https://api.github.com/users/fstab/orgsjD  (https://api.github.com/users/fstab/reposjD  3https://api.github.com/users/fstab/events{/privacy}jD  2https://api.github.com/users/fstab/received_eventsjD  UserjD  uparents]}(j]D  (99adbce95541940b7ba06b1744367e34a533ee56juD  dhttps://api.github.com/repos/prometheus/client_java/commits/99adbce95541940b7ba06b1744367e34a533ee56jD  Yhttps://github.com/prometheus/client_java/commit/99adbce95541940b7ba06b1744367e34a533ee56uastats}(totalK	additionsK	deletionsKufiles]}(j]D  (30bcafcdc0ebed7ab904bb392a8c5838975aed8afilename(examples/example-opentelemetry/README.mdstatusmodifiedjD  KjD  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/e2b404b325e02687e147103df65e20ffccd46601/examples%2Fexample-opentelemetry%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/e2b404b325e02687e147103df65e20ffccd46601/examples%2Fexample-opentelemetry%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=e2b404b325e02687e147103df65e20ffccd46601patchX  @@ -19,8 +19,8 @@ docker-compose up
 This will set up the following scenario
 
 ```mermaid
-flowchart LR
-   example app -- OTLP --> OpenTelemetry collector -- Prometheus remote write --> Prometheus Server
+flowchart LR;
+   example app -- OTLP --> OpenTelemetry collector -- Prometheus remote write --> Prometheus Server;
 ```
 
 The OpenTelemetry collector is configured to log incoming metrics to the console.uau(f1540850ebd7bf3dd38e00a7880d015ce8211bf5}(sha(f1540850ebd7bf3dd38e00a7880d015ce8211bf5node_idEC_kwDOAHoJt9oAKGYxNTQwODUwZWJkN2JmM2RkMzhlMDBhNzg4MGQwMTVjZTgyMTFiZjUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-20T16:29:45Zu	committer}(jD  Fabian StäberjD  fabian@fstab.dejD  2023-06-20T16:29:45ZumessageAllow Long Counterstree}(jD  (2f28799947631963848638cf2a7cde8fbfd5727curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/2f28799947631963848638cf2a7cde8fbfd5727cujD  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f1540850ebd7bf3dd38e00a7880d015ce8211bf5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujD  dhttps://api.github.com/repos/prometheus/client_java/commits/f1540850ebd7bf3dd38e00a7880d015ce8211bf5html_urlYhttps://github.com/prometheus/client_java/commit/f1540850ebd7bf3dd38e00a7880d015ce8211bf5comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/commentsjD  }(loginfstabidJ' jD  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jD  "https://api.github.com/users/fstabjD  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujD  }(jD  fstabjD  J' jD  MDQ6VXNlcjMzMDUzNQ==jD  2https://avatars.githubusercontent.com/u/330535?v=4jE  h3jD  "https://api.github.com/users/fstabjD  https://github.com/fstabjE  ,https://api.github.com/users/fstab/followersjE  9https://api.github.com/users/fstab/following{/other_user}jE  2https://api.github.com/users/fstab/gists{/gist_id}j
E  9https://api.github.com/users/fstab/starred{/owner}{/repo}jE  0https://api.github.com/users/fstab/subscriptionsjE  'https://api.github.com/users/fstab/orgsjE  (https://api.github.com/users/fstab/reposjE  3https://api.github.com/users/fstab/events{/privacy}jE  2https://api.github.com/users/fstab/received_eventsjE  UserjE  uparents]}(jD  (7bb2d38c044744cd453e4d448ced60e85c1dab70jD  dhttps://api.github.com/repos/prometheus/client_java/commits/7bb2d38c044744cd453e4d448ced60e85c1dab70jD  Yhttps://github.com/prometheus/client_java/commit/7bb2d38c044744cd453e4d448ced60e85c1dab70uastats}(totalMR	additionsMC	deletionsKufiles](}(jD  (42611b8a6e05c3095803de6e84737dac8b81f66ffilename_prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javastatusmodifiedj2E  K j3E  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaraw_urlhttps://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5patchXo  @@ -63,9 +63,7 @@ public void reset() {
     }
 
     public void observe(double value) {
-        System.nanoTime();
         if (!acceptingNewExemplars.get()) {
-            // This is the hot path. This should be as efficient as possible.
             return;
         }
         rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));u}(jD  (6aaacd5635318023e0197370b4c1898fe6fbb064j8E  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj:E  modifiedj2E  Kj3E  Kj<E  K"j=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajAE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X  @@ -14,6 +14,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
 public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver, Collector {
@@ -88,14 +89,26 @@ private static String normalizeName(String name) {
 
     class CounterData extends MetricData<DiscreteEventObserver> implements DiscreteEventObserver {
 
-        private final DoubleAdder value = new DoubleAdder();
+        private final DoubleAdder doubleValue = new DoubleAdder();
+        // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
+        // and DoubleAdder for double observations. If the user doesn't observe any double at all,
+        // we will just use the LongAdder and get the best performance.
+        private final LongAdder longValue = new LongAdder();
         private final long createdTimeMillis = System.currentTimeMillis();
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
         private CounterData(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
+        @Override
+        public void inc(long amount) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(amount);
+            }
+        }
+
         @Override
         public void inc(double amount) {
             validateAndAdd(amount);
@@ -104,6 +117,14 @@ public void inc(double amount) {
             }
         }
 
+        @Override
+        public void incWithExemplar(long amount, Labels labels) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(amount, labels);
+            }
+        }
+
         @Override
         public void incWithExemplar(double amount, Labels labels) {
             validateAndAdd(amount);
@@ -112,11 +133,18 @@ public void incWithExemplar(double amount, Labels labels) {
             }
         }
 
+        private void validateAndAdd(long amount) {
+            if (amount < 0) {
+                throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
+            }
+            longValue.add(amount);
+        }
+
         private void validateAndAdd(double amount) {
             if (amount < 0) {
                 throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
             }
-            value.add(amount);
+            doubleValue.add(amount);
         }
 
         private CounterSnapshot.CounterData collect(Labels labels) {
@@ -132,7 +160,7 @@ private CounterSnapshot.CounterData collect(Labels labels) {
                     }
                 }
             }
-            return new CounterSnapshot.CounterData(value.sum(), labels, oldest, createdTimeMillis);
+            return new CounterSnapshot.CounterData(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
         }
 
         @Overrideu}(jD  (b060e2bf1f33ebe25086f7506d8dfcae572f24fcj8E  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj:E  modifiedj2E  K
j3E  Kj<E  Kj=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajAE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X  @@ -1,21 +1,24 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.Label;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public abstract class Metric {
+public abstract class Metric implements Collector {
 
     protected final Labels constLabels;
 
     protected Metric(Builder<?, ?> builder) {
         this.constLabels = builder.constLabels;
     }
 
+    @Override
     public abstract MetricSnapshot collect();
 
     protected static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
@@ -45,6 +48,12 @@ public B withConstLabels(Labels constLabels) {
             return self();
         }
 
+        public M register() {
+            M metric = build();
+            PrometheusRegistry.defaultRegistry.register(metric);
+            return metric;
+        }
+
         public abstract M build();
 
         /*u}(jD  (b54d542b12cf086f85c067988a9852dc025be2e3j8E  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/ObservingMetric.javaj:E  modifiedj2E  Kj3E  Kj<E  K	j=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajAE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X7  @@ -59,7 +59,11 @@ public MetricSnapshot collect() {
 
     public O withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException("The " + getClass().getSimpleName() + " was created with label names, so you must call withLabelValues() when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            }
         }
         return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData()).toObserver();
     }
@@ -107,6 +111,7 @@ protected <T> T getConfigProperty(MetricProperties[] properties, Function<Metric
         }
         throw new IllegalStateException("Missing default config. This is a bug in the Prometheus metrics core library.");
     }
+
     protected abstract boolean isExemplarsEnabled();
 
     /*
@@ -125,7 +130,7 @@ protected boolean hasSpanContextSupplier() {
     }
      */
 
-    static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?,?>> extends MetricWithFixedMetadata.Builder<B, M> {
+    static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;
 u}(jD  (1550cbd142d983efbdaa817d370321674cb14045j8E  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DiscreteEventObserver.javaj:E  modifiedj2E  Kj3E  Kj<E  Kj=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javajAE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X   @@ -5,11 +5,17 @@
 public interface DiscreteEventObserver extends Observer {
 
     default void inc() {
-        inc(1.0);
+        inc(1L);
     }
     default void incWithExemplar(Labels labels) {
         incWithExemplar(1.0, labels);
     }
     void inc(double amount);
+    default void inc(long amount) {
+        inc((double) amount);
+    }
     void incWithExemplar(double amount, Labels labels);
+    default void incWithExemplar(long amount, Labels labels) {
+        inc((double) amount);
+    }
 }u}(jD  (e2c90d1bfdae2fc5c7ccf42e372f6a64eb5829bcj8E  tmp_example/pom.xmlj:E  modifiedj2E  K-j3E  K j<E  K-j=E  mhttps://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fpom.xmlj?E  lhttps://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fpom.xmljAE  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X  @@ -13,7 +13,42 @@
 
     <name>Example for Manual Testing</name>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>io.opentelemetry</groupId>
+                <artifactId>opentelemetry-bom</artifactId>
+                <version>1.27.0</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
     <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-testing</artifactId>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+        </dependency>
+        -->
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>1.27.0-alpha</version>
+        </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-core</artifactId>
@@ -24,6 +59,16 @@
             <artifactId>prometheus-metrics-exposition-formats</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-core</artifactId>
+            <version>1.36</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openjdk.jmh</groupId>
+            <artifactId>jmh-generator-annprocess</artifactId>
+            <version>1.36</version>
+        </dependency>
     </dependencies>
 
     <build>u}(jD  (704f941ae64fca42672f9b04734a7298d8690dc7j8E  :tmp_example/src/main/java/com/example/BenchmarkRunner.javaj:E  addedj2E  Kj3E  K j<E  Kj=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javajAE  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  X[  @@ -0,0 +1,216 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleCounter;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.LongCounter;
+import io.opentelemetry.api.metrics.LongHistogram;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
+import io.opentelemetry.context.propagation.ContextPropagators;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.observer.DiscreteEventObserver;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+@State(Scope.Benchmark)
+public class BenchmarkRunner {
+
+    public static void main(String[] args) throws Exception {
+       org.openjdk.jmh.Main.main(args);
+        /*
+        BenchmarkRunner r = new BenchmarkRunner();
+        r.setUp();
+        for (int i=0; i<100*100*100*10; i++) {
+            //r.benchmarkOtelCounter();
+            //r.benchmarkPrometheusCounter();
+            r.benchmarkOtelHistogram();
+        }
+
+         */
+    }
+
+    private DiscreteEventObserver goodCases;
+    private DiscreteEventObserver errorCases;
+
+    private Attributes goodCaseAttr;
+    private Attributes errorCaseAttr;
+    //private LongCounter otelCounter;
+    private LongCounter otelCounter;
+
+    private DoubleAdder doubleAdder;
+    private LongAdder longAdder;
+
+    private Histogram histogram;
+    DoubleHistogram otelHist;
+
+    private AtomicBoolean atomicBoolean = new AtomicBoolean();
+    @Setup
+    public void setUp() {
+        Counter counter = Counter.newBuilder()
+                .withLabelNames("path", "status")
+                .withName("events_total")
+                //.withoutExemplars()
+                .register();
+        goodCases = counter.withLabelValues("/get", "200");
+        errorCases = counter.withLabelValues("/get", "500");
+
+        histogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+
+        // -------- otel, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        /*
+        SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
+                .addSpanProcessor(BatchSpanProcessor.builder(OtlpGrpcSpanExporter.builder().build()).build())
+                .setResource(resource)
+                .build();
+         */
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("lksd")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram())
+                                .build()
+                        )
+                .build();
+
+        /*
+        SdkLoggerProvider sdkLoggerProvider = SdkLoggerProvider.builder()
+                .addLogRecordProcessor(BatchLogRecordProcessor.builder(OtlpGrpcLogRecordExporter.builder().build()).build())
+                .setResource(resource)
+                .build();
+         */
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                //.setTracerProvider(sdkTracerProvider)
+                .setMeterProvider(sdkMeterProvider)
+                //.setLoggerProvider(sdkLoggerProvider)
+                .setPropagators(ContextPropagators.create(W3CTraceContextPropagator.getInstance()))
+                .buildAndRegisterGlobal();
+
+        Meter meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+
+        otelCounter = meter
+                .counterBuilder("processed_jobs")
+                //.ofDoubles()
+                .setDescription("Processed jobs")
+                .setUnit("1")
+                .build();
+
+        if (!"base2_exponential_bucket_histogram".equals(System.getenv("OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION"))) {
+            throw new RuntimeException("export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=base2_exponential_bucket_histogram");
+        }
+        otelHist = meter.histogramBuilder("lksd")
+                //.ofLongs()
+                .build();
+
+        goodCaseAttr = Attributes.builder().put("path", "/get").put("status", "200").build();
+        errorCaseAttr = Attributes.builder().put("path", "/get").put("status", "500").build();
+
+        doubleAdder = new DoubleAdder();
+        longAdder = new LongAdder();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public boolean benchmarkAtomicBoolean() {
+        return atomicBoolean.get();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public long benchmarkNanoTime() {
+        return System.nanoTime();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public long benchmarkCurrentTimeMillis() {
+        return System.currentTimeMillis();
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkDoubleAdder() {
+        doubleAdder.add(1.0);
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkLongAdder() {
+        longAdder.add(1);
+    }
+
+    @Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkPrometheusHistogram() {
+        Random random = new Random(0);
+        for (int i = 100; i > 0; i--) {
+            double d = Math.abs(random.nextGaussian());
+            histogram.observe(d);
+        }
+    }
+
+    @Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkOtelHistogram() {
+        Random random = new Random(0);
+        for (int i = 100; i > 0; i--) {
+            double d = Math.abs(random.nextGaussian());
+            otelHist.record(d);
+        }
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkPrometheusCounter() {
+        for (int i = 100; i > 0; i--) {
+            if (i % 8 == 0) {
+                errorCases.inc();
+            } else {
+                goodCases.inc();
+            }
+        }
+    }
+
+    //@Benchmark
+    @Fork(value = 1, warmups = 1)
+    public void benchmarkOtelCounter() {
+        for (int i = 100; i > 0; i--) {
+            if (i % 8 == 0) {
+                otelCounter.add(1, errorCaseAttr);
+            } else {
+                otelCounter.add(1, goodCaseAttr);
+            }
+        }
+    }
+}u}(jD  (7b4d1ef40ef6f063699aff5e9385199576434031j8E  /tmp_example/src/main/java/com/example/Main.javaj:E  modifiedj2E  Kj3E  Kj<E  K
j=E  https://github.com/prometheus/client_java/blob/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javaj?E  https://github.com/prometheus/client_java/raw/f1540850ebd7bf3dd38e00a7880d015ce8211bf5/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javajAE  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.java?ref=f1540850ebd7bf3dd38e00a7880d015ce8211bf5jCE  Xg  @@ -11,12 +11,13 @@ public class Main {
 
     public static void main(String[] args) throws IOException {
         Counter counter = Counter.newBuilder()
-                .withLabelNames("path")
+                .withLabelNames("path", "status")
                 .withName("events_total")
-                .build();
-        DiscreteEventObserver goodCase = counter.withLabelValues("/get");
-        PrometheusRegistry.defaultRegistry.register(counter);
-        counter.inc(1.0);
-        HTTPServer server = HTTPServer.newBuilder().withPort(9000).build();
+                .register();
+        DiscreteEventObserver goodCase = counter.withLabelValues("/get", "200");
+        DiscreteEventObserver errorCase = counter.withLabelValues("/get", "500");
+        goodCase.inc();
+        errorCase.inc();
+        HTTPServer.newBuilder().withPort(9000).build();
     }
 }ueu(f9a42e604e59385dd7e44554fae6663663c404bf}(sha(f9a42e604e59385dd7e44554fae6663663c404bfnode_idEC_kwDOAHoJt9oAKGY5YTQyZTYwNGU1OTM4NWRkN2U0NDU1NGZhZTY2NjM2NjNjNDA0YmYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-30T21:14:39Zu	committer}(jE  Fabian StäberjE  fabian@fstab.dejE  2023-08-30T21:14:39Zumessage5Prevent unnecessary collect() calls during register()tree}(jE  (78d9794f9e0c0e0f716a375d2bf9fad539176f42urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/78d9794f9e0c0e0f716a375d2bf9fad539176f42ujE  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f9a42e604e59385dd7e44554fae6663663c404bf
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujE  dhttps://api.github.com/repos/prometheus/client_java/commits/f9a42e604e59385dd7e44554fae6663663c404bfhtml_urlYhttps://github.com/prometheus/client_java/commit/f9a42e604e59385dd7e44554fae6663663c404bfcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f9a42e604e59385dd7e44554fae6663663c404bf/commentsjE  }(loginfstabidJ' jE  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jE  "https://api.github.com/users/fstabjE  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujE  }(jE  fstabjE  J' jE  MDQ6VXNlcjMzMDUzNQ==jE  2https://avatars.githubusercontent.com/u/330535?v=4jE  h3jE  "https://api.github.com/users/fstabjE  https://github.com/fstabjE  ,https://api.github.com/users/fstab/followersjE  9https://api.github.com/users/fstab/following{/other_user}jE  2https://api.github.com/users/fstab/gists{/gist_id}jE  9https://api.github.com/users/fstab/starred{/owner}{/repo}jE  0https://api.github.com/users/fstab/subscriptionsjE  'https://api.github.com/users/fstab/orgsjE  (https://api.github.com/users/fstab/reposjE  3https://api.github.com/users/fstab/events{/privacy}jE  2https://api.github.com/users/fstab/received_eventsjE  UserjE  uparents]}(jE  (b94922fad2a31d4fa2b04cccdf1666b7e5c2731fjE  dhttps://api.github.com/repos/prometheus/client_java/commits/b94922fad2a31d4fa2b04cccdf1666b7e5c2731fjE  Yhttps://github.com/prometheus/client_java/commit/b94922fad2a31d4fa2b04cccdf1666b7e5c2731fuastats}(totalK	additionsK	deletionsKufiles](}(jE  (57ed0c05be424ad330d75fed70aa4efba894ddc3filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedjE  KjE  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=f9a42e604e59385dd7e44554fae6663663c404bfpatchX  @@ -33,7 +33,7 @@
  * requestCount.withLabelValues("/hello-world", "500").inc();
  * }</pre>
  */
-public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;u}(jE  (7a36498613c1699b70d5c7b05bddb4e98c2b2a10jE  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajE  modifiedjE  KjE  K jE  KjE  https://github.com/prometheus/client_java/blob/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajE  https://github.com/prometheus/client_java/raw/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=f9a42e604e59385dd7e44554fae6663663c404bfjE  Xy  @@ -41,6 +41,11 @@ private String makeName(String name, Unit unit) {
         return name;
     }
 
+    @Override
+    public String getPrometheusName() {
+        return metadata.getPrometheusName();
+    }
+
     public static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
 
         protected String name;u}(jE  (fd0b01e2ae40c15fc255052c1f82afda6365406djE  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javajE  modifiedjE  KjE  KjE  KjE  https://github.com/prometheus/client_java/blob/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajE  https://github.com/prometheus/client_java/raw/f9a42e604e59385dd7e44554fae6663663c404bf/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajE  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=f9a42e604e59385dd7e44554fae6663663c404bfjE  X`  @@ -139,13 +139,24 @@ public static Labels of(String[] names, String[] values) {
      * Dots are treated as underscores, so {@code contains("my.label")} and {@code contains("my_label")} are the same.
      */
     public boolean contains(String labelName) {
+        return get(labelName) != null;
+    }
+
+    /**
+     * Get the label value for a given label name.
+     * <p>
+     * Returns {@code null} if the {@code labelName} is not found.
+     * <p>
+     * Dots are treated as underscores, so {@code get("my.label")} and {@code get("my_label")} are the same.
+     */
+    public String get(String labelName) {
         labelName = prometheusName(labelName);
-        for (String name : prometheusNames) {
-            if (name.equals(labelName)) {
-                return true;
+        for (int i=0; i<prometheusNames.length; i++) {
+            if (prometheusNames[i].equals(labelName)) {
+                return values[i];
             }
         }
-        return false;
+        return null;
     }
 
     private static void sortAndValidate(String[] names, String[] prometheusNames, String[] values) {ueu(cac64c323a8111d96b82f3dec2f7a0cfff2215c3}(sha(cac64c323a8111d96b82f3dec2f7a0cfff2215c3node_idEC_kwDOAHoJt9oAKGNhYzY0YzMyM2E4MTExZDk2YjgyZjNkZWMyZjdhMGNmZmYyMjE1YzMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T12:11:07Zu	committer}(jF  Fabian StäberjF  fabian@fstab.dejF  2023-06-29T12:32:57ZumessageRenamingtree}(jF  (b413c2038dc926a49f04f851a04b945430996948urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/b413c2038dc926a49f04f851a04b945430996948ujF  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cac64c323a8111d96b82f3dec2f7a0cfff2215c3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujF  dhttps://api.github.com/repos/prometheus/client_java/commits/cac64c323a8111d96b82f3dec2f7a0cfff2215c3html_urlYhttps://github.com/prometheus/client_java/commit/cac64c323a8111d96b82f3dec2f7a0cfff2215c3comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/commentsj
F  }(loginfstabidJ' jF  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jF  "https://api.github.com/users/fstabj(F  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujF  }(j-F  fstabj/F  J' jF  MDQ6VXNlcjMzMDUzNQ==j1F  2https://avatars.githubusercontent.com/u/330535?v=4j3F  h3jF  "https://api.github.com/users/fstabj(F  https://github.com/fstabj6F  ,https://api.github.com/users/fstab/followersj8F  9https://api.github.com/users/fstab/following{/other_user}j:F  2https://api.github.com/users/fstab/gists{/gist_id}j<F  9https://api.github.com/users/fstab/starred{/owner}{/repo}j>F  0https://api.github.com/users/fstab/subscriptionsj@F  'https://api.github.com/users/fstab/orgsjBF  (https://api.github.com/users/fstab/reposjDF  3https://api.github.com/users/fstab/events{/privacy}jFF  2https://api.github.com/users/fstab/received_eventsjHF  UserjJF  uparents]}(jF  (95a92120e52148f3fa2cacc0ac9fccb45f8e7193jF  dhttps://api.github.com/repos/prometheus/client_java/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193j(F  Yhttps://github.com/prometheus/client_java/commit/95a92120e52148f3fa2cacc0ac9fccb45f8e7193uastats}(totalM	additionsMu	deletionsMufiles](}(jF  (060b52bce5adae651f1243512856cbbc5a491026filenameTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javastatusmodifiedjdF  KjeF  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaraw_urlhttps://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3patchX1  @@ -1,14 +1,14 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Supplier;
 
-class Buffer<T extends MetricData> {
+class Buffer {
 
     private static final long signBit = 1L << 63;
     private final AtomicLong observationCount = new AtomicLong(0);
@@ -41,11 +41,11 @@ private void doAppend(double amount) {
     /**
      * Must be called by the runnable in the run() method.
      */
-    public void reset() {
+    void reset() {
         reset = true;
     }
 
-    T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
+    <T extends DataPointSnapshot> T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
         double[] buffer;
         int bufferSize;
         T result;u}(jF  (ec3ae9a06f689fb52226febe54c2d29682d2155cjjF  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -17,7 +17,7 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
-public class Counter extends StatefulMetric<CounterDataPoint, Counter.CounterData> implements CounterDataPoint, Collector {
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -60,17 +60,17 @@ public void incWithExemplar(double amount, Labels labels) {
 
 
     @Override
-    protected CounterData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new CounterData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new CounterData(null);
+            return new DataPoint(null);
         }
     }
 
     @Override
-    protected CounterSnapshot collect(List<Labels> labels, List<CounterData> metricData) {
-        List<CounterSnapshot.CounterData> data = new ArrayList<>(labels.size());
+    protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<CounterSnapshot.CounterDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -97,7 +97,7 @@ private static String normalizeName(String name) {
         return name;
     }
 
-    class CounterData implements CounterDataPoint {
+    class DataPoint implements CounterDataPoint {
 
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
@@ -107,7 +107,7 @@ class CounterData implements CounterDataPoint {
         private final long createdTimeMillis = System.currentTimeMillis();
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private CounterData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -157,7 +157,7 @@ private void validateAndAdd(double amount) {
             doubleValue.add(amount);
         }
 
-        private CounterSnapshot.CounterData collect(Labels labels) {
+        private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -170,7 +170,7 @@ private CounterSnapshot.CounterData collect(Labels labels) {
                     }
                 }
             }
-            return new CounterSnapshot.CounterData(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
         }
     }
 
@@ -208,7 +208,7 @@ private FromCallback(Counter.FromCallback.Builder builder) {
 
         @Override
         public CounterSnapshot collect() {
-            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterData(
+            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterDataPointSnapshot(
                     callback.getAsDouble(),
                     constLabels,
                     null,u}(jF  (b45c4bfe601c6ee4d70bfa213c74ffb2d6c3f74djjF  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajlF  modifiedjdF  K
jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X
  @@ -15,7 +15,7 @@
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.DoubleSupplier;
 
-public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.GaugeData> implements GaugeDataPoint {
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -57,20 +57,20 @@ public GaugeSnapshot collect() {
     }
 
     @Override
-    protected GaugeSnapshot collect(List<Labels> labels, List<GaugeData> metricData) {
-        List<GaugeSnapshot.GaugeData> data = new ArrayList<>(labels.size());
+    protected GaugeSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPointSnapshots = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(metricData.get(i).collect(labels.get(i)));
+            dataPointSnapshots.add(metricData.get(i).collect(labels.get(i)));
         }
-        return new GaugeSnapshot(getMetadata(), data);
+        return new GaugeSnapshot(getMetadata(), dataPointSnapshots);
     }
 
     @Override
-    protected GaugeData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new GaugeData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new GaugeData(null);
+            return new DataPoint(null);
         }
     }
 
@@ -79,11 +79,11 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    class GaugeData implements GaugeDataPoint {
+    class DataPoint implements GaugeDataPoint {
 
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private GaugeData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -121,7 +121,7 @@ public void setWithExemplar(double value, Labels labels) {
             }
         }
 
-        private GaugeSnapshot.GaugeData collect(Labels labels) {
+        private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -134,7 +134,7 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
                     }
                 }
             }
-            return new GaugeSnapshot.GaugeData(Double.longBitsToDouble(value.get()), labels, oldest);
+            return new GaugeSnapshot.GaugeDataPointSnapshot(Double.longBitsToDouble(value.get()), labels, oldest);
         }
     }
 
@@ -167,7 +167,7 @@ private FromCallback(Gauge.FromCallback.Builder builder) {
         @Override
         public GaugeSnapshot collect() {
             return new GaugeSnapshot(getMetadata(), Collections.singletonList(
-                    new GaugeSnapshot.GaugeData(callback.getAsDouble(), constLabels, null)
+                    new GaugeSnapshot.GaugeDataPointSnapshot(callback.getAsDouble(), constLabels, null)
             ));
         }
 u}(jF  (c3cf0d21de6adf5cabdc5eb427654aa871888e85jjF  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X}  @@ -40,7 +40,7 @@
  * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
  * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
  */
-public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.HistogramData> implements DistributionDataPoint {
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.DataPoint> implements DistributionDataPoint {
 
     // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
     private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
@@ -139,7 +139,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    public class HistogramData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
         private final LongAdder[] classicBuckets;
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
@@ -149,11 +149,11 @@ public class HistogramData implements DistributionDataPoint {
         private volatile int nativeSchema = nativeInitialSchema; // integer in [-4, 8] or CLASSIC_HISTOGRAM
         private volatile double nativeZeroThreshold = Histogram.this.nativeMinZeroThreshold;
         private volatile long createdTimeMillis = System.currentTimeMillis();
-        private final Buffer<HistogramSnapshot.HistogramData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
         private volatile boolean resetDurationExpired = false;
         private final ExemplarSampler exemplarSampler;
 
-        private HistogramData() {
+        private DataPoint() {
             if (exemplarsEnabled) {
                 exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
             } else {
@@ -225,14 +225,14 @@ private void doObserve(double value, boolean fromBuffer) {
             }
         }
 
-        public HistogramSnapshot.HistogramData collect(Labels labels) {
+        public HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
             Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     () -> {
                         if (classicUpperBounds.length == 0) {
                             // native only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     nativeSchema,
                                     nativeZeroCount.sum(),
                                     nativeZeroThreshold,
@@ -244,15 +244,15 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
                                     createdTimeMillis);
                         } else if (Histogram.this.nativeInitialSchema == CLASSIC_HISTOGRAM) {
                             // classic only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     sum.sum(),
                                     labels,
                                     exemplars,
                                     createdTimeMillis);
                         } else {
                             // hybrid: classic and native
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     nativeSchema,
                                     nativeZeroCount.sum(),
@@ -567,8 +567,8 @@ public HistogramSnapshot collect() {
     }
 
     @Override
-    protected HistogramSnapshot collect(List<Labels> labels, List<HistogramData> metricData) {
-        List<HistogramSnapshot.HistogramData> data = new ArrayList<>(labels.size());
+    protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<HistogramSnapshot.HistogramDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -587,8 +587,8 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
     @Override
-    protected HistogramData newMetricData() {
-        return new HistogramData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     static {u}(jF  (42269340f42744e413e4b1cc4d7869adea1c348djjF  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -30,7 +30,7 @@ public void info(Labels labels) {
 
     @Override
     public InfoSnapshot collect() {
-        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoData(labels.merge(constLabels))));
+        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoDataPointSnapshot(labels.merge(constLabels))));
     }
 
     public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {u}(jF  (467f8860b93cb348c452380a8446ae64bf756673jjF  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -12,7 +12,7 @@
 import java.util.stream.Stream;
 
 // experimental
-public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.StateSetData> implements StateSetDataPoint {
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
 
     private final boolean exemplarsEnabled;
     private final String[] names;
@@ -35,17 +35,17 @@ public StateSetSnapshot collect() {
     }
 
     @Override
-    protected StateSetSnapshot collect(List<Labels> labels, List<StateSetData> metricDataList) {
-        List<StateSetSnapshot.StateSetData> data = new ArrayList<>(labels.size());
+    protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
+        List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(new StateSetSnapshot.StateSetData(names, metricDataList.get(i).values, labels.get(i)));
+            data.add(new StateSetSnapshot.StateSetDataPointSnapshot(names, metricDataList.get(i).values, labels.get(i)));
         }
         return new StateSetSnapshot(getMetadata(), data);
     }
 
     @Override
-    protected StateSetData newMetricData() {
-        return new StateSetData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -63,11 +63,11 @@ public void setFalse(String state) {
         getNoLabels().setFalse(state);
     }
 
-    class StateSetData implements StateSetDataPoint {
+    class DataPoint implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
-        private StateSetData() {
+        private DataPoint() {
         }
 
         @Overrideu}(jF  (5d4998fe80bdc45c53ab29f8797a4b0ca891aee1jjF  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajlF  modifiedjdF  KjeF  KjnF  K&joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X>  @@ -27,19 +27,19 @@
  * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
  * but this has nothing to do with multi-threading.
  */
-abstract class StatefulMetric<O extends DataPoint, V extends O> extends MetricWithFixedMetadata {
+abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
     /**
      * Map from variableLabelValues to MetricData.
      */
-    private final ConcurrentHashMap<List<String>, V> data = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
 
     /**
      * Shortcut to data.get(Collections.emptyList())
      */
-    private volatile V noLabels;
+    private volatile T noLabels;
 
     protected StatefulMetric(Builder<?, ?> builder) {
         super(builder);
@@ -51,45 +51,45 @@ protected StatefulMetric(Builder<?, ?> builder) {
     /**
      * labels and metricData have the same size. labels.get(i) are the labels for metricData.get(i).
      */
-    protected abstract MetricSnapshot collect(List<Labels> labels, List<V> metricData);
+    protected abstract MetricSnapshot collect(List<Labels> labels, List<T> metricData);
 
     public MetricSnapshot collect() {
         if (labelNames.length == 0 && data.size() == 0) {
             // This is a metric without labels that has not been used yet. Initialize the data on the fly.
             withLabelValues();
         }
         List<Labels> labels = new ArrayList<>(data.size());
-        List<V> metricData = new ArrayList<>(data.size());
-        for (Map.Entry<List<String>, V> entry : data.entrySet()) {
+        List<T> metricData = new ArrayList<>(data.size());
+        for (Map.Entry<List<String>, T> entry : data.entrySet()) {
             String[] variableLabelValues = entry.getKey().toArray(new String[labelNames.length]);
             labels.add(constLabels.merge(labelNames, variableLabelValues));
             metricData.add(entry.getValue());
         }
         return collect(labels, metricData);
     }
 
-    public O withLabelValues(String... labelValues) {
+    public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
                 throw new IllegalArgumentException("The " + getClass().getSimpleName() + " was created with label names, so you must call withLabelValues() when using it.");
             } else {
                 throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }
         }
-        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData());
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
     // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }
 
-    protected abstract V newMetricData();
+    protected abstract T newDataPoint();
 
-    protected V getNoLabels() {
+    protected T getNoLabels() {
         if (noLabels == null) {
             // Note that this will throw an IllegalArgumentException if labelNames is not empty.
-            noLabels = (V) withLabelValues();
+            noLabels = (T) withLabelValues();
         }
         return noLabels;
     }
@@ -125,22 +125,6 @@ protected <T> T getConfigProperty(MetricProperties[] properties, Function<Metric
 
     protected abstract boolean isExemplarsEnabled();
 
-    /*
-    protected boolean isExemplarsEnabled() {
-        if (exemplarsEnabled != null) {
-            return exemplarsEnabled;
-        } else {
-            return DefaultExemplarConfig.isEnabledByDefault();
-        }
-    }
-     */
-
-    /*
-    protected boolean hasSpanContextSupplier() {
-        return exemplarConfig != null ? exemplarConfig.hasSpanContextSupplier() : DefaultExemplarConfig.hasSpanContextSupplier();
-    }
-     */
-
     static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;u}(jF  (2cb1440283be44ed998b037a81ebbe25fb149f6ejjF  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaO      jlF  modifiedjdF  K
jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -16,7 +16,7 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
-public class Summary extends StatefulMetric<DistributionDataPoint, Summary.SummaryData> implements DistributionDataPoint {
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
 
     private final boolean exemplarsEnabled;
     private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
@@ -55,17 +55,17 @@ public SummarySnapshot collect() {
     }
 
     @Override
-    protected SummarySnapshot collect(List<Labels> labels, List<SummaryData> metricData) {
-        List<SummarySnapshot.SummaryData> data = new ArrayList<>(labels.size());
+    protected SummarySnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<SummarySnapshot.SummaryDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
         return new SummarySnapshot(getMetadata(), data);
     }
 
     @Override
-    protected SummaryData newMetricData() {
-        return new SummaryData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -79,16 +79,16 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
 
-    public class SummaryData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
         private final TimeWindowQuantiles quantileValues;
-        private final Buffer<SummarySnapshot.SummaryData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
 
         private final long createdTimeMillis = System.currentTimeMillis();
 
-        private SummaryData() {
+        private DataPoint() {
             if (quantiles.size() > 0) {
                 quantileValues = new TimeWindowQuantiles(quantiles.toArray(new CKMSQuantiles.Quantile[]{}), maxAgeSeconds, ageBuckets);
             } else {
@@ -119,11 +119,11 @@ private void doObserve(double amount) {
             count.increment();
         }
 
-        public SummarySnapshot.SummaryData collect(Labels labels) {
+        public SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     // TODO Exemplars (are hard-coded as empty in the line below)
-                    () -> new SummarySnapshot.SummaryData(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
+                    () -> new SummarySnapshot.SummaryDataPointSnapshot(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
                     this::doObserve
             );
         }u}(jF  (0efa6ee4a3d203aa207aa48ea48c63f7416c9a43jjF  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  Xg  @@ -54,7 +54,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private CounterSnapshot.CounterData getData(Counter counter, String... labels) {
+    private CounterSnapshot.CounterDataPointSnapshot getData(Counter counter, String... labels) {
         return counter.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()
@@ -140,9 +140,9 @@ public void testSnapshotComplete() {
         Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
         Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
         Assert.assertEquals(2, snapshot.getData().size());
-        Iterator<CounterSnapshot.CounterData> iter = snapshot.getData().iterator();
+        Iterator<CounterSnapshot.CounterDataPointSnapshot> iter = snapshot.getData().iterator();
         // data is ordered by labels, so 200 comes before 500
-        CounterSnapshot.CounterData data = iter.next();
+        CounterSnapshot.CounterDataPointSnapshot data = iter.next();
         Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
         Assert.assertEquals(2, data.getValue(), 0.0001);
         Assert.assertTrue(data.getCreatedTimestampMillis() >= before);u}(jF  (63f94f5ae8dc66dac36dbd97e8f9213b1d08c233jjF  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -36,7 +36,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private GaugeSnapshot.GaugeData getData(Gauge gauge, String... labels) {
+    private GaugeSnapshot.GaugeDataPointSnapshot getData(Gauge gauge, String... labels) {
         return ((GaugeSnapshot) gauge.collect()).getData().stream()
                 .filter(data -> data.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jF  (3e7892b5e3207a9c34d49ad012a6b01901c3f44djjF  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -77,7 +77,7 @@ private void run() throws NoSuchFieldException, IllegalAccessException {
             System.out.println("Running " + name + "...");
             for (double observation : observations) {
                 if (observation == RESET_DURATION_REACHED) {
-                    Field resetAllowed = Histogram.HistogramData.class.getDeclaredField("resetDurationExpired");
+                    Field resetAllowed = Histogram.DataPoint.class.getDeclaredField("resetDurationExpired");
                     resetAllowed.setAccessible(true);
                     resetAllowed.set(histogram.getNoLabels(), true);
                 } else {
@@ -619,14 +619,14 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
         double[] expectedUpperBounds = new double[]{0.25, 1, 4, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.5, 1, 2, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.8408964152537144, 1, 1.189207115002721, Double.MAX_VALUE, Double.POSITIVE_INFINITY};
-        Method method = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method method = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         method.setAccessible(true);
         for (int i = 0; i < indexes.length; i++) {
             Histogram histogram = Histogram.newBuilder()
                     .withName("test")
                     .withNativeInitialSchema(schemas[i])
                     .build();
-            Histogram.HistogramData histogramData = histogram.newMetricData();
+            Histogram.DataPoint histogramData = histogram.newDataPoint();
             double result = (double) method.invoke(histogramData, schemas[i], indexes[i]);
             Assert.assertEquals("index=" + indexes[i] + ", schema=" + schemas[i], expectedUpperBounds[i], result, 0.0000000000001);
         }
@@ -638,8 +638,8 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
     @Test
     public void testFindBucketIndex() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
         Random rand = new Random();
-        Method findBucketIndex = Histogram.HistogramData.class.getDeclaredMethod("findBucketIndex", double.class);
-        Method nativeBucketIndexToUpperBound = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method findBucketIndex = Histogram.DataPoint.class.getDeclaredMethod("findBucketIndex", double.class);
+        Method nativeBucketIndexToUpperBound = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         findBucketIndex.setAccessible(true);
         nativeBucketIndexToUpperBound.setAccessible(true);
         for (int schema = -4; schema <= 8; schema++) {
@@ -849,7 +849,7 @@ public void markCurrentSpanAsExemplar() {
     }
 
     private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... labels) {
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("Labels not found"));
@@ -907,7 +907,7 @@ private void assertExemplar(Histogram histogram, double value, String... labels)
         double lowerBound = Double.NEGATIVE_INFINITY;
         double upperBound = Double.POSITIVE_INFINITY;
         HistogramSnapshot snapshot = histogram.collect();
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().isEmpty())
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("No data without labels found"));
@@ -1217,8 +1217,8 @@ public void testObserveWithLabels() {
         histogram.withLabelValues("/hello", "200").observe(0.11);
         histogram.withLabelValues("/hello", "200").observe(0.2);
         histogram.withLabelValues("/hello", "500").observe(0.19);
-        HistogramSnapshot.HistogramData data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
-        HistogramSnapshot.HistogramData data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        HistogramSnapshot.HistogramDataPointSnapshot data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        HistogramSnapshot.HistogramDataPointSnapshot data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
         assertEquals(2, data200.getCount());
         assertEquals(0.31, data200.getSum(), 0.0000001);
         assertEquals(1, data500.getCount());
@@ -1265,7 +1265,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
             long count = 0;
             for (HistogramSnapshot snapshot : snapshots) {
                 Assert.assertEquals(1, snapshot.getData().size());
-                HistogramSnapshot.HistogramData data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
+                HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
                 Assert.assertTrue(data.getCount() >= (count + 1000)); // 1000 own observations plus the ones from other threads
                 count = data.getCount();
             }
@@ -1280,7 +1280,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
     }
 
 
-    private HistogramSnapshot.HistogramData getData(Histogram histogram, String... labels) {
+    private HistogramSnapshot.HistogramDataPointSnapshot getData(Histogram histogram, String... labels) {
         return histogram.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jF  (13fb887127d0488299efae10bce027c7f7b1822djjF  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X(  @@ -14,7 +14,7 @@ public void testIncrement() {
         InfoSnapshot snapshot = info.collect();
         Assert.assertEquals("target", snapshot.getMetadata().getName());
         Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoData data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
+        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
         Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
     }
 }u}(jF  (1babd430cd9fc54a09561e9adcfb9db80c452152jjF  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -61,7 +61,7 @@ public void testDefaultFalse() {
         Assert.assertFalse(getData(stateSet).isTrue(2));
     }
 
-    private StateSetSnapshot.StateSetData getData(StateSet stateSet, String... labels) {
+    private StateSetSnapshot.StateSetDataPointSnapshot getData(StateSet stateSet, String... labels) {
         return stateSet.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jF  (6cd75ddccc2da47e94051e4f413e7651a46ef63djjF  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.DistributionData;
+import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -86,7 +86,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
-        for (CounterSnapshot.CounterData data : snapshot.getData()) {
+        for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -97,7 +97,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -115,8 +115,8 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramData> dataList) throws IOException {
-        for (HistogramSnapshot.HistogramData data : dataList) {
+    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramDataPointSnapshot> dataList) throws IOException {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : dataList) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             Exemplars exemplars = data.getExemplars();
             long cumulativeCount = 0;
@@ -142,7 +142,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -156,7 +156,7 @@ private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDat
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -188,7 +188,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
@@ -198,7 +198,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "stateset", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -231,14 +231,14 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
         }
     }
 
-    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionData data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
+    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
             writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
@@ -261,7 +261,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
         }
     }
 
-    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, MetricData data) throws IOException {
+    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
             writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
@@ -289,7 +289,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
         writer.write(' ');
     }
 
-    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, MetricData data, Exemplar exemplar) throws IOException {
+    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPointSnapshot data, Exemplar exemplar) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(jF  (e1b566ee48ced2a7363e76a1a78022c27ce84226jjF  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajlF  modifiedjdF  KjeF  KjnF  K"joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X!  @@ -3,13 +3,13 @@
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -61,43 +61,43 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         Metrics.MetricFamily.Builder builder = Metrics.MetricFamily.newBuilder();
         if (snapshot instanceof CounterSnapshot) {
-            for (CounterData data : ((CounterSnapshot) snapshot).getData()) {
+            for (CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_total", Metrics.MetricType.COUNTER);
         } else if (snapshot instanceof GaugeSnapshot) {
-            for (GaugeSnapshot.GaugeData data : ((GaugeSnapshot) snapshot).getData()) {
+            for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof HistogramSnapshot) {
             HistogramSnapshot histogram = (HistogramSnapshot) snapshot;
-            for (HistogramSnapshot.HistogramData data : histogram.getData()) {
+            for (HistogramSnapshot.HistogramDataPointSnapshot data : histogram.getData()) {
                 builder.addMetric(convert(data));
             }
             Metrics.MetricType type = histogram.isGaugeHistogram() ? Metrics.MetricType.GAUGE_HISTOGRAM : Metrics.MetricType.HISTOGRAM;
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, type);
         } else if (snapshot instanceof SummarySnapshot) {
-            for (SummarySnapshot.SummaryData data : ((SummarySnapshot) snapshot).getData()) {
+            for (SummarySnapshot.SummaryDataPointSnapshot data : ((SummarySnapshot) snapshot).getData()) {
                 if (data.hasCount() || data.hasSum() || data.getQuantiles().size() > 0) {
                     builder.addMetric(convert(data));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.SUMMARY);
         } else if (snapshot instanceof InfoSnapshot) {
-            for (InfoSnapshot.InfoData data : ((InfoSnapshot) snapshot).getData()) {
+            for (InfoSnapshot.InfoDataPointSnapshot data : ((InfoSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_info", Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof StateSetSnapshot) {
-            for (StateSetSnapshot.StateSetData data : ((StateSetSnapshot) snapshot).getData()) {
+            for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
                     builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof UnknownSnapshot) {
-            for (UnknownSnapshot.UnknownData data : ((UnknownSnapshot) snapshot).getData()) {
+            for (UnknownSnapshot.UnknownDataPointSnapshot data : ((UnknownSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.UNTYPED);
@@ -120,7 +120,7 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
         builder.setType(type);
     }
 
-    private Metrics.Metric.Builder convert(CounterData data) {
+    private Metrics.Metric.Builder convert(CounterDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Counter.Builder counterBuilder = Metrics.Counter.newBuilder();
         counterBuilder.setValue(data.getValue());
@@ -133,7 +133,7 @@ private Metrics.Metric.Builder convert(CounterData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
+    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(data.getValue());
@@ -143,7 +143,7 @@ private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramData data) {
+    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
         if (data.hasClassicHistogramData()) {
@@ -232,7 +232,7 @@ private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistog
         }
     }
 
-    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
+    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Summary.Builder summaryBuilder = Metrics.Summary.newBuilder();
         if (data.hasCount()) {
@@ -254,7 +254,7 @@ private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
+    private Metrics.Metric.Builder convert(InfoSnapshot.InfoDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(1);
@@ -264,7 +264,7 @@ private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, String name, int i) {
+    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetDataPointSnapshot data, String name, int i) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         addLabels(metricBuilder, data.getLabels());
@@ -282,7 +282,7 @@ private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, Strin
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownData data) {
+    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Untyped.Builder untypedBuilder = Metrics.Untyped.newBuilder();
         untypedBuilder.setValue(data.getValue());
@@ -319,7 +319,7 @@ private Metrics.Exemplar.Builder convert(Exemplar exemplar) {
         return builder;
     }
 
-    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, MetricData data) {
+    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, DataPointSnapshot data) {
         if (data.hasScrapeTimestamp()) {
             metricBuilder.setTimestampMs(data.getScrapeTimestampMillis());
         }u}(jF  (d80b90f630755080dfc7ec6015ea67252fa1e4c7jjF  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajlF  modifiedjdF  K
jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -6,7 +6,7 @@
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -96,7 +96,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) throws IOException {
             boolean metadataWritten = false;
             MetricMetadata metadata = snapshot.getMetadata();
-            for (MetricData data : snapshot.getData()) {
+            for (DataPointSnapshot data : snapshot.getData()) {
                 if (data.hasCreatedTimestamp()) {
                     if (!metadataWritten) {
                         writeMetadata(writer, "_created", "gauge", metadata);
@@ -114,7 +114,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         if (snapshot.getData().size() > 0) {
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
-            for (CounterSnapshot.CounterData data : snapshot.getData()) {
+            for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
                 writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
@@ -125,7 +125,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -135,7 +135,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
     private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "histogram", metadata);
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
@@ -162,7 +162,7 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -177,7 +177,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
         // Prometheus text format does not support gaugehistogram's _gcount and _gsum.
         // So we append _gcount and _gsum as gauge metrics.
         boolean metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasCount()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gcount", "gauge", metadata);
@@ -189,7 +189,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
             }
         }
         metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasSum()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gsum", "gauge", metadata);
@@ -205,7 +205,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -234,7 +234,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
@@ -244,7 +244,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -277,7 +277,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -337,7 +337,7 @@ private void writeEscapedHelp(Writer writer, String s) throws IOException {
         }
     }
 
-    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, MetricData data) throws IOException {
+    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, DataPointSnapshot data) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(jF  (13001720a04a50212f9bd53d10fdfd6ff399fff7jjF  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajlF  modifiedjdF  K(jeF  K(jnF  KPjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X*N  @@ -3,12 +3,12 @@
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
@@ -18,10 +18,10 @@
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryData;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
-import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownData;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -133,7 +133,7 @@ public void testCounterComplete() throws IOException {
                 .withName("service_time_seconds")
                 .withHelp("total time spent serving")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.8)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -143,7 +143,7 @@ public void testCounterComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.9)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -174,7 +174,7 @@ public void testCounterMinimal() throws IOException {
                 "name: \"my_counter_total\" type: COUNTER metric { counter { value: 1.1 } }";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_counter")
-                .addCounterData(CounterData.newBuilder().withValue(1.1).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.1).build())
                 .build();
         assertOpenMetricsText(openMetricsText, counter);
         assertPrometheusText(prometheusText, counter);
@@ -216,15 +216,15 @@ public void testGaugeComplete() throws IOException {
                 .withName("disk_usage_ratio")
                 .withHelp("percentage used")
                 .withUnit(new Unit("ratio"))
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda2")
                                 .build())
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda1")
@@ -253,7 +253,7 @@ public void testGaugeMinimal() throws IOException {
                 "name: \"temperature_centigrade\" type: GAUGE metric { gauge { value: 22.3 } }";
         GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
                 .withName("temperature_centigrade")
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -359,7 +359,7 @@ public void testSummaryComplete() throws IOException {
                 .withName("http_request_duration_seconds")
                 .withHelp("request duration")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(7)
                         .withSum(2.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -374,7 +374,7 @@ public void testSummaryComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -427,7 +427,7 @@ public void testSummaryWithoutQuantiles() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .build())
@@ -460,7 +460,7 @@ public void testSummaryNoCountAndSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withQuantiles(Quantiles.newBuilder().addQuantile(0.95, 200.0).build())
                         .build())
                 .build();
@@ -492,7 +492,7 @@ public void testSummaryJustCount() throws IOException {
         //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(1)
                         .build())
                 .build();
@@ -524,7 +524,7 @@ public void testSummaryJustSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withSum(12.3)
                         .build())
                 .build();
@@ -543,7 +543,7 @@ public void testSummaryEmptyData() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder().build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder().build())
                 .build();
         assertOpenMetricsText("# EOF\n", summary);
         assertPrometheusText("", summary);
@@ -577,15 +577,15 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v1"))
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v2"))
                         .withCount(2)
                         .withSum(10.7)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v3"))
                         .build())
                 .build();
@@ -702,7 +702,7 @@ public void testClassicHistogramComplete() throws Exception {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(0.0, 3)
@@ -714,7 +714,7 @@ public void testClassicHistogramComplete() throws Exception {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.1)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.2, 2)
@@ -761,7 +761,7 @@ public void testClassicHistogramMinimal() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
                                 .build())
@@ -804,7 +804,7 @@ public void testClassicHistogramCountAndSum() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
@@ -926,7 +926,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                 .withName("cache_size_bytes")
                 .withHelp("number of bytes in the cache")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(17)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 3)
@@ -937,7 +937,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(18)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 4)
@@ -987,7 +987,7 @@ public void testClassicGaugeHistogramMinimal() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
                                 .build())
@@ -1033,7 +1033,7 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(27000)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
@@ -1155,7 +1155,7 @@ public void testNativeHistogramComplete() throws IOException {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withNativeSchema(5)
                         .withNativeZeroCount(1)
@@ -1189,7 +1189,7 @@ public void testNativeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.2)
                         .withNativeSchema(5)
                         .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
@@ -1233,7 +1233,7 @@ public void testNativeHistogramMinimal() throws IOException {
                 //@formatter:on
         HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
@@ -1258,7 +1258,7 @@ public void testInfo() throws IOException {
         InfoSnapshot info = InfoSnapshot.newBuilder()
                 .withName("version")
                 .withHelp("version information")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("version", "1.2.3"))
                         .build())
                 .build();
@@ -1288,13 +1288,13 @@ public void testStateSetComplete() throws IOException {
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
                 .withHelp("complete state set example")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "prod"))
                         .addState("state1", false)
                         .addState("state2", true)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "dev"))
                         .addState("state2", false)
                         .addState("state1", true)
@@ -1320,7 +1320,7 @@ public void testStateSetMinimal() throws IOException {
                 "state{state=\"bb\"} 0\n";
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("a", true)
                         .addState("bb", false)
                         .build())
@@ -1349,13 +1349,13 @@ public void testUnknownComplete() throws IOException {
                 .withName("my_special_thing_bytes")
                 .withHelp("help message")
                 .withUnit(Unit.BYTES)
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.of("env", "prod"))
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.of("env", "dev"))
                         .withExemplar(exemplar1)
@@ -1379,7 +1379,7 @@ public void testUnknownMinimal() throws IOException {
                 "other 22.3\n";
         UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
                 .withName("other")
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -1403,7 +1403,7 @@ public void testHelpEscape() throws IOException {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
                 .withHelp("Some text and \n some \" escaping") // example from https://openMetrics.io
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         assertOpenMetricsText(openMetrics, counter);
         assertPrometheusText(prometheus, counter);
@@ -1422,7 +1422,7 @@ public void testLabelValueEscape() throws IOException {
                 "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         // example from https://openMetrics.io
                         .withLabels(Labels.of("a", "x", "b", "escaping\" example \n "))
                         .withValue(1.0)u}(jF  (e994e951357da20776fd49fd0f3f5decf502c078jjF  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3      juF  X2  @@ -17,23 +17,23 @@ public class CounterSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public CounterSnapshot(MetricMetadata metadata, Collection<CounterData> data) {
+    public CounterSnapshot(MetricMetadata metadata, Collection<CounterDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<CounterData> getData() {
-        return (List<CounterData>) data;
+    public List<CounterDataPointSnapshot> getData() {
+        return (List<CounterDataPointSnapshot>) data;
     }
 
-    public static class CounterData extends MetricData {
+    public static class CounterDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link CounterData}, you can either call the constructor directly or use the
-         * Builder with {@link CounterData#newBuilder()}.
+         * To create a new {@link CounterDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link CounterDataPointSnapshot#newBuilder()}.
          *
          * @param value                  the counter value. Must not be negative.
          * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
@@ -42,7 +42,7 @@ public static class CounterData extends MetricData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
             this(value, labels, exemplar, createdTimestampMillis, 0);
         }
 
@@ -51,7 +51,7 @@ public CounterData(double value, Labels labels, Exemplar exemplar, long createdT
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(labels, createdTimestampMillis, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -75,7 +75,7 @@ protected void validate() {
             }
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -102,11 +102,11 @@ public Builder withCreatedTimestampMillis(long createdTimestampMillis) {
                 return this;
             }
 
-            public CounterData build() {
+            public CounterDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new CounterData(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
+                return new CounterDataPointSnapshot(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
             }
 
             @Override
@@ -122,18 +122,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<CounterData> counterData = new ArrayList<>();
+        private final List<CounterDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addCounterData(CounterData data) {
-            counterData.add(data);
+        public Builder addDataPoint(CounterDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public CounterSnapshot build() {
-            return new CounterSnapshot(buildMetadata(), counterData);
+            return new CounterSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (b4241e2e4263f7038abcb79d763ca090f48176cfjjF  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DataPointSnapshot.javajlF  renamedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-public abstract class MetricData {
+public abstract class DataPointSnapshot {
     private final Labels labels;
     private final long createdTimestampMillis;
     private final long scrapeTimestampMillis;
 
-    protected MetricData(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         this.labels = labels;
         this.createdTimestampMillis = createdTimestampMillis;
         this.scrapeTimestampMillis = scrapeTimestampMillis;previous_filename\prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricData.javau}(jF  (d31427bf4d508fcd7610640ec4cb234d423d9f10jjF  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javajlF  renamedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  Xi  @@ -5,15 +5,15 @@
  * Histograms and Summaries represent distributions, like a latency distribution or a distribution
  * of request sizes in Bytes.
  */
-public abstract class DistributionData extends MetricData {
+abstract class DistributionDataPointSnapshot extends DataPointSnapshot {
     private final long count; // optional, negative value means no count.
     private final double sum; // optional, Double.NaN means no sum.
     private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.
 
     /**
      * See JavaDoc of the child classes.
      */
-    protected DistributionData(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         super(labels, createdTimestampMillis, scrapeTimestampMillis);
         this.count = count;
         this.sum = sum;
@@ -58,7 +58,7 @@ public Exemplars getExemplars() {
         return exemplars;
     }
 
-    public static abstract class Builder<T extends Builder<T>> extends MetricData.Builder<T> {
+    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {
 
         protected long count = -1;
         protected double sum = Double.NaN;jG  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionData.javau}(jF  (54c033d3446b3a08aba32e148fbe212295210a05jjF  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -16,29 +16,29 @@ public final class GaugeSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeData> data) {
+    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<GaugeData> getData() {
-        return (List<GaugeData>) data;
+    public List<GaugeDataPointSnapshot> getData() {
+        return (List<GaugeDataPointSnapshot>) data;
     }
 
-    public static final class GaugeData extends MetricData {
+    public static final class GaugeDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link GaugeData}, you can either call the constructor directly or use the
-         * Builder with {@link GaugeData#newBuilder()}.
+         * To create a new {@link GaugeDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link GaugeDataPointSnapshot#newBuilder()}.
          *
          * @param value    the gauge value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, labels, exemplar, 0);
         }
 
@@ -47,7 +47,7 @@ public GaugeData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -64,7 +64,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -88,11 +88,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public GaugeData build() {
+            public GaugeDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new GaugeData(value, labels, exemplar, scrapeTimestampMillis);
+                return new GaugeDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -108,18 +108,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<GaugeData> gaugeData = new ArrayList<>();
+        private final List<GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addGaugeData(GaugeData data) {
-            gaugeData.add(data);
+        public Builder addDataPoint(GaugeDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public GaugeSnapshot build() {
-            return new GaugeSnapshot(buildMetadata(), gaugeData);
+            return new GaugeSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (860b291c7fb65b8bb730cd4b8af049df89ab350djjF  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javajlF  modifiedjdF  KjeF  KjnF  K&joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -19,7 +19,7 @@ public final class HistogramSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         this(false, metadata, data);
     }
 
@@ -29,7 +29,7 @@ public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data
      * are semantically gauges and not counters.
      * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
      */
-    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         super(metadata, data);
         this.gaugeHistogram = isGaugeHistogram;
     }
@@ -39,11 +39,11 @@ public boolean isGaugeHistogram() {
     }
 
     @Override
-    public List<HistogramData> getData() {
-        return (List<HistogramData>) data;
+    public List<HistogramDataPointSnapshot> getData() {
+        return (List<HistogramDataPointSnapshot>) data;
     }
 
-    public static final class HistogramData extends DistributionData {
+    public static final class HistogramDataPointSnapshot extends DistributionDataPointSnapshot {
 
         // There are two types of histograms: Classic histograms and native histograms.
         // Classic histograms have a fixed set of buckets.
@@ -68,7 +68,7 @@ public static final class HistogramData extends DistributionData {
         /**
          * Constructor for classic histograms (as opposed to native histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets         required. Must not be empty. Must at least contain the +Inf bucket.
@@ -79,7 +79,7 @@ public static final class HistogramData extends DistributionData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 double sum,
                 Labels labels,
@@ -91,7 +91,7 @@ public HistogramData(
         /**
          * Constructor for native histograms (as opposed to classic histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
@@ -108,7 +108,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 int nativeSchema,
                 long nativeZeroCount,
                 double nativeZeroThreshold,
@@ -124,7 +124,7 @@ public HistogramData(
         /**
          * Constructor for a histogram with both, classic and native data.
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets                 required. Must not be empty. Must at least contain the +Inf bucket.
@@ -142,7 +142,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -161,7 +161,7 @@ public HistogramData(
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -298,7 +298,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private ClassicHistogramBuckets classicHistogramBuckets = ClassicHistogramBuckets.EMPTY;
             private int nativeSchema = CLASSIC_HISTOGRAM;
@@ -345,11 +345,11 @@ public Builder withNativeBucketsForNegativeValues(NativeHistogramBuckets buckets
                 return this;
             }
 
-            public HistogramData build() {
+            public HistogramDataPointSnapshot build() {
                 if (nativeSchema == CLASSIC_HISTOGRAM && classicHistogramBuckets.isEmpty()) {
                     throw new IllegalArgumentException("One of nativeSchema and classicHistogramBuckets is required.");
                 }
-                return new HistogramData(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+                return new HistogramDataPointSnapshot(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -360,14 +360,14 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<HistogramData> histogramData = new ArrayList<>();
+        private final List<HistogramDataPointSnapshot> dataPoints = new ArrayList<>();
         private boolean isGaugeHistogram = false;
 
         private Builder() {
         }
 
-        public Builder addData(HistogramData data) {
-            histogramData.add(data);
+        public Builder addDataPoint(HistogramDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -382,7 +382,7 @@ public Builder asGaugeHistogram() {
         }
 
         public HistogramSnapshot build() {
-            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), histogramData);
+            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (b49e0d1218825153dfc81322aded933ad9b73ce4jjF  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  Xk
  @@ -18,7 +18,7 @@ public final class InfoSnapshot extends MetricSnapshot {
      *                 The metadata must not have a unit.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
+    public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
         if (metadata.getName().endsWith("_info")) {
             throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
@@ -29,19 +29,19 @@ public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
     }
 
     @Override
-    public List<InfoData> getData() {
-        return (List<InfoData>) data;
+    public List<InfoDataPointSnapshot> getData() {
+        return (List<InfoDataPointSnapshot>) data;
     }
 
-    public static class InfoData extends MetricData {
+    public static class InfoDataPointSnapshot extends DataPointSnapshot {
 
         /**
-         * To create a new {@link InfoData}, you can either call the constructor directly or use the
-         * Builder with {@link InfoData#newBuilder()}.
+         * To create a new {@link InfoDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link InfoDataPointSnapshot#newBuilder()}.
          *
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public InfoData(Labels labels) {
+        public InfoDataPointSnapshot(Labels labels) {
             this(labels, 0L);
         }
 
@@ -50,14 +50,14 @@ public InfoData(Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public InfoData(Labels labels, long scrapeTimestampMillis) {
+        public InfoDataPointSnapshot(Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
-            public InfoData build() {
-                return new InfoData(labels, scrapeTimestampMillis);
+            public InfoDataPointSnapshot build() {
+                return new InfoDataPointSnapshot(labels, scrapeTimestampMillis);
             }
 
             @Override
@@ -73,13 +73,13 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<InfoData> infoData = new ArrayList<>();
+        private final List<InfoDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addInfoData(InfoData data) {
-            infoData.add(data);
+        public Builder addDataPoint(InfoDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -89,7 +89,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public InfoSnapshot build() {
-            return new InfoSnapshot(buildMetadata(), infoData);
+            return new InfoSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (5108c3bd041c3dd2d07541d5b3946adc2f06876djjF  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -13,19 +13,19 @@
 public abstract class MetricSnapshot {
 
     private final MetricMetadata metadata;
-    protected final List<? extends MetricData> data;
+    protected final List<? extends DataPointSnapshot> data;
 
-    protected MetricSnapshot(MetricMetadata metadata, MetricData... data) {
+    protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
         this(metadata, Arrays.asList(data));
     }
 
-    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends MetricData> data) {
+    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
         this.metadata = metadata;
         if (data == null) {
             throw new NullPointerException();
         }
-        List<? extends MetricData> dataCopy = new ArrayList<>(data);
-        dataCopy.sort(Comparator.comparing(MetricData::getLabels));
+        List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
+        dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);
         validateLabels();
     }
@@ -34,7 +34,7 @@ public MetricMetadata getMetadata() {
         return metadata;
     }
 
-    public abstract List<? extends MetricData> getData();
+    public abstract List<? extends DataPointSnapshot> getData();
 
     protected void validateLabels() {
         // Verify that labels are unique (the same set of names/values must not be used multiple times for the same metric).u}(jF  (6e0890a99df4df0c495911237516bc2a76a7c76ejjF  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -11,7 +11,7 @@
  * Immutable representation of native histogram buckets.
  * <p>
  * The bucket index defines the boundaries of the bucket,
- * depending on the histogram's {@link HistogramSnapshot.HistogramData#getNativeSchema() schema}.
+ * depending on the histogram's {@link HistogramSnapshot.HistogramDataPointSnapshot#getNativeSchema() schema}.
  * <pre>
  *     base = 2^(2^-schema)
  *     lower bound = base^(index - 1)u}(jF  (4cad4ac1111b1e1cc47948d9497463b74f194309jjF  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajlF  modifiedjdF  KjeF  KjnF  K joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -20,7 +20,7 @@ public final class StateSetSnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetData> data) {
+    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetDataPointSnapshot> data) {
         super(metadata, data);
         validate();
     }
@@ -29,34 +29,34 @@ private void validate() {
         if (getMetadata().hasUnit()) {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
-        for (StateSetData entry : getData()) {
+        for (StateSetDataPointSnapshot entry : getData()) {
             if (entry.getLabels().contains(getMetadata().getName())) {
                 throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
             }
         }
     }
 
     @Override
-    public List<StateSetData> getData() {
-        return (List<StateSetData>) data;
+    public List<StateSetDataPointSnapshot> getData() {
+        return (List<StateSetDataPointSnapshot>) data;
     }
 
 
-    public static class StateSetData extends MetricData implements Iterable<State> {
+    public static class StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<State> {
         private final String[] names;
         private final boolean[] values;
 
         /**
-         * To create a new {@link StateSetData}, you can either call the constructor directly or use the
-         * Builder with {@link StateSetData#newBuilder()}.
+         * To create a new {@link StateSetDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link StateSetDataPointSnapshot#newBuilder()}.
          *
          * @param names  state names. Must have at least 1 entry.
          *               The constructor will create a copy of the array.
          * @param values state values. Must have the same length as {@code names}.
          *               The constructor will create a copy of the array.
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels) {
             this(names, values, labels, 0L);
         }
 
@@ -65,7 +65,7 @@ public StateSetData(String[] names, boolean[] values, Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             if (names.length == 0) {
                 throw new IllegalArgumentException("StateSet must have at least one state.");
@@ -142,7 +142,7 @@ private static void swap(int i, int j, String[] names, boolean[] values) {
             values[i] = tmpValue;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private final ArrayList<String> names = new ArrayList<>();
             private final ArrayList<Boolean> values = new ArrayList<>();
@@ -160,12 +160,12 @@ protected Builder self() {
                 return this;
             }
 
-            public StateSetData build() {
+            public StateSetDataPointSnapshot build() {
                 boolean[] valuesArray = new boolean[values.size()];
                 for (int i = 0; i < values.size(); i++) {
                     valuesArray[i] = values.get(i);
                 }
-                return new StateSetData(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
+                return new StateSetDataPointSnapshot(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
             }
         }
 
@@ -194,13 +194,13 @@ public boolean isTrue() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<StateSetData> stateSetData = new ArrayList<>();
+        private final List<StateSetDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addStateSetData(StateSetData data) {
-            stateSetData.add(data);
+        public Builder addDataPoint(StateSetDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -210,7 +210,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public StateSetSnapshot build() {
-            return new StateSetSnapshot(buildMetadata(), stateSetData);
+            return new StateSetSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (cf84162a7b8690e761080f346b559d497479760cjjF  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X<  @@ -16,23 +16,23 @@ public final class SummarySnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryData> data) {
+    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<SummaryData> getData() {
-        return (List<SummaryData>) data;
+    public List<SummaryDataPointSnapshot> getData() {
+        return (List<SummaryDataPointSnapshot>) data;
     }
 
-    public static final class SummaryData extends DistributionData {
+    public static final class SummaryDataPointSnapshot extends DistributionDataPointSnapshot {
 
         private final Quantiles quantiles;
 
 
         /**
-         * To create a new {@link SummaryData}, you can either call the constructor directly
-         * or use the Builder with {@link SummaryData#newBuilder()}.
+         * To create a new {@link SummaryDataPointSnapshot}, you can either call the constructor directly
+         * or use the Builder with {@link SummaryDataPointSnapshot#newBuilder()}.
          *
          * @param count                  total number of observations. Optional, pass -1 if not available.
          * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
@@ -45,7 +45,7 @@ public static final class SummaryData extends DistributionData {
          *                               not the creation of the snapshot.
          *                               The created timestamp optional. Use {@code 0L} if there is no created timestamp.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
             this(count, sum, quantiles, labels, exemplars, createdTimestampMillis, 0);
         }
 
@@ -54,7 +54,7 @@ public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, E
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(count, sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
             this.quantiles = quantiles;
             validate();
@@ -75,7 +75,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private Quantiles quantiles = Quantiles.EMPTY;
 
@@ -98,8 +98,8 @@ public Builder withCount(long count) {
                 return this;
             }
 
-            public SummaryData build() {
-                return new SummaryData(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            public SummaryDataPointSnapshot build() {
+                return new SummaryDataPointSnapshot(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -110,18 +110,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<SummaryData> summaryData = new ArrayList<>();
+        private final List<SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addSummaryData(SummaryData data) {
-            summaryData.add(data);
+        public Builder addDataPoint(SummaryDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public SummarySnapshot build() {
-            return new SummarySnapshot(buildMetadata(), summaryData);
+            return new SummarySnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (34735823be44bc387de912e87d582771794decfajjF  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X8  @@ -17,29 +17,29 @@ public final class UnknownSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownData> data) {
+    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<UnknownData> getData() {
-        return (List<UnknownData>) data;
+    public List<UnknownDataPointSnapshot> getData() {
+        return (List<UnknownDataPointSnapshot>) data;
     }
 
-    public static final class UnknownData extends MetricData {
+    public static final class UnknownDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link UnknownData}, you can either call the constructor directly or use the
-         * Builder with {@link UnknownData#newBuilder()}.
+         * To create a new {@link UnknownDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link UnknownDataPointSnapshot#newBuilder()}.
          *
          * @param value    the value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, Labels.EMPTY, exemplar, 0);
         }
 
@@ -48,7 +48,7 @@ public UnknownData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -65,7 +65,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -89,11 +89,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public UnknownData build() {
+            public UnknownDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new UnknownData(value, labels, exemplar, scrapeTimestampMillis);
+                return new UnknownDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -109,18 +109,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<UnknownData> unknownData = new ArrayList<>();
+        private final List<UnknownDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addUnknownData(UnknownData data) {
-            unknownData.add(data);
+        public Builder addDataPoint(UnknownDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public UnknownSnapshot build() {
-            return new UnknownSnapshot(buildMetadata(), unknownData);
+            return new UnknownSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jF  (4f2b2d75d287ccd7ba8b82c4cae985338a6f55aejjF  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javajlF  modifiedjdF  K
jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -18,7 +18,7 @@ public void testCompleteGoodCase() {
                 .withName("http_server_requests_seconds")
                 .withHelp("total time spent serving requests")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(3.0)
@@ -31,7 +31,7 @@ public void testCompleteGoodCase() {
                                 .build())
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .build()
-                ).addCounterData(CounterData.newBuilder()
+                ).addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(2.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(4.0)
@@ -48,7 +48,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "http_server_requests_seconds", "total time spent serving requests", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        CounterDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("path", "/hello"), data.getLabels());
         Assert.assertEquals(2.0, data.getValue(), 0.0);
         Assert.assertEquals(4.0, data.getExemplar().getValue(), 0.0);
@@ -66,11 +66,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "events", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0);
+        CounterDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(1.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -91,17 +91,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
                 .build();
-        Iterator<CounterSnapshot.CounterData> iterator = snapshot.getData().iterator();
+        Iterator<CounterDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jF  (20a094a236ec5589bc0f928619b559353987a6f0jjF  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("cache_size_bytes")
                 .withHelp("cache size in Bytes")
                 .withUnit(Unit.BYTES)
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(1024.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(1024.0)
@@ -28,7 +28,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addGaugeData(GaugeData.newBuilder()
+                ).addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(128.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(128.0)
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "cache_size_bytes", "cache size in Bytes", "bytes");
         Assert.assertEquals(2, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        GaugeDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("env", "dev"), data.getLabels());
         Assert.assertEquals(128.0, data.getValue(), 0.0);
         Assert.assertEquals(128.0, data.getExemplar().getValue(), 0.0);
@@ -62,11 +62,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("temperature")
-                .addGaugeData(GaugeData.newBuilder().withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withValue(23.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "temperature", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0);
+        GaugeDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(23.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -89,17 +89,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("gauge")
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
                 .build();
-        Iterator<GaugeSnapshot.GaugeData> iterator = snapshot.getData().iterator();
+        Iterator<GaugeDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jF  (9dc21a2358170bab952c996021e109e66e161618jjF  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  K&joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramData;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -25,8 +25,8 @@ public void testGoodCaseComplete() {
                 .withName("request_size_bytes")
                 .withHelp("request sizes in bytes")
                 .withUnit(Unit.BYTES)
-                .addData(
-                        HistogramData.newBuilder()
+                .addDataPoint(
+                        HistogramDataPointSnapshot.newBuilder()
                                 .withSum(27000.0)
                                 .withNativeSchema(5)
                                 .withNativeZeroCount(2)
@@ -54,7 +54,7 @@ public void testGoodCaseComplete() {
                                 .withCreatedTimestampMillis(createdTimestamp)
                                 .withScrapeTimestampMillis(scrapeTimestamp)
                                 .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withCount(3) // TODO how is that not a compile error? This is a protected method!
                                 .withSum(400.2)
                         .withNativeSchema(5)
@@ -77,7 +77,7 @@ public void testGoodCaseComplete() {
         SnapshotTestUtil.assertMetadata(snapshot, "request_size_bytes", "request sizes in bytes", "bytes");
 
         Assert.assertEquals(2, snapshot.getData().size());
-        HistogramData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
+        HistogramDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
         Assert.assertTrue(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertTrue(data.hasCreatedTimestamp());
@@ -166,11 +166,11 @@ public void testEmptyHistogram() {
     public void testMinimalClassicHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("minimal_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertEquals(1, snapshot.getData().get(0).getClassicBuckets().size());
     }
@@ -179,14 +179,14 @@ public void testMinimalClassicHistogram() {
     public void testMinimalNativeHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("hist")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
         Assert.assertEquals("hist", snapshot.getMetadata().getName());
         Assert.assertFalse(snapshot.getMetadata().hasUnit());
         Assert.assertEquals(1, snapshot.getData().size());
-        HistogramSnapshot.HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasCreatedTimestamp());
         Assert.assertFalse(data.hasScrapeTimestamp());
         Assert.assertTrue(data.hasCount());
@@ -200,15 +200,15 @@ public void testMinimalNativeHistogram() {
     public void testClassicCount() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(1.0, 3)
                                 .addBucket(2.0, 2)
                                 .addBucket(Double.POSITIVE_INFINITY, 0)
                                 .build())
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(5, data.getCount());
@@ -217,12 +217,12 @@ public void testClassicCount() {
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyData() {
         // This will fail because one of nativeSchema and classicHistogramBuckets is required
-        HistogramData.newBuilder().build();
+        HistogramDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testEmptyNativeData() {
-        HistogramSnapshot.HistogramData data = HistogramSnapshot.HistogramData.newBuilder()
+        HistogramDataPointSnapshot data = HistogramDataPointSnapshot.newBuilder()
                 .withNativeSchema(5)
                 .build();
         Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
@@ -233,28 +233,28 @@ public void testEmptyNativeData() {
     public void testDataImmutable() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "a"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "b"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{2}))
                         .build())
                 .build();
-        Iterator<HistogramData> iterator = snapshot.getData().iterator();
+        Iterator<HistogramDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyClassicBuckets() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
     @Test
     public void testMinimalNativeData() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
@@ -263,7 +263,7 @@ public void testMinimalClassicData() {
         ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
                 .addBucket(Double.POSITIVE_INFINITY, 0)
                 .build();
-        new HistogramData(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
+        new HistogramDataPointSnapshot(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 }u~      }(jF  (e5b7d55be16907e5898140948d7e2250ad1b6aadjjF  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  K
joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,7 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -14,7 +12,7 @@ public void testCompleteGoodCase() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
                 .withHelp("Target info")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway"))
                         .build())
                 .build();
@@ -34,14 +32,14 @@ public void testEmptyInfo() {
     public void testDataImmutable() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway.v1"))
                         .build())
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9200", "service_name", "gateway.v2"))
                         .build())
                 .build();
-        Iterator<InfoSnapshot.InfoData> iterator = snapshot.getData().iterator();
+        Iterator<InfoSnapshot.InfoDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jF  (492472c9408a101b92e3f33e6a00419c6b8bf62bjjF  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  K
joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -13,15 +9,15 @@ public class MetricSnapshotTest {
     public void testDuplicateLabels() {
         CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/hello", "status", "200"))
                         .withValue(1.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/world", "status", "200"))
                         .withValue(2.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("status", "200", "path", "/hello"))
                         .withValue(3.0)
                         .build())u}(jF  (7066146c46da3afc1ab1efdfd5aac059e3e66682jjF  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javajlF  modifiedjdF  K	jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  Xk  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -21,15 +17,15 @@ public void testEmpty() {
     public void testSort() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Assert.assertEquals(3, snapshots.size());
@@ -47,11 +43,11 @@ public void testDuplicateName() {
         //    and that is the conflict. Therefore, you cannot have a counter named "foo" and a gauge named "foo".
         CounterSnapshot c = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         GaugeSnapshot g = GaugeSnapshot.newBuilder()
                 .withName("my_metric")
-                .addGaugeData(GaugeSnapshot.GaugeData.newBuilder().withValue(1.0).build())
+                .addDataPoint(GaugeSnapshot.GaugeDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         new MetricSnapshots(c, g);
     }
@@ -60,7 +56,7 @@ public void testDuplicateName() {
     public void testBuilder() {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots.Builder builder = MetricSnapshots.newBuilder();
         Assert.assertFalse(builder.containsMetricName("my_metric"));
@@ -72,15 +68,15 @@ public void testBuilder() {
     public void testImmutable() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Iterator<MetricSnapshot> iterator = snapshots.iterator();u}(jF  (6c4fa61d35329e3482e6fcbbf2b06b49a826dc77jjF  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javajlF  modifiedjdF  K
jeF  K
jnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  Xl  @@ -14,14 +14,14 @@ public void testCompleteGoodCase() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_feature_flags")
                 .withHelp("Feature Flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .addState("feature1", true)
                         .addState("feature2", false)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature1", false)
                         .addState("feature2", false)
@@ -30,7 +30,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_feature_flags", "Feature Flags", null);
         Assert.assertEquals(2, snapshot.getData().size());
-        StateSetSnapshot.StateSetData data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
+        StateSetSnapshot.StateSetDataPointSnapshot data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
         Assert.assertEquals(Labels.of("entity", "controller"), data.getLabels());
         Assert.assertEquals(2, data.size());
         Assert.assertEquals("feature1", data.getName(0));
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
 
     @Test
     public void testStateSetDataSorted() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("b", true)
                 .addState("d", false)
                 .addState("c", true)
@@ -64,14 +64,14 @@ public void testStateSetDataSorted() {
     @Test(expected = IllegalArgumentException.class)
     public void testMustHaveState() {
         // Must have at least one state.
-        StateSetSnapshot.StateSetData.newBuilder().build();
+        StateSetSnapshot.StateSetDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testMinimal() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_flag")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("flag", true)
                         .build()
                 )
@@ -89,7 +89,7 @@ public void testEmpty() {
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("c", true)
@@ -101,7 +101,7 @@ public void testDataImmutable() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testDuplicateState() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("a", true)
@@ -112,18 +112,18 @@ public void testDuplicateState() {
     public void testStateSetImmutable() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature", true)
                         .build()
                 )
                 .build();
-        Iterator<StateSetSnapshot.StateSetData> iterator = snapshot.getData().iterator();
+        Iterator<StateSetSnapshot.StateSetDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
@@ -132,11 +132,11 @@ public void testStateSetImmutable() {
     public void testLabelsUnique() {
         StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )u}(jF  (cf65f46bf2c6096f777b1b9d767511927d757b4fjjF  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  K
joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X	  @@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("latency_seconds")
                 .withHelp("latency in seconds")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCreatedTimestampMillis(createdTimestamp)
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .withLabels(Labels.of("endpoint", "/"))
@@ -42,15 +42,15 @@ public void testCompleteGoodCase() {
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("endpoint", "/test"))
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "latency_seconds", "latency in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        SummarySnapshot.SummaryData data = snapshot.getData().get(0);
+        SummarySnapshot.SummaryDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.of("endpoint", "/"), data.getLabels());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(1093, data.getCount());
@@ -77,7 +77,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         SummarySnapshot snapshot = SummarySnapshot.newBuilder()
                 .withName("size_bytes")
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCount(10)
                         .withSum(12.0)
                         .build())
@@ -94,7 +94,7 @@ public void testEmptySnapshot() {
 
     @Test
     public void testEmptyData() {
-        SummarySnapshot.SummaryData data = SummarySnapshot.SummaryData.newBuilder().build();
+        SummarySnapshot.SummaryDataPointSnapshot data = SummarySnapshot.SummaryDataPointSnapshot.newBuilder().build();
         Assert.assertEquals(0, data.getQuantiles().size());
         Assert.assertFalse(data.hasCount());
         Assert.assertFalse(data.hasSum());u}(jF  (b8a9827d28794d2698f99e4124b8e3a0eb82a596jjF  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javajlF  modifiedjdF  KjeF  KjnF  K
joF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  XQ	  @@ -12,7 +12,7 @@ public void testCompleteGoodCase() {
                 .withName("my_unknown_seconds")
                 .withHelp("something in seconds")
                 .withUnit(Unit.SECONDS)
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.3)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(0.12)
@@ -24,7 +24,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                ).addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.29)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("env", "dev")
@@ -34,7 +34,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_unknown_seconds", "something in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        UnknownSnapshot.UnknownData data = snapshot.getData().get(1); // env="prod"
+        UnknownSnapshot.UnknownDataPointSnapshot data = snapshot.getData().get(1); // env="prod"
         Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
         Assert.assertEquals(0.3, data.getValue(), 0.0);
         Assert.assertEquals(0.12, data.getExemplar().getValue(), 0.0);
@@ -46,7 +46,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
                 .withName("test")
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .build())
                 .build();
@@ -66,6 +66,6 @@ public void testNameMissing() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        UnknownSnapshot.UnknownData.newBuilder().build();
+        UnknownSnapshot.UnknownDataPointSnapshot.newBuilder().build();
     }
 }u}(jF  (cadb934fd865b5ba4848ac688c8b5d016a8dace9jjF  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javajlF  modifiedjdF  KjeF  KjnF  KjoF  https://github.com/prometheus/client_java/blob/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajqF  https://github.com/prometheus/client_java/raw/cac64c323a8111d96b82f3dec2f7a0cfff2215c3/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajsF  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=cac64c323a8111d96b82f3dec2f7a0cfff2215c3juF  X  @@ -49,7 +49,7 @@ public void run() throws InterruptedException {
                 System.out.println("# ---------------------------------");
                 textWriter.write(System.out, snapshots);
                 System.out.println(TextFormat.printer().shortDebugString(protobufData));
-                HistogramSnapshot.HistogramData data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
+                HistogramSnapshot.HistogramDataPointSnapshot data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
                 System.out.println("Schema: " + data.getNativeSchema());
                 System.out.println("Number of buckets: " + data.getNativeBucketsForPositiveValues().size());
                 long duration = System.nanoTime() - start;ueu(95a92120e52148f3fa2cacc0ac9fccb45f8e7193}(sha(95a92120e52148f3fa2cacc0ac9fccb45f8e7193node_idEC_kwDOAHoJt9oAKDk1YTkyMTIwZTUyMTQ4ZjNmYTJjYWNjMGFjOWZjY2I0NWY4ZTcxOTMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T06:29:11Zu	committer}(jG  Fabian StäberjG  fabian@fstab.dejG  2023-06-29T06:29:11ZumessageMetricData removedtree}(jG  (e54d228b4be568e18c6504b0a2ff578583ddfad8urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/e54d228b4be568e18c6504b0a2ff578583ddfad8ujG  hhttps://api.github.com/repos/prometheus/client_java/git/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujG  dhttps://api.github.com/repos/prometheus/client_java/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193html_urlYhttps://github.com/prometheus/client_java/commit/95a92120e52148f3fa2cacc0ac9fccb45f8e7193comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/commentsjG  }(loginfstabidJ' jG  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jG  "https://api.github.com/users/fstabjG  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujG  }(jG  fstabjG  J' jG  MDQ6VXNlcjMzMDUzNQ==jG  2https://avatars.githubusercontent.com/u/330535?v=4jG  h3jG  "https://api.github.com/users/fstabjG  https://github.com/fstabjG  ,https://api.github.com/users/fstab/followersjG  9https://api.github.com/users/fstab/following{/other_user}jG  2https://api.github.com/users/fstab/gists{/gist_id}jG  9https://api.github.com/users/fstab/starred{/owner}{/repo}jG  0https://api.github.com/users/fstab/subscriptionsjG  'https://api.github.com/users/fstab/orgsjG  (https://api.github.com/users/fstab/reposjG  3https://api.github.com/users/fstab/events{/privacy}jG  2https://api.github.com/users/fstab/received_eventsjG  UserjG  uparents]}(jG  (53ceb5831f588553f9cb1e46bdccce2151084a65jG  dhttps://api.github.com/repos/prometheus/client_java/commits/53ceb5831f588553f9cb1e46bdccce2151084a65jG  Yhttps://github.com/prometheus/client_java/commit/53ceb5831f588553f9cb1e46bdccce2151084a65uastats}(totalK0	additionsK	deletionsK)ufiles](}(jG  (425c42c536daae20cc01df9a5f1e0926ee8b7cf3filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedjH  KjH  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193patchXP  @@ -97,7 +97,7 @@ private static String normalizeName(String name) {
         return name;
     }
 
-    class CounterData extends MetricData<CounterDataPoint> implements CounterDataPoint {
+    class CounterData implements CounterDataPoint {
 
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
@@ -172,11 +172,6 @@ private CounterSnapshot.CounterData collect(Labels labels) {
             }
             return new CounterSnapshot.CounterData(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
         }
-
-        @Override
-        public CounterDataPoint toObserver() {
-            return this;
-        }
     }
 
     public static class Builder extends StatefulMetric.Builder<Builder, Counter> {u}(jG  (af5867656765b45f5c3621eca97619a947f032e1j
H  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajH  modifiedjH  KjH  KjH  KjH  https://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajH  https://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193jH  X  @@ -79,7 +79,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    class GaugeData extends MetricData<GaugeDataPoint> implements GaugeDataPoint {
+    class GaugeData implements GaugeDataPoint {
 
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
@@ -136,11 +136,6 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
             }
             return new GaugeSnapshot.GaugeData(Double.longBitsToDouble(value.get()), labels, oldest);
         }
-
-        @Override
-        public GaugeDataPoint toObserver() {
-            return this;
-        }
     }
 
     public static class Builder extends StatefulMetric.Builder<Builder, Gauge> {u}(jG  (c1cd6b5b7bf2eacc404453f0cd819b3bf7bf28e0j
H  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajH  modifiedjH  KjH  KjH  KjH  https://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajH  https://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193jH  X  @@ -139,7 +139,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    public class HistogramData extends MetricData<DistributionDataPoint> implements DistributionDataPoint {
+    public class HistogramData implements DistributionDataPoint {
         private final LongAdder[] classicBuckets;
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
@@ -269,11 +269,6 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
             );
         }
 
-        @Override
-        public DistributionDataPoint toObserver() {
-            return this;
-        }
-
         private boolean addToNativeBucket(double value, ConcurrentHashMap<Integer, LongAdder> buckets) {
             boolean newBucketCreated = false;
             int bucketIndex;u}(jG  (7177157c6c58511e86cd330afb61d5a19e14ae09j
H  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricData.javajH  removedjH  K jH  K	jH  K	jH  https://github.com/prometheus/client_java/blob/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javajH  https://github.com/prometheus/client_java/raw/53ceb5831f588553f9cb1e46bdccce2151084a65/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.java?ref=53ceb5831f588553f9cb1e46bdccce2151084a65jH  @@ -1,9 +0,0 @@
-package io.prometheus.metrics.core.metrics;
-
-import io.prometheus.metrics.core.observer.DataPoint;
-
-// package private
-abstract class MetricData<T extends DataPoint> {
-
-    abstract T toObserver();
-}u}(jG  (c88bcac39a01b2060746c837959574438e3e8de7j
H  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajH  modifiedjH  KjH  KjH  KjH  https://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajH  https://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193jH  X8  @@ -63,18 +63,13 @@ public void setFalse(String state) {
         getNoLabels().setFalse(state);
     }
 
-    class StateSetData extends MetricData<StateSetDataPoint> implements StateSetDataPoint {
+    class StateSetData implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
         private StateSetData() {
         }
 
-        @Override
-        StateSetDataPoint toObserver() {
-            return this;
-        }
-
         @Override
         public void setTrue(String state) {
             set(state, true);u}(jG  (4c5ab9e6467d82fcfc6ff4b01eabd687bfb57f73j
H  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajH  modifiedjH  KjH  KjH  KjH  https://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajH  https://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193jH  X  @@ -27,7 +27,7 @@
  * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
  * but this has nothing to do with multi-threading.
  */
-abstract class StatefulMetric<O extends DataPoint, V extends MetricData<O>> extends MetricWithFixedMetadata {
+abstract class StatefulMetric<O extends DataPoint, V extends O> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
@@ -76,7 +76,7 @@ public O withLabelValues(String... labelValues) {
                 throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }
         }
-        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData()).toObserver();
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData());
     }
 
     // TODO: Remove automatically if label values have not been used in a while?u}(jG  (45f3cf913a9019e88ebc8e219dac72ab9e34cb39j
H  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajH  modifiedjH  KjH  KjH  KjH  https://github.com/prometheus/client_java/blob/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajH  https://github.com/prometheus/client_java/raw/95a92120e52148f3fa2cacc0ac9fccb45f8e7193/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajH  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=95a92120e52148f3fa2cacc0ac9fccb45f8e7193jH  X  @@ -79,7 +79,7 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
 
-    public class SummaryData extends MetricData<DistributionDataPoint> implements DistributionDataPoint {
+    public class SummaryData implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
@@ -128,11 +128,6 @@ public SummarySnapshot.SummaryData collect(Labels labels) {
             );
         }
 
-        @Override
-        public DistributionDataPoint toObserver() {
-            return this;
-        }
-
         private List<CKMSQuantiles.Quantile> getQuantiles() {
             return quantiles;
         }ueu(00887ef68770bb6ffe4886a4efc0e8230e4767f4}(sha(00887ef68770bb6ffe4886a4efc0e8230e4767f4node_idEC_kwDOAHoJt9oAKDAwODg3ZWY2ODc3MGJiNmZmZTQ4ODZhNGVmYzBlODIzMGU0NzY3ZjQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:38:25Zu	committer}(jQH  Fabian StäberjSH  fabian@fstab.dejUH  2023-08-26T21:38:25ZumessageRename OTel exampletree}(jIH  (a7c6e7658eacfb479653039014ca1d522e14e6e7urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a7c6e7658eacfb479653039014ca1d522e14e6e7ujaH  hhttps://api.github.com/repos/prometheus/client_java/git/commits/00887ef68770bb6ffe4886a4efc0e8230e4767f4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujaH  dhttps://api.github.com/repos/prometheus/client_java/commits/00887ef68770bb6ffe4886a4efc0e8230e4767f4html_urlYhttps://github.com/prometheus/client_java/commit/00887ef68770bb6ffe4886a4efc0e8230e4767f4comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/00887ef68770bb6ffe4886a4efc0e8230e4767f4/commentsjOH  }(loginfstabidJ' jKH  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jaH  "https://api.github.com/users/fstabjmH  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujWH  }(jrH  fstabjtH  J' jKH  MDQ6VXNlcjMzMDUzNQ==jvH  2https://avatars.githubusercontent.com/u/330535?v=4jxH  h3jaH  "https://api.github.com/users/fstabjmH  https://github.com/fstabj{H  ,https://api.github.com/users/fstab/followersj}H  9https://api.github.com/users/fstab/following{/other_user}jH  2https://api.github.com/users/fstab/gists{/gist_id}jH  9https://api.github.com/users/fstab/starred{/owner}{/repo}jH  0https://api.github.com/users/fstab/subscriptionsjH  'https://api.github.com/users/fstab/orgsjH  (https://api.github.com/users/fstab/reposjH  3https://api.github.com/users/fstab/events{/privacy}jH  2https://api.github.com/users/fstab/received_eventsjH  UserjH  uparents]}(jIH  (7314b0db6ce732e47a91590383445466b6b3237ejaH  dhttps://api.github.com/repos/prometheus/client_java/commits/7314b0db6ce732e47a91590383445466b6b3237ejmH  Yhttps://github.com/prometheus/client_java/commit/7314b0db6ce732e47a91590383445466b6b3237euastats}(totalK	additionsK	deletionsK
ufiles](}(jIH  (53ddc430b7e34d348a973c1211a825aad16daccbfilename1examples/example-exporter-opentelemetry/README.mdstatusrenamedjH  K jH  K changesK blob_urlhttps://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4previous_filename(examples/example-opentelemetry/README.mdu}(jIH  (923840e0c85a643976792d88e8dff7c10d446ceejH  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamljH  renamedjH  K jH  K jH  K jH  https://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljH  https://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljH  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4jH  9examples/example-opentelemetry/config/otelcol-config.yamlu}(jIH  (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391jH  >examples/example-exporter-opentelemetry/config/prometheus.yamljH  renamedjH  K jH  K jH  K jH  https://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljH  https://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljH  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4jH  5examples/example-opentelemetry/config/prometheus.yamlu}(jIH  (d627d3b540120cb9dfdceaecc5dacafa9c682cc3jH  ;examples/example-exporter-opentelemetry/docker-compose.yamljH  renamedjH  K jH  K jH  K jH  https://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljH  https://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljH  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4jH  2examples/example-opentelemetry/docker-compose.yamlu}(jIH  (dba35bdfd51618bc3ef888e4af9e2a2dbcb6bc5ajH  /examples/example-exporter-opentelemetry/pom.xmljH  renamedjH  KjH  K	jH  K
jH  https://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljH  https://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljH  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4patchX  @@ -8,7 +8,7 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-opentelemetry</artifactId>
+    <artifactId>example-exporter-opentelemetry</artifactId>
 
     <name>Example - OpenTelemetry Metrics Exporter</name>
     <description>
@@ -42,14 +42,6 @@
             <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <!--
-        <dependency>
-            <groupId>io.opentelemetry</groupId>
-            <artifactId>opentelemetry-api</artifactId>
-            <version>1.29.0</version>
-            <scope>provided</scope>
-        </dependency>
-        -->
     </dependencies>
 
     <build>jH  &examples/example-opentelemetry/pom.xmlu}(jIH  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63jH  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javajH  renamedjH  K jH  K jH  K jH  https://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajH  https://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajH  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4jH  cexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javau}(jIH  (be2f49f63c0fc4321cff691b437953a855166d89jH  examples/pom.xmljH  modifiedjH  KjH  KjH  KjH  jhttps://github.com/prometheus/client_java/blob/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fpom.xmljH  ihttps://github.com/prometheus/client_java/raw/00887ef68770bb6ffe4886a4efc0e8230e4767f4/examples%2Fpom.xmljH  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=00887ef68770bb6ffe4886a4efc0e8230e4767f4jH  X0  @@ -36,7 +36,7 @@
         <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
-        <module>example-opentelemetry</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>ueu(8ab8e7256075cd5242bbb84ce697c7925df6ee61}(sha(8ab8e7256075cd5242bbb84ce697c7925df6ee61node_idEC_kwDOAHoJt9oAKDhhYjhlNzI1NjA3NWNkNTI0MmJiYjg0Y2U2OTdjNzkyNWRmNmVlNjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-31T20:08:25Zu	committer}(jH  Fabian StäberjH  fabian@fstab.dejH  2023-08-31T20:08:25ZumessageAdd JVM class loading metricstree}(jH  (b09a9ff271130451c3d63dbd8a9f518e4fd4a040urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/b09a9ff271130451c3d63dbd8a9f518e4fd4a040ujI  hhttps://api.github.com/repos/prometheus/client_java/git/commits/8ab8e7256075cd5242bbb84ce697c7925df6ee61
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI  dhttps://api.github.com/repos/prometheus/client_java/commits/8ab8e7256075cd5242bbb84ce697c7925df6ee61html_urlYhttps://github.com/prometheus/client_java/commit/8ab8e7256075cd5242bbb84ce697c7925df6ee61comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/8ab8e7256075cd5242bbb84ce697c7925df6ee61/commentsjH  }(loginfstabidJ' jH  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jI  "https://api.github.com/users/fstabjI  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujH  }(jI  fstabjI  J' jH  MDQ6VXNlcjMzMDUzNQ==jI  2https://avatars.githubusercontent.com/u/330535?v=4jI  h3jI  "https://api.github.com/users/fstabjI  https://github.com/fstabj"I  ,https://api.github.com/users/fstab/followersj$I  9https://api.github.com/users/fstab/following{/other_user}j&I  2https://api.github.com/users/fstab/gists{/gist_id}j(I  9https://api.github.com/users/fstab/starred{/owner}{/repo}j*I  0https://api.github.com/users/fstab/subscriptionsj,I  'https://api.github.com/users/fstab/orgsj.I  (https://api.github.com/users/fstab/reposj0I  3https://api.github.com/users/fstab/events{/privacy}j2I  2https://api.github.com/users/fstab/received_eventsj4I  Userj6I  uparents]}(jH  (fa1669cc7f0df4fd66ce7859050376f17d73a407jI  dhttps://api.github.com/repos/prometheus/client_java/commits/fa1669cc7f0df4fd66ce7859050376f17d73a407jI  Yhttps://github.com/prometheus/client_java/commit/fa1669cc7f0df4fd66ce7859050376f17d73a407uastats}(totalKҌ	additionsK	deletionsKufiles](}(jH  (803fb07475e01160017023ce3edee7ec14bf9684filenamezprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmClassLoadingMetrics.javastatusaddedjPI  KfjQI  K changesKfblob_urlhttps://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetrics.javaraw_urlhttps://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetrics.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetrics.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61patchX  @@ -0,0 +1,102 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.CounterWithCallback;
+import io.prometheus.metrics.core.metrics.GaugeWithCallback;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.lang.management.ClassLoadingMXBean;
+import java.lang.management.ManagementFactory;
+
+/**
+ * JVM Class Loading metrics. The {@link JvmClassLoadingMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.newBuilder().register();
+ * }</pre>
+ * However, if you want only the {@link JvmClassLoadingMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmClassLoadingMetrics.newBuilder().register();
+ * }</pre>
+ * Example metrics being exported:
+ * <pre>
+ * # HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM
+ * # TYPE jvm_classes_currently_loaded gauge
+ * jvm_classes_currently_loaded 1109.0
+ * # HELP jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution
+ * # TYPE jvm_classes_loaded_total counter
+ * jvm_classes_loaded_total 1109.0
+ * # HELP jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution
+ * # TYPE jvm_classes_unloaded_total counter
+ * jvm_classes_unloaded_total 0.0
+ * </pre>
+ */
+public class JvmClassLoadingMetrics {
+
+    private static final String JVM_CLASSES_CURRENTLY_LOADED = "jvm_classes_currently_loaded";
+    private static final String JVM_CLASSES_LOADED_TOTAL = "jvm_classes_loaded_total";
+    private static final String JVM_CLASSES_UNLOADED_TOTAL = "jvm_classes_unloaded_total";
+
+    private final PrometheusProperties config;
+    private final ClassLoadingMXBean classLoadingBean;
+
+    private JvmClassLoadingMetrics(ClassLoadingMXBean classLoadingBean, PrometheusProperties config) {
+        this.classLoadingBean = classLoadingBean;
+        this.config = config;
+    }
+
+    private void register(PrometheusRegistry registry) {
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_CLASSES_CURRENTLY_LOADED)
+                .withHelp("The number of classes that are currently loaded in the JVM")
+                .withCallback(callback -> callback.call(classLoadingBean.getLoadedClassCount()))
+                .register(registry);
+
+        CounterWithCallback.newBuilder(config)
+                .withName(JVM_CLASSES_LOADED_TOTAL)
+                .withHelp("The total number of classes that have been loaded since the JVM has started execution")
+                .withCallback(callback -> callback.call(classLoadingBean.getTotalLoadedClassCount()))
+                .register(registry);
+
+        CounterWithCallback.newBuilder(config)
+                .withName(JVM_CLASSES_UNLOADED_TOTAL)
+                .withHelp("The total number of classes that have been unloaded since the JVM has started execution")
+                .withCallback(callback -> callback.call(classLoadingBean.getUnloadedClassCount()))
+                .register(registry);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private ClassLoadingMXBean classLoadingBean;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withClassLoadingBean(ClassLoadingMXBean classLoadingBean) {
+            this.classLoadingBean = classLoadingBean;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            ClassLoadingMXBean classLoadingBean = this.classLoadingBean != null ? this.classLoadingBean : ManagementFactory.getClassLoadingMXBean();
+            new JvmClassLoadingMetrics(classLoadingBean, config).register(registry);
+        }
+    }
+}u}(jH  (bdbc090237a2f58347f2fb3127d211aa13312330jVI  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javajXI  modifiedjPI  KjQI  KjZI  Kj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61jaI  XX  @@ -32,7 +32,7 @@ public void register() {
         public void register(PrometheusRegistry registry) {
             JvmThreadsMetrics.newBuilder(config).register(registry);
             JvmBufferPoolMetrics.newBuilder(config).register(registry);
-
+            JvmClassLoadingMetrics.newBuilder(config).register(registry);
         }
     }
 }u}(jH  (397593b164b87d40f79ca0ed7cb4669e25675c20jVI  uprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetrics.javajXI  modifiedjPI  KjQI  KjZI  Kj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61jaI  X  @@ -179,8 +179,8 @@ public static Builder newBuilder(PrometheusProperties config) {
     public static class Builder {
 
         private final PrometheusProperties config;
-        private Boolean isNativeImage = NativeImageChecker.isGraalVmNativeImage;
-        private ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
+        private Boolean isNativeImage;
+        private ThreadMXBean threadBean;
 
         private Builder(PrometheusProperties config) {
             this.config = config;u}(jH  (7adc64bf063383b0ee8799cd3004fbb5373f0de3jVI  |prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetricsTest.javajXI  modifiedjPI  KjQI  KjZI  Kj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61jaI  X  @@ -15,6 +15,7 @@
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 
+import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -64,13 +65,6 @@ public void testGoodCase() throws IOException {
         Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
     }
 
-    private String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
-        writer.write(out, snapshots);
-        return out.toString(StandardCharsets.UTF_8.name());
-    }
-
     @Test
     public void testIgnoredMetricNotScraped() {
         MetricNameFilter filter = MetricNameFilter.newBuilder()u}(jH  (fa019258cb148682cc28628915cc76b3cf894d7fjVI  ~prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmClassLoadingMetricsTest.javajXI  addedjPI  KDjQI  K jZI  KDj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetricsTest.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetricsTest.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmClassLoadingMetricsTest.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61jaI  X  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.io.IOException;
+import java.lang.management.ClassLoadingMXBean;
+
+import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class JvmClassLoadingMetricsTest {
+
+    private ClassLoadingMXBean mockClassLoadingBean = Mockito.mock(ClassLoadingMXBean.class);
+
+    @Before
+    public void setUp() {
+        when(mockClassLoadingBean.getLoadedClassCount()).thenReturn(1000);
+        when(mockClassLoadingBean.getTotalLoadedClassCount()).thenReturn(2000L);
+        when(mockClassLoadingBean.getUnloadedClassCount()).thenReturn(500L);
+    }
+
+    @Test
+    public void testGoodCase() throws IOException {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmClassLoadingMetrics.newBuilder()
+                .withClassLoadingBean(mockClassLoadingBean)
+                .register(registry);
+        MetricSnapshots snapshots = registry.scrape();
+
+        String expected = "" +
+                "# TYPE jvm_classes_currently_loaded gauge\n" +
+                "# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM\n" +
+                "jvm_classes_currently_loaded 1000.0\n" +
+                "# TYPE jvm_classes_loaded counter\n" +
+                "# HELP jvm_classes_loaded The total number of classes that have been loaded since the JVM has started execution\n" +
+                "jvm_classes_loaded_total 2000.0\n" +
+                "# TYPE jvm_classes_unloaded counter\n" +
+                "# HELP jvm_classes_unloaded The total number of classes that have been unloaded since the JVM has started execution\n" +
+                "jvm_classes_unloaded_total 500.0\n" +
+                "# EOF\n";
+
+        Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
+    }
+
+    @Test
+    public void testIgnoredMetricNotScraped() {
+        MetricNameFilter filter = MetricNameFilter.newBuilder()
+                .nameMustNotBeEqualTo("jvm_classes_currently_loaded")
+                .build();
+
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmClassLoadingMetrics.newBuilder()
+                .withClassLoadingBean(mockClassLoadingBean)
+                .register(registry);
+        registry.scrape(filter);
+
+        verify(mockClassLoadingBean, times(0)).getLoadedClassCount();
+        verify(mockClassLoadingBean, times(1)).getTotalLoadedClassCount();
+    }
+}u}(jH  (ba1697379186a5690266ab5ba923b1744f3837b5jVI  yprometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetricsTest.javajXI  modifiedjPI  KjQI  KjZI  Kj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61     jaI  X  @@ -22,6 +22,7 @@
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 
+import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -92,13 +93,6 @@ public void testGoodCase() throws IOException {
         Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
     }
 
-    private String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
-        writer.write(out, snapshots);
-        return out.toString(StandardCharsets.UTF_8.name());
-    }
-
     @Test
     public void testIgnoredMetricNotScraped() {
         MetricNameFilter filter = MetricNameFilter.newBuilder()u}(jH  (2b0d7972cea3c633eeb39c092ce3543e2653ca6bjVI  lprometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/TestUtil.javajXI  addedjPI  KjQI  K jZI  Kj[I  https://github.com/prometheus/client_java/blob/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FTestUtil.javaj]I  https://github.com/prometheus/client_java/raw/8ab8e7256075cd5242bbb84ce697c7925df6ee61/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FTestUtil.javaj_I  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FTestUtil.java?ref=8ab8e7256075cd5242bbb84ce697c7925df6ee61jaI  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+public class TestUtil {
+
+    static String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        writer.write(out, snapshots);
+        return out.toString(StandardCharsets.UTF_8.name());
+    }
+}ueu(1369fff6ac2d08137129cc5f5fa36b7260e54434}(sha(1369fff6ac2d08137129cc5f5fa36b7260e54434node_idEC_kwDOAHoJt9oAKDEzNjlmZmY2YWMyZDA4MTM3MTI5Y2M1ZjVmYTM2YjcyNjBlNTQ0MzQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-27T12:31:39Zu	committer}(jI  Fabian StäberjI  fabian@fstab.dejI  2023-06-27T12:31:39Zumessage3Fix concurrency buffer bug and add manual benchmarktree}(jI  (5e7d6a6ae83f3f1a9910bf55d4cd430e676b5c51urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/5e7d6a6ae83f3f1a9910bf55d4cd430e676b5c51ujI  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1369fff6ac2d08137129cc5f5fa36b7260e54434
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI  dhttps://api.github.com/repos/prometheus/client_java/commits/1369fff6ac2d08137129cc5f5fa36b7260e54434html_urlYhttps://github.com/prometheus/client_java/commit/1369fff6ac2d08137129cc5f5fa36b7260e54434comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1369fff6ac2d08137129cc5f5fa36b7260e54434/commentsjI  }(loginfstabidJ' jI  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jI  "https://api.github.com/users/fstabjI  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujI  }(jI  fstabjI  J' jI  MDQ6VXNlcjMzMDUzNQ==jI  2https://avatars.githubusercontent.com/u/330535?v=4jI  h3jI  "https://api.github.com/users/fstabjI  https://github.com/fstabjI  ,https://api.github.com/users/fstab/followersjI  9https://api.github.com/users/fstab/following{/other_user}jI  2https://api.github.com/users/fstab/gists{/gist_id}jI  9https://api.github.com/users/fstab/starred{/owner}{/repo}jI  0https://api.github.com/users/fstab/subscriptionsjI  'https://api.github.com/users/fstab/orgsjI  (https://api.github.com/users/fstab/reposjI  3https://api.github.com/users/fstab/events{/privacy}jI  2https://api.github.com/users/fstab/received_eventsjI  UserjI  uparents]}(jI  (d81b2cc271caf60214cafd9564f2853c34634ed2jI  dhttps://api.github.com/repos/prometheus/client_java/commits/d81b2cc271caf60214cafd9564f2853c34634ed2jI  Yhttps://github.com/prometheus/client_java/commit/d81b2cc271caf60214cafd9564f2853c34634ed2uastats}(totalK	additionsK	deletionsK+ufiles](}(jI  (37dcd9536198bb4e9ea188f413d9282d48faaf8efilenameTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javastatusmodifiedjI  KjI  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/1369fff6ac2d08137129cc5f5fa36b7260e54434/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaraw_urlhttps://github.com/prometheus/client_java/raw/1369fff6ac2d08137129cc5f5fa36b7260e54434/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=1369fff6ac2d08137129cc5f5fa36b7260e54434patchX  @@ -57,7 +57,7 @@ T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> o
             result = runnable.get();
             int expectedBufferSize;
             if (reset) {
-                expectedBufferSize = (int) (observationCount.getAndSet(0) - count);
+                expectedBufferSize = (int) ((observationCount.getAndSet(0) & ~signBit) - count);
                 reset = false;
             } else {
                 expectedBufferSize = (int) (observationCount.addAndGet(signBit) - count);u}(jI  (0221882cdb17fe10a0b2f81e49b3f0d3e22fc1c9jI  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajI  modifiedjI  KjI  KjI  Kj J  https://github.com/prometheus/client_java/blob/1369fff6ac2d08137129cc5f5fa36b7260e54434/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajJ  https://github.com/prometheus/client_java/raw/1369fff6ac2d08137129cc5f5fa36b7260e54434/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=1369fff6ac2d08137129cc5f5fa36b7260e54434jJ  X
  @@ -173,7 +173,7 @@ public void observe(double amount) {
                 return;
             }
             if (!buffer.append(amount)) {
-                doObserve(amount);
+                doObserve(amount, false);
             }
             if (isExemplarsEnabled()) {
                 exemplarSampler.observe(amount);
@@ -187,14 +187,14 @@ public void observeWithExemplar(double value, Labels labels) {
                 return;
             }
             if (!buffer.append(value)) {
-                doObserve(value);
+                doObserve(value, false);
             }
             if (isExemplarsEnabled()) {
                 exemplarSampler.observeWithExemplar(value, labels);
             }
         }
 
-        private void doObserve(double value) {
+        private void doObserve(double value, boolean fromBuffer) {
             // classicUpperBounds is an empty array if this is a native histogram only.
             for (int i = 0; i < classicUpperBounds.length; ++i) {
                 // The last bucket is +Inf, so we always increment.
@@ -215,7 +215,14 @@ private void doObserve(double value) {
             }
             sum.add(value);
             count.increment(); // must be the last step, because count is used to signal that the operation is complete.
-            maybeResetOrScaleDown(value, nativeBucketCreated);
+            if (!fromBuffer) {
+                // maybeResetOrScaleDown will switch to the buffer,
+                // which won't work if we are currently still processing observations from the buffer.
+                // The reason is that before switching to the buffer we wait for all pending observations to be counted.
+                // If we do this while still applying observations from the buffer, the pending observations from
+                // the buffer will never be counted, and the buffer.run() method will wait forever.
+                maybeResetOrScaleDown(value, nativeBucketCreated);
+            }
         }
 
         public HistogramSnapshot.HistogramData collect(Labels labels) {
@@ -258,7 +265,7 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
                                     createdTimeMillis);
                         }
                     },
-                    this::doObserve
+                    v -> doObserve(v, true)
             );
         }
 
@@ -365,7 +372,7 @@ private void maybeResetOrScaleDown(double value, boolean nativeBucketCreated) {
                             }
                             return null;
                         },
-                        this::doObserve);
+                        v -> doObserve(v, true));
             } else if (nativeBucketCreated) {
                 // If a new bucket was created we need to check if nativeMaxBuckets is exceeded
                 // and scale down if so.
@@ -374,7 +381,7 @@ private void maybeResetOrScaleDown(double value, boolean nativeBucketCreated) {
             if (wasReset.get()) {
                 // We just discarded the newly observed value. Observe it again.
                 if (!buffer.append(value)) {
-                    doObserve(value);
+                    doObserve(value, true);
                 }
             }
         }
@@ -407,7 +414,7 @@ private void maybeScaleDown(AtomicBoolean wasReset) {
                         doubleBucketWidth();
                         return null;
                     },
-                    this::doObserve
+                    v -> doObserve(v, true)
             );
         }
 u}(jI  (7ac7647ee6ca4d9cd41302f23db71d29f93e2fbcjI  tmp_example/pom.xmljI  modifiedjI  KjI  KjI  Kj J  mhttps://github.com/prometheus/client_java/blob/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fpom.xmljJ  lhttps://github.com/prometheus/client_java/raw/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=1369fff6ac2d08137129cc5f5fa36b7260e54434jJ  Xh  @@ -90,11 +90,9 @@
                             <goal>shade</goal>
                         </goals>
                         <configuration>
-                            <finalName>benchmarks</finalName>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>org.openjdk.jmh.Main</mainClass>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>com.example.ManualNativeHistogramBenchmark</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>u}(jI  (26042779f46d56f8be3755e93090ea5b8dbdc7d8jI  :tmp_example/src/main/java/com/example/BenchmarkRunner.javajI  modifiedjI  K jI  KjI  Kj J  https://github.com/prometheus/client_java/blob/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javajJ  https://github.com/prometheus/client_java/raw/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javajJ  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.java?ref=1369fff6ac2d08137129cc5f5fa36b7260e54434jJ  Xe  @@ -1,36 +1,6 @@
 package com.example;
 
-import io.opentelemetry.api.OpenTelemetry;
-import io.opentelemetry.api.common.Attributes;
-import io.opentelemetry.api.metrics.DoubleCounter;
-import io.opentelemetry.api.metrics.DoubleHistogram;
-import io.opentelemetry.api.metrics.LongCounter;
-import io.opentelemetry.api.metrics.LongHistogram;
-import io.opentelemetry.api.metrics.Meter;
-import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
-import io.opentelemetry.context.propagation.ContextPropagators;
-import io.opentelemetry.sdk.OpenTelemetrySdk;
-import io.opentelemetry.sdk.metrics.Aggregation;
-import io.opentelemetry.sdk.metrics.InstrumentSelector;
-import io.opentelemetry.sdk.metrics.SdkMeterProvider;
-import io.opentelemetry.sdk.metrics.View;
-import io.opentelemetry.sdk.resources.Resource;
-import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
-import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
-import io.prometheus.metrics.core.metrics.Counter;
-import io.prometheus.metrics.core.metrics.Histogram;
-import io.prometheus.metrics.core.observer.DiscreteEventObserver;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Threads;
-
 import java.util.Random;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.DoubleAdder;
-import java.util.concurrent.atomic.LongAdder;
 
 //@State(Scope.Benchmark)
 public class BenchmarkRunner {u}(jI  (fd79a2edb720d9f411f98fa069d4a9f22472d669jI  Itmp_example/src/main/java/com/example/ManualNativeHistogramBenchmark.javajI  addedjI  KjI  K jI  Kj J  https://github.com/prometheus/client_java/blob/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javajJ  https://github.com/prometheus/client_java/raw/1369fff6ac2d08137129cc5f5fa36b7260e54434/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javajJ  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.java?ref=1369fff6ac2d08137129cc5f5fa36b7260e54434jJ  X  @@ -0,0 +1,169 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Histogram;
+
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Consumer;
+
+public class ManualNativeHistogramBenchmark {
+
+
+    private final int MAX_THREADS = 32;
+    private final double[][] randoms = new double[MAX_THREADS][10 * 1024 * 1024];
+    private Meter meter;
+    private Histogram prometheusHistogram;
+    private DoubleHistogram otelHistogram;
+
+    public static void main(String[] args) throws InterruptedException {
+        ManualNativeHistogramBenchmark benchmark = new ManualNativeHistogramBenchmark();
+        benchmark.setUp();
+        for (int threads = 1; threads <= 48; threads++) {
+            benchmark.run(threads);
+        }
+    }
+
+    private void runParallel(String msg, Consumer<Integer> func, ExecutorService executorService, int nThreads) throws InterruptedException {
+        long start = System.nanoTime();
+        CountDownLatch cdl = new CountDownLatch(nThreads);
+        for (int thread = 0; thread < nThreads; thread++) {
+            int finalThread = thread;
+            executorService.submit(() -> {
+                func.accept(finalThread);
+                cdl.countDown();
+            });
+        }
+        cdl.await();
+        long duration = System.nanoTime() - start;
+        System.out.println(msg + " took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+    }
+
+    public void run(int nThreads) throws InterruptedException {
+        if (nThreads > MAX_THREADS) {
+            throw new IllegalStateException();
+        }
+        ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
+        CountDownLatch countDownLatch = new CountDownLatch(nThreads);
+        for (int i = 0; i < nThreads; i++) {
+            executorService.submit(countDownLatch::countDown);
+        }
+        countDownLatch.await();
+
+        int nWarmupIterations = 5;
+        int nRealIterations = 8;
+
+        // prometheus
+        for (int i = 0; i < nWarmupIterations; i++) {
+            runParallel("Prometheus warmup iteration " + (i + 1) + " of " + nWarmupIterations, this::runPrometheusBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+        for (int i = 0; i < nRealIterations; i++) {
+            runParallel("Prometheus iteration " + (i + 1) + " of " + nRealIterations, this::runPrometheusBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+
+        // otel
+        for (int i = 0; i < nWarmupIterations; i++) {
+            runParallel("OTel warmup iteration " + (i + 1) + " of " + nWarmupIterations, this::runOTelBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+        for (int i = 0; i < nRealIterations; i++) {
+            runParallel("OTel iteration " + (i + 1) + " of " + nRealIterations, this::runOTelBenchmark, executorService, nThreads);
+            initPrometheusHistogram();
+        }
+    }
+
+
+    public void runPrometheusBenchmark(int threadNumber) {
+        try {
+            for (double observation : randoms[threadNumber]) {
+                prometheusHistogram.observe(observation);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(-1);
+        }
+    }
+
+    public void runOTelBenchmark(int threadNumber) {
+        try {
+            for (double observation : randoms[threadNumber]) {
+                otelHistogram.record(observation);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(-1);
+        }
+    }
+
+    public void setUp() {
+        initPrometheusHistogram();
+        initOTelMeter();
+        initOTelHistogram();
+        initRandomNumbers();
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+    }
+
+    private void initOTelMeter() {
+
+        // OTel SDK initialization, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("test.histogram")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
+                                .build()
+                )
+                .build();
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                .setMeterProvider(sdkMeterProvider)
+                .buildAndRegisterGlobal();
+
+        meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+    }
+
+    private void initOTelHistogram() {
+        otelHistogram = meter.histogramBuilder("test.histogram")
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < MAX_THREADS; i++) {
+            for (int j = 0; j < randoms[i].length; j++) {
+                randoms[i][j] = Math.abs(rand.nextGaussian());
+            }
+        }
+        System.out.println("random init done");
+    }
+}ueu(b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54}(sha(b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54node_idEC_kwDOAHoJt9oAKGIyM2Q0MjhiYmI1MjE0NmJkMjdmM2U1YjViNWJkZjhmMDRkMWZlNTQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:00:18Zu	committer}(j2J  Fabian Stäberj4J  fabian@fstab.dej6J  2023-07-16T21:43:22ZumessageRemove Java 6 supporttree}(j*J  (ac48b1f8e96bae180770381c693287f2d9bbd8d2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ac48b1f8e96bae180770381c693287f2d9bbd8d2ujBJ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujBJ  dhttps://api.github.com/repos/prometheus/client_java/commits/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54html_urlYhttps://github.com/prometheus/client_java/commit/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/commentsj0J  }(loginfstabidJ' j,J  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jBJ  "https://api.github.com/users/fstabjNJ  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj8J  }(jSJ  fstabjUJ  J' j,J  MDQ6VXNlcjMzMDUzNQ==jWJ  2https://avatars.githubusercontent.com/u/330535?v=4jYJ  h3jBJ  "https://api.github.com/users/fstabjNJ  https://github.com/fstabj\J  ,https://api.github.com/users/fstab/followersj^J  9https://api.github.com/users/fstab/following{/other_user}j`J  2https://api.github.com/users/fstab/gists{/gist_id}jbJ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jdJ  0https://api.github.com/users/fstab/subscriptionsjfJ  'https://api.github.com/users/fstab/orgsjhJ  (https://api.github.com/users/fstab/reposjjJ  3https://api.github.com/users/fstab/events{/privacy}jlJ  2https://api.github.com/users/fstab/received_eventsjnJ  UserjpJ  uparents]}(j*J  (79382b71a9898b0cd39aecdc418739feb920c57djBJ  dhttps://api.github.com/repos/prometheus/client_java/commits/79382b71a9898b0cd39aecdc418739feb920c57djNJ  Yhttps://github.com/prometheus/client_java/commit/79382b71a9898b0cd39aecdc418739feb920c57duastats}(totalM	additionsK	deletionsMufiles](}(j*J  (9e3559021cca8d3d3a135cfdd549fa0a7ecc9566filenameexamples/tomcat-servlet/pom.xmlstatusmodifiedjJ  K jJ  KchangesKblob_url{https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/examples%2Ftomcat-servlet%2Fpom.xmlraw_urlzhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/examples%2Ftomcat-servlet%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54patchX  @@ -33,13 +33,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>u}(j*J  (3413633792016afacacfc0822aa0ce233eb5ad30jJ  #integration_tests/it_common/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_common%2Fpom.xmljJ  ~https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_common%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -32,14 +32,6 @@
       </testResource>
     </testResources>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>u}(j*J  (4e405edac110ccb7d73935026fc54729e946f706jJ  1integration_tests/it_exemplars_otel_agent/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -85,14 +85,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j*J  (23356c7264571438d2eb622464a60822372b06b6jJ  /integration_tests/it_exemplars_otel_sdk/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -63,14 +63,6 @@
   <build>
     <finalName>example-open-telemetry-app</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j*J  (c4e8829680fbadaa1d64b562e584bf05bc1b177bjJ  *integration_tests/it_java_versions/pom.xmljJ  modifiedjJ  K jJ  K(jJ  K(jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_java_versions%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_java_versions%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -72,53 +72,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j*J  (e854ed193574f7ef12b6e71638be38eb9c7e5305jJ  jintegration_tests/it_java_versions/src/test/java/io/prometheus/client/it/java_versions/JavaVersionsIT.javajJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javajJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javajJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.java?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X>  @@ -36,9 +36,7 @@ public static String[] images() {
             "openjdk:8-jre",
             "openjdk:11-jre",
             "openjdk:17",
-            "ticketfly/java:6",
             "adoptopenjdk/openjdk16:ubi-minimal-jre",
-            "azul/zulu-openjdk:6",
 
             // OpenJ9
             "ibmjava:8-jre",u}(j*J  (0cf11239ac7cf285007bb9a298fe0b87f6e8deb5jJ  #integration_tests/it_log4j2/pom.xmljJ  modifiedjJ  K jJ  K+jJ  K+jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_log4j2%2Fpom.xmljJ  ~https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_log4j2%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X	  @@ -88,56 +88,13 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <!-- We compile this for Java 6, but as log4j 2.15.0 requires Java >= 7 at runtime it will not run on -->
-                    <!-- Java 6 with the latest log4j version. However, let's keep Java 6 here to make it easy to manually -->
-                    <!-- downgrade to log4j 2.3 to run a quick test with Java 6. -->
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
 
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j*J  (8272880ba0c03be2b269001fe9aac4a7b4526ef7jJ  Vintegration_tests/it_log4j2/src/test/java/io/prometheus/client/it/log4j2/Log4j2IT.javajJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javajJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javajJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.java?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X]  @@ -24,8 +24,6 @@
 public class Log4j2IT {
 
     private final String image = "openjdk:8-jre";
-    // This test is green with a Java 6 image, but you need to downgrade the log4j version in pom.xml.
-    // private final String image = "azul/zulu-openjdk:6";
     private final Volume volume;
     private final GenericContainer<?> javaContainer;
 u}(j*J  (f5f103a0721e4ffcb7d518f419a4ae7c728368aajJ  (integration_tests/it_pushgateway/pom.xmljJ  modifiedjJ  K jJ  K(jJ  K(jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_pushgateway%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_pushgateway%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -69,53 +69,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j*J  (d0fb6dac38a5c5ce33a641e43636b8636d5c3decjJ  eintegration_tests/it_pushgateway/src/test/java/io/prometheus/client/it/pushgateway/PushGatewayIT.javajJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javajJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javajJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.java?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  XK  @@ -34,8 +34,6 @@ public class PushGatewayIT {
     @Parameterized.Parameters(name = "{0}")
     public static String[] images() {
         return new String[] {
-                "azul/zulu-openjdk:6",
-                "openjdk:7",
                 "ibmjava:8-jre",
                 "openjdk:11-slim",
                 "openjdk:17"u}(j*J  (532852b3632496349b8e6fdc15f228ca82e551cfjJ  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -58,14 +58,6 @@
   <build>
     <finalName>${project.artifactId}</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j*J  (5e088bd8f9527c7cef4cafcf14388a2c6e9cf131jJ  pom.xmljJ  modifiedjJ  KjJ  KjJ  KjJ  _https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/pom.xmljJ  ^https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/pom.xmljJ  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -66,7 +66,7 @@
         <module>simpleclient_servlet_common</module>
         <module>simpleclient_servlet_jakarta</module>
         <module>simpleclient_spring_web</module>
-        <module>simpleclient_spring_boot</module>
+        <!-- <module>simpleclient_spring_boot</module> --> <!-- requires Java <= 11 to compile. removing to enable compilation with Java 17 -->
         <module>simpleclient_jetty</module>
         <module>simpleclient_jetty_jdk8</module>
         <module>simpleclient_tracer</module>
@@ -231,11 +231,10 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>u}(j*J  (2cd55e22386036e98f31898b0412625cdf4eb3b9jJ  !prometheus-metrics-config/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  {https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-config%2Fpom.xmljJ  zhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-config%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -33,16 +33,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j*J  (2bf55dadda285778dbf632b533a919f32d9e9fffjJ  prometheus-metrics-core/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  yhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-core%2Fpom.xmljJ  xhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-core%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -74,16 +74,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j*J  (02bbd99f1703e28adf8ec6573764b93fdd63a946jJ  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -47,16 +47,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>u}(j*J  (8039472c4a069287e4c8227864d5910d051e7650jJ  -prometheus-metrics-exposition-formats/pom.xmljJ  modifiedjJ  K jJ  K	jJ  K	jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-exposition-formats%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-exposition-formats%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -91,15 +91,6 @@
                     </execution>
                 </executions>
             </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
         </plugins>
     </build>
 </project>u}(j*J  (9a007c442d68016c8edecb1b143f3d0dae1f4caajJ   prometheus-metrics-model/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  zhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-model%2Fpom.xmljJ  yhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-model%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -40,16 +40,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j*J  (e8c1ed7cc9f9fa83d94804628c3556159408743cjJ  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xh  @@ -23,15 +23,4 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>u}(j*J  (36e2f8c8c2cb258e4f3d2cd1f62e62752ff0b880jJ  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xh  @@ -38,15 +38,4 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>u}(j*J  (679c6f78864064b4337e9adb6986aaccf6d6407bjJ  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xq  @@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j*J  (01f5654ef7f0d9fed27230cee50b94d1f36f4407jJ  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljJ  modifiedjJ  K jJ  K
jJ  K
jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j*J  (771955fc4da46dfd1af08c21ce7601d6086b1a8djJ  protobuf-shaded/pom.xmljJ  modifiedjJ  KjJ  KjJ  KjJ  qhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/protobuf-shaded%2Fpom.xmljJ  phttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/protobuf-shaded%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X_  @@ -136,31 +136,25 @@
                             <relocations>
                                 <relocation>
                                     <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                    <shadedPattern>
+                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
+                                    </shadedPattern>
                                 </relocation>
                             </relocations>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <excludes>
                         <exclude>google/protobuf/*.proto</exclude>
                         <exclude>google/protobuf/compiler/*.proto</exclude>
                     </excludes>
                 </configuration>
             </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>u}(j*J  (fa585420cec9fefaa8dc527658305c7a3badbe5ejJ  simpleclient_dropwizard/pom.xmljJ  modifiedjJ  K jJ  K-jJ  K-jJ  yhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_dropwizard%2Fpom.xmljJ  xhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_dropwizard%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xg  @@ -63,49 +63,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>u}(j*J  (32de466b60e48f0443747cba019bab95ba5db076jJ  simpleclient_hotspot/pom.xmljJ  modifiedjJ  K jJ  K,jJ  K,jJ  vhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_hotspot%2Fpom.xmljJ  uhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_hotspot%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xe  @@ -67,48 +67,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
 </project>u}(j*J  (6c43b792c0a3d59f67e030fd22da09268ac7730fjJ  simpleclient_jetty_jdk8/pom.xmljJ  modifiedjJ  K jJ  K
jJ  K
jJ  yhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_jetty_jdk8%2Fpom.xmljJ  xhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_jetty_jdk8%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xl  @@ -16,19 +16,6 @@
         Collector of data from Jetty Statistics for Jetty versions which require JDK 8.
     </description>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j*J  (3d03b313a84b2b01b770f8a088de90a8b65b9917jJ  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljJ  modifiedjJ  K jJ  K
jJ  K
jJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j*J  (63dd95f5a823df05bccf1a1425569709f22cfd9bjJ  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  https://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljJ  https://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  Xq  @@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j*J  (3b34eb86fab8379f8b87329d480708f01006d7fdjJ  simpleclient_vertx/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  thttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_vertx%2Fpom.xmljJ  shttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_vertx%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>u}(j*J  (5c676e3a25552d478dea3514136a1597f9be86e7jJ  simpleclient_vertx4/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  uhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_vertx4%2Fpom.xmljJ  thttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/simpleclient_vertx4%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>uw      }(j*J  (f8b4c08524a0f578f431368e3f789eab132f2498jJ  tmp_example/pom.xmljJ  modifiedjJ  K jJ  KjJ  KjJ  mhttps://github.com/prometheus/client_java/blob/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/tmp_example%2Fpom.xmljJ  lhttps://github.com/prometheus/client_java/raw/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54/tmp_example%2Fpom.xmljJ  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54jJ  X  @@ -73,13 +73,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>ueu(ebd226389cf46a9a57e77ac6ccf9c7c09322273e}(sha(ebd226389cf46a9a57e77ac6ccf9c7c09322273enode_idEC_kwDOAHoJt9oAKGViZDIyNjM4OWNmNDZhOWE1N2U3N2FjNmNjZjljN2MwOTMyMjI3M2Ucommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T12:11:07Zu	committer}(jK  Fabian StäberjK  fabian@fstab.dejK  2023-06-29T12:11:07ZumessageRenamingtree}(jK  (1801fac06d729b66dc65c85d6eea1b02892762bcurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1801fac06d729b66dc65c85d6eea1b02892762bcujK  hhttps://api.github.com/repos/prometheus/client_java/git/commits/ebd226389cf46a9a57e77ac6ccf9c7c09322273e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujK  dhttps://api.github.com/repos/prometheus/client_java/commits/ebd226389cf46a9a57e77ac6ccf9c7c09322273ehtml_urlYhttps://github.com/prometheus/client_java/commit/ebd226389cf46a9a57e77ac6ccf9c7c09322273ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/commentsjK  }(loginfstabidJ' jK  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jK  "https://api.github.com/users/fstabjK  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujK  }(jK  fstabjK  J' jK  MDQ6VXNlcjMzMDUzNQ==jK  2https://avatars.githubusercontent.com/u/330535?v=4jK  h3jK  "https://api.github.com/users/fstabjK  https://github.com/fstabjK  ,https://api.github.com/users/fstab/followersjK  9https://api.github.com/users/fstab/following{/other_user}jK  2https://api.github.com/users/fstab/gists{/gist_id}jK  9https://api.github.com/users/fstab/starred{/owner}{/repo}jK  0https://api.github.com/users/fstab/subscriptionsjK  'https://api.github.com/users/fstab/orgsjK  (https://api.github.com/users/fstab/reposjK  3https://api.github.com/users/fstab/events{/privacy}jK  2https://api.github.com/users/fstab/received_eventsjK  UserjK  uparents]}(jK  (95a92120e52148f3fa2cacc0ac9fccb45f8e7193jK  dhttps://api.github.com/repos/prometheus/client_java/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193jK  Yhttps://github.com/prometheus/client_java/commit/95a92120e52148f3fa2cacc0ac9fccb45f8e7193uastats}(totalM	additionsMu	deletionsMufiles](}(jK  (060b52bce5adae651f1243512856cbbc5a491026filenameTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javastatusmodifiedjK  KjK  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaraw_urlhttps://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273epatchX1  @@ -1,14 +1,14 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Supplier;
 
-class Buffer<T extends MetricData> {
+class Buffer {
 
     private static final long signBit = 1L << 63;
     private final AtomicLong observationCount = new AtomicLong(0);
@@ -41,11 +41,11 @@ private void doAppend(double amount) {
     /**
      * Must be called by the runnable in the run() method.
      */
-    public void reset() {
+    void reset() {
         reset = true;
     }
 
-    T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
+    <T extends DataPointSnapshot> T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
         double[] buffer;
         int bufferSize;
         T result;u}(jK  (ec3ae9a06f689fb52226febe54c2d29682d2155cjK  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -17,7 +17,7 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
-public class Counter extends StatefulMetric<CounterDataPoint, Counter.CounterData> implements CounterDataPoint, Collector {
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -60,17 +60,17 @@ public void incWithExemplar(double amount, Labels labels) {
 
 
     @Override
-    protected CounterData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new CounterData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new CounterData(null);
+            return new DataPoint(null);
         }
     }
 
     @Override
-    protected CounterSnapshot collect(List<Labels> labels, List<CounterData> metricData) {
-        List<CounterSnapshot.CounterData> data = new ArrayList<>(labels.size());
+    protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<CounterSnapshot.CounterDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -97,7 +97,7 @@ private static String normalizeName(String name) {
         return name;
     }
 
-    class CounterData implements CounterDataPoint {
+    class DataPoint implements CounterDataPoint {
 
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
@@ -107,7 +107,7 @@ class CounterData implements CounterDataPoint {
         private final long createdTimeMillis = System.currentTimeMillis();
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private CounterData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -157,7 +157,7 @@ private void validateAndAdd(double amount) {
             doubleValue.add(amount);
         }
 
-        private CounterSnapshot.CounterData collect(Labels labels) {
+        private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -170,7 +170,7 @@ private CounterSnapshot.CounterData collect(Labels labels) {
                     }
                 }
             }
-            return new CounterSnapshot.CounterData(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
         }
     }
 
@@ -208,7 +208,7 @@ private FromCallback(Counter.FromCallback.Builder builder) {
 
         @Override
         public CounterSnapshot collect() {
-            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterData(
+            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterDataPointSnapshot(
                     callback.getAsDouble(),
                     constLabels,
                     null,u}(jK  (b45c4bfe601c6ee4d70bfa213c74ffb2d6c3f74djK  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajK  modifiedjK  K
jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X
  @@ -15,7 +15,7 @@
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.DoubleSupplier;
 
-public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.GaugeData> implements GaugeDataPoint {
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -57,20 +57,20 @@ public GaugeSnapshot collect() {
     }
 
     @Override
-    protected GaugeSnapshot collect(List<Labels> labels, List<GaugeData> metricData) {
-        List<GaugeSnapshot.GaugeData> data = new ArrayList<>(labels.size());
+    protected GaugeSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPointSnapshots = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(metricData.get(i).collect(labels.get(i)));
+            dataPointSnapshots.add(metricData.get(i).collect(labels.get(i)));
         }
-        return new GaugeSnapshot(getMetadata(), data);
+        return new GaugeSnapshot(getMetadata(), dataPointSnapshots);
     }
 
     @Override
-    protected GaugeData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new GaugeData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new GaugeData(null);
+            return new DataPoint(null);
         }
     }
 
@@ -79,11 +79,11 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    class GaugeData implements GaugeDataPoint {
+    class DataPoint implements GaugeDataPoint {
 
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private GaugeData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -121,7 +121,7 @@ public void setWithExemplar(double value, Labels labels) {
             }
         }
 
-        private GaugeSnapshot.GaugeData collect(Labels labels) {
+        private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -134,7 +134,7 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
                     }
                 }
             }
-            return new GaugeSnapshot.GaugeData(Double.longBitsToDouble(value.get()), labels, oldest);
+            return new GaugeSnapshot.GaugeDataPointSnapshot(Double.longBitsToDouble(value.get()), labels, oldest);
         }
     }
 
@@ -167,7 +167,7 @@ private FromCallback(Gauge.FromCallback.Builder builder) {
         @Override
         public GaugeSnapshot collect() {
             return new GaugeSnapshot(getMetadata(), Collections.singletonList(
-                    new GaugeSnapshot.GaugeData(callback.getAsDouble(), constLabels, null)
+                    new GaugeSnapshot.GaugeDataPointSnapshot(callback.getAsDouble(), constLabels, null)
             ));
         }
 u}(jK  (c3cf0d21de6adf5cabdc5eb427654aa871888e85jK  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X}  @@ -40,7 +40,7 @@
  * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
  * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
  */
-public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.HistogramData> implements DistributionDataPoint {
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.DataPoint> implements DistributionDataPoint {
 
     // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
     private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
@@ -139,7 +139,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    public class HistogramData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
         private final LongAdder[] classicBuckets;
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
@@ -149,11 +149,11 @@ public class HistogramData implements DistributionDataPoint {
         private volatile int nativeSchema = nativeInitialSchema; // integer in [-4, 8] or CLASSIC_HISTOGRAM
         private volatile double nativeZeroThreshold = Histogram.this.nativeMinZeroThreshold;
         private volatile long createdTimeMillis = System.currentTimeMillis();
-        private final Buffer<HistogramSnapshot.HistogramData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
         private volatile boolean resetDurationExpired = false;
         private final ExemplarSampler exemplarSampler;
 
-        private HistogramData() {
+        private DataPoint() {
             if (exemplarsEnabled) {
                 exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
             } else {
@@ -225,14 +225,14 @@ private void doObserve(double value, boolean fromBuffer) {
             }
         }
 
-        public HistogramSnapshot.HistogramData collect(Labels labels) {
+        public HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
             Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     () -> {
                         if (classicUpperBounds.length == 0) {
                             // native only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     nativeSchema,
                                     nativeZeroCount.sum(),
                                     nativeZeroThreshold,
@@ -244,15 +244,15 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
                                     createdTimeMillis);
                         } else if (Histogram.this.nativeInitialSchema == CLASSIC_HISTOGRAM) {
                             // classic only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     sum.sum(),
                                     labels,
                                     exemplars,
                                     createdTimeMillis);
                         } else {
                             // hybrid: classic and native
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     nativeSchema,
                                     nativeZeroCount.sum(),
@@ -567,8 +567,8 @@ public HistogramSnapshot collect() {
     }
 
     @Override
-    protected HistogramSnapshot collect(List<Labels> labels, List<HistogramData> metricData) {
-        List<HistogramSnapshot.HistogramData> data = new ArrayList<>(labels.size());
+    protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<HistogramSnapshot.HistogramDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -587,8 +587,8 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
     @Override
-    protected HistogramData newMetricData() {
-        return new HistogramData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     static {u}(jK  (42269340f42744e413e4b1cc4d7869adea1c348djK  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -30,7 +30,7 @@ public void info(Labels labels) {
 
     @Override
     public InfoSnapshot collect() {
-        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoData(labels.merge(constLabels))));
+        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoDataPointSnapshot(labels.merge(constLabels))));
     }
 
     public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {u}(jK  (467f8860b93cb348c452380a8446ae64bf756673jK  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -12,7 +12,7 @@
 import java.util.stream.Stream;
 
 // experimental
-public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.StateSetData> implements StateSetDataPoint {
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
 
     private final boolean exemplarsEnabled;
     private final String[] names;
@@ -35,17 +35,17 @@ public StateSetSnapshot collect() {
     }
 
     @Override
-    protected StateSetSnapshot collect(List<Labels> labels, List<StateSetData> metricDataList) {
-        List<StateSetSnapshot.StateSetData> data = new ArrayList<>(labels.size());
+    protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
+        List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(new StateSetSnapshot.StateSetData(names, metricDataList.get(i).values, labels.get(i)));
+            data.add(new StateSetSnapshot.StateSetDataPointSnapshot(names, metricDataList.get(i).values, labels.get(i)));
         }
         return new StateSetSnapshot(getMetadata(), data);
     }
 
     @Override
-    protected StateSetData newMetricData() {
-        return new StateSetData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -63,11 +63,11 @@ public void setFalse(String state) {
         getNoLabels().setFalse(state);
     }
 
-    class StateSetData implements StateSetDataPoint {
+    class DataPoint implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
-        private StateSetData() {
+        private DataPoint() {
         }
 
         @Overrideu}(jK  (5d4998fe80bdc45c53ab29f8797a4b0ca891aee1jK  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajK  modifiedjK  KjK  KjK  K&jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X>  @@ -27,19 +27,19 @@
  * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
  * but this has nothing to do with multi-threading.
  */
-abstract class StatefulMetric<O extends DataPoint, V extends O> extends MetricWithFixedMetadata {
+abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
     /**
      * Map from variableLabelValues to MetricData.
      */
-    private final ConcurrentHashMap<List<String>, V> data = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
 
     /**
      * Shortcut to data.get(Collections.emptyList())
      */
-    private volatile V noLabels;
+    private volatile T noLabels;
 
     protected StatefulMetric(Builder<?, ?> builder) {
         super(builder);
@@ -51,45 +51,45 @@ protected StatefulMetric(Builder<?, ?> builder) {
     /**
      * labels and metricData have the same size. labels.get(i) are the labels for metricData.get(i).
      */
-    protected abstract MetricSnapshot collect(List<Labels> labels, List<V> metricData);
+    protected abstract MetricSnapshot collect(List<Labels> labels, List<T> metricData);
 
     public MetricSnapshot collect() {
         if (labelNames.length == 0 && data.size() == 0) {
             // This is a metric without labels that has not been used yet. Initialize the data on the fly.
             withLabelValues();
         }
         List<Labels> labels = new ArrayList<>(data.size());
-        List<V> metricData = new ArrayList<>(data.size());
-        for (Map.Entry<List<String>, V> entry : data.entrySet()) {
+        List<T> metricData = new ArrayList<>(data.size());
+        for (Map.Entry<List<String>, T> entry : data.entrySet()) {
             String[] variableLabelValues = entry.getKey().toArray(new String[labelNames.length]);
             labels.add(constLabels.merge(labelNames, variableLabelValues));
             metricData.add(entry.getValue());
         }
         return collect(labels, metricData);
     }
 
-    public O withLabelValues(String... labelValues) {
+    public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
                 throw new IllegalArgumentException("The " + getClass().getSimpleName() + " was created with label names, so you must call withLabelValues() when using it.");
             } else {
                 throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }
         }
-        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData());
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
     // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }
 
-    protected abstract V newMetricData();
+    protected abstract T newDataPoint();
 
-    protected V getNoLabels() {
+    protected T getNoLabels() {
         if (noLabels == null) {
             // Note that this will throw an IllegalArgumentException if labelNames is not empty.
-            noLabels = (V) withLabelValues();
+            noLabels = (T) withLabelValues();
         }
         return noLabels;
     }
@@ -125,22 +125,6 @@ protected <T> T getConfigProperty(MetricProperties[] properties, Function<Metric
 
     protected abstract boolean isExemplarsEnabled();
 
-    /*
-    protected boolean isExemplarsEnabled() {
-        if (exemplarsEnabled != null) {
-            return exemplarsEnabled;
-        } else {
-            return DefaultExemplarConfig.isEnabledByDefault();
-        }
-    }
-     */
-
-    /*
-    protected boolean hasSpanContextSupplier() {
-        return exemplarConfig != null ? exemplarConfig.hasSpanContextSupplier() : DefaultExemplarConfig.hasSpanContextSupplier();
-    }
-     */
-
     static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;u}(jK  (2cb1440283be44ed998b037a81ebbe25fb149f6ejK  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajK  modifiedjK  K
jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -16,7 +16,7 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
-public class Summary extends StatefulMetric<DistributionDataPoint, Summary.SummaryData> implements DistributionDataPoint {
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
 
     private final boolean exemplarsEnabled;
     private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
@@ -55,17 +55,17 @@ public SummarySnapshot collect() {
     }
 
     @Override
-    protected SummarySnapshot collect(List<Labels> labels, List<SummaryData> metricData) {
-        List<SummarySnapshot.SummaryData> data = new ArrayList<>(labels.size());
+    protected SummarySnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<SummarySnapshot.SummaryDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
         return new SummarySnapshot(getMetadata(), data);
     }
 
     @Override
-    protected SummaryData newMetricData() {
-        return new SummaryData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -79,16 +79,16 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
 
-    public class SummaryData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
         private final TimeWindowQuantiles quantileValues;
-        private final Buffer<SummarySnapshot.SummaryData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
 
         private final long createdTimeMillis = System.currentTimeMillis();
 
-        private SummaryData() {
+        private DataPoint() {
             if (quantiles.size() > 0) {
                 quantileValues = new TimeWindowQuantiles(quantiles.toArray(new CKMSQuantiles.Quantile[]{}), maxAgeSeconds, ageBuckets);
             } else {
@@ -119,11 +119,11 @@ private void doObserve(double amount) {
             count.increment();
         }
 
-        public SummarySnapshot.SummaryData collect(Labels labels) {
+        public SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     // TODO Exemplars (are hard-coded as empty in the line below)
-                    () -> new SummarySnapshot.SummaryData(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
+                    () -> new SummarySnapshot.SummaryDataPointSnapshot(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
                     this::doObserve
             );
         }u}(jK  (0efa6ee4a3d203aa207aa48ea48c63f7416c9a43jK  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xg  @@ -54,7 +54,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private CounterSnapshot.CounterData getData(Counter counter, String... labels) {
+    private CounterSnapshot.CounterDataPointSnapshot getData(Counter counter, String... labels) {
         return counter.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()
@@ -140,9 +140,9 @@ public void testSnapshotComplete() {
         Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
         Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
         Assert.assertEquals(2, snapshot.getData().size());
-        Iterator<CounterSnapshot.CounterData> iter = snapshot.getData().iterator();
+        Iterator<CounterSnapshot.CounterDataPointSnapshot> iter = snapshot.getData().iterator();
         // data is ordered by labels, so 200 comes before 500
-        CounterSnapshot.CounterData data = iter.next();
+        CounterSnapshot.CounterDataPointSnapshot data = iter.next();
         Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
         Assert.assertEquals(2, data.getValue(), 0.0001);
         Assert.assertTrue(data.getCreatedTimestampMillis() >= before);u}(jK  (63f94f5ae8dc66dac36dbd97e8f9213b1d08c233jK  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -36,7 +36,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private GaugeSnapshot.GaugeData getData(Gauge gauge, String... labels) {
+    private GaugeSnapshot.GaugeDataPointSnapshot getData(Gauge gauge, String... labels) {
         return ((GaugeSnapshot) gauge.collect()).getData().stream()
                 .filter(data -> data.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jK  (3e7892b5e3207a9c34d49ad012a6b01901c3f44djK  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -77,7 +77,7 @@ private void run() throws NoSuchFieldException, IllegalAccessException {
             System.out.println("Running " + name + "...");
             for (double observation : observations) {
                 if (observation == RESET_DURATION_REACHED) {
-                    Field resetAllowed = Histogram.HistogramData.class.getDeclaredField("resetDurationExpired");
+                    Field resetAllowed = Histogram.DataPoint.class.getDeclaredField("resetDurationExpired");
                     resetAllowed.setAccessible(true);
                     resetAllowed.set(histogram.getNoLabels(), true);
                 } else {
@@ -619,14 +619,14 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
         double[] expectedUpperBounds = new double[]{0.25, 1, 4, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.5, 1, 2, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.8408964152537144, 1, 1.189207115002721, Double.MAX_VALUE, Double.POSITIVE_INFINITY};
-        Method method = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method method = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         method.setAccessible(true);
         for (int i = 0; i < indexes.length; i++) {
             Histogram histogram = Histogram.newBuilder()
                     .withName("test")
                     .withNativeInitialSchema(schemas[i])
                     .build();
-            Histogram.HistogramData histogramData = histogram.newMetricData();
+            Histogram.DataPoint histogramData = histogram.newDataPoint();
             double result = (double) method.invoke(histogramData, schemas[i], indexes[i]);
             Assert.assertEquals("index=" + indexes[i] + ", schema=" + schemas[i], expectedUpperBounds[i], result, 0.0000000000001);
         }
@@ -638,8 +638,8 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
     @Test
     public void testFindBucketIndex() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
         Random rand = new Random();
-        Method findBucketIndex = Histogram.HistogramData.class.getDeclaredMethod("findBucketIndex", double.class);
-        Method nativeBucketIndexToUpperBound = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method findBucketIndex = Histogram.DataPoint.class.getDeclaredMethod("findBucketIndex", double.class);
+        Method nativeBucketIndexToUpperBound = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         findBucketIndex.setAccessible(true);
         nativeBucketIndexToUpperBound.setAccessible(true);
         for (int schema = -4; schema <= 8; schema++) {
@@ -849,7 +849,7 @@ public void markCurrentSpanAsExemplar() {
     }
 
     private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... labels) {
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("Labels not found"));
@@ -907,7 +907,7 @@ private void assertExemplar(Histogram histogram, double value, String... labels)
         double lowerBound = Double.NEGATIVE_INFINITY;
         double upperBound = Double.POSITIVE_INFINITY;
         HistogramSnapshot snapshot = histogram.collect();
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().isEmpty())
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("No data without labels found"));
@@ -1217,8 +1217,8 @@ public void testObserveWithLabels() {
         histogram.withLabelValues("/hello", "200").observe(0.11);
         histogram.withLabelValues("/hello", "200").observe(0.2);
         histogram.withLabelValues("/hello", "500").observe(0.19);
-        HistogramSnapshot.HistogramData data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
-        HistogramSnapshot.HistogramData data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        HistogramSnapshot.HistogramDataPointSnapshot data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        HistogramSnapshot.HistogramDataPointSnapshot data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
         assertEquals(2, data200.getCount());
         assertEquals(0.31, data200.getSum(), 0.0000001);
         assertEquals(1, data500.getCount());
@@ -1265,7 +1265,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
             long count = 0;
             for (HistogramSnapshot snapshot : snapshots) {
                 Assert.assertEquals(1, snapshot.getData().size());
-                HistogramSnapshot.HistogramData data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
+                HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
                 Assert.assertTrue(data.getCount() >= (count + 1000)); // 1000 own observations plus the ones from other threads
                 count = data.getCount();
             }
@@ -1280,7 +1280,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
     }
 
 
-    private HistogramSnapshot.HistogramData getData(Histogram histogram, String... labels) {
+    private HistogramSnapshot.HistogramDataPointSnapshot getData(Histogram histogram, String... labels) {
         return histogram.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jK  (13fb887127d0488299efae10bce027c7f7b1822djK  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X(  @@ -14,7 +14,7 @@ public void testIncrement() {
         InfoSnapshot snapshot = info.collect();
         Assert.assertEquals("target", snapshot.getMetadata().getName());
         Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoData data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
+        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
         Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
     }
 }u}(jK  (1babd430cd9fc54a09561e9adcfb9db80c452152jK  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -61,7 +61,7 @@ public void testDefaultFalse() {
         Assert.assertFalse(getData(stateSet).isTrue(2));
     }
 
-    private StateSetSnapshot.StateSetData getData(StateSet stateSet, String... labels) {
+    private StateSetSnapshot.StateSetDataPointSnapshot getData(StateSet stateSet, String... labels) {
         return stateSet.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(jK  (6cd75ddccc2da47e94051e4f413e7651a46ef63djK  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.DistributionData;
+import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -86,7 +86,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
-        for (CounterSnapshot.CounterData data : snapshot.getData()) {
+        for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -97,7 +97,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -115,8 +115,8 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramData> dataList) throws IOException {
-        for (HistogramSnapshot.HistogramData data : dataList) {
+    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramDataPointSnapshot> dataList) throws IOException {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : dataList) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             Exemplars exemplars = data.getExemplars();
             long cumulativeCount = 0;
@@ -142,7 +142,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -156,7 +156,7 @@ private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDat
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -188,7 +188,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
@@ -198,7 +198,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "stateset", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -231,14 +231,14 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
         }
     }
 
-    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionData data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
+    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
             writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
@@ -261,7 +261,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
         }
     }
 
-    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, MetricData data) throws IOException {
+    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
             writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
@@ -289,7 +289,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
         writer.write(' ');
     }
 
-    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, MetricData data, Exemplar exemplar) throws IOException {
+    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPointSnapshot data, Exemplar exemplar) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(jK  (e1b566ee48ced2a7363e76a1a78022c27ce84226jK  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajK  modifiedjK  KjK  KjK  K"jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X!  @@ -3,13 +3,13 @@
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -61,43 +61,43 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         Metrics.MetricFamily.Builder builder = Metrics.MetricFamily.newBuilder();
         if (snapshot instanceof CounterSnapshot) {
-            for (CounterData data : ((CounterSnapshot) snapshot).getData()) {
+            for (CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_total", Metrics.MetricType.COUNTER);
         } else if (snapshot instanceof GaugeSnapshot) {
-            for (GaugeSnapshot.GaugeData data : ((GaugeSnapshot) snapshot).getData()) {
+            for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof HistogramSnapshot) {
             HistogramSnapshot histogram = (HistogramSnapshot) snapshot;
-            for (HistogramSnapshot.HistogramData data : histogram.getData()) {
+            for (HistogramSnapshot.HistogramDataPointSnapshot data : histogram.getData()) {
                 builder.addMetric(convert(data));
             }
             Metrics.MetricType type = histogram.isGaugeHistogram() ? Metrics.MetricType.GAUGE_HISTOGRAM : Metrics.MetricType.HISTOGRAM;
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, type);
         } else if (snapshot instanceof SummarySnapshot) {
-            for (SummarySnapshot.SummaryData data : ((SummarySnapshot) snapshot).getData()) {
+            for (SummarySnapshot.SummaryDataPointSnapshot data : ((SummarySnapshot) snapshot).getData()) {
                 if (data.hasCount() || data.hasSum() || data.getQuantiles().size() > 0) {
                     builder.addMetric(convert(data));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.SUMMARY);
         } else if (snapshot instanceof InfoSnapshot) {
-            for (InfoSnapshot.InfoData data : ((InfoSnapshot) snapshot).getData()) {
+            for (InfoSnapshot.InfoDataPointSnapshot data : ((InfoSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_info", Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof StateSetSnapshot) {
-            for (StateSetSnapshot.StateSetData data : ((StateSetSnapshot) snapshot).getData()) {
+            for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
                     builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof UnknownSnapshot) {
-            for (UnknownSnapshot.UnknownData data : ((UnknownSnapshot) snapshot).getData()) {
+            for (UnknownSnapshot.UnknownDataPointSnapshot data : ((UnknownSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.UNTYPED);
@@ -120,7 +120,7 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
         builder.setType(type);
     }
 
-    private Metrics.Metric.Builder convert(CounterData data) {
+    private Metrics.Metric.Builder convert(CounterDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Counter.Builder counterBuilder = Metrics.Counter.newBuilder();
         counterBuilder.setValue(data.getValue());
@@ -133,7 +133,7 @@ private Metrics.Metric.Builder convert(CounterData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
+    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(data.getValue());
@@ -143,7 +143,7 @@ private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramData data) {
+    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
         if (data.hasClassicHistogramData()) {
@@ -232,7 +232,7 @@ private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistog
         }
     }
 
-    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
+    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Summary.Builder summaryBuilder = Metrics.Summary.newBuilder();
         if (data.hasCount()) {
@@ -254,7 +254,7 @@ private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
+    private Metrics.Metric.Builder convert(InfoSnapshot.InfoDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(1);
@@ -264,7 +264,7 @@ private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, String name, int i) {
+    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetDataPointSnapshot data, String name, int i) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         addLabels(metricBuilder, data.getLabels());
@@ -282,7 +282,7 @@ private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, Strin
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownData data) {
+    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Untyped.Builder untypedBuilder = Metrics.Untyped.newBuilder();
         untypedBuilder.setValue(data.getValue());
@@ -319,7 +319,7 @@ private Metrics.Exemplar.Builder convert(Exemplar exemplar) {
         return builder;
     }
 
-    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, MetricData data) {
+    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, DataPointSnapshot data) {
         if (data.hasScrapeTimestamp()) {
             metricBuilder.setTimestampMs(data.getScrapeTimestampMillis());
         }u}(jK  (d80b90f630755080dfc7ec6015ea67252fa1e4c7jK  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajK  modifiedjK  K
jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java     jK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -6,7 +6,7 @@
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -96,7 +96,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) throws IOException {
             boolean metadataWritten = false;
             MetricMetadata metadata = snapshot.getMetadata();
-            for (MetricData data : snapshot.getData()) {
+            for (DataPointSnapshot data : snapshot.getData()) {
                 if (data.hasCreatedTimestamp()) {
                     if (!metadataWritten) {
                         writeMetadata(writer, "_created", "gauge", metadata);
@@ -114,7 +114,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         if (snapshot.getData().size() > 0) {
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
-            for (CounterSnapshot.CounterData data : snapshot.getData()) {
+            for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
                 writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
@@ -125,7 +125,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -135,7 +135,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
     private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "histogram", metadata);
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
@@ -162,7 +162,7 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -177,7 +177,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
         // Prometheus text format does not support gaugehistogram's _gcount and _gsum.
         // So we append _gcount and _gsum as gauge metrics.
         boolean metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasCount()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gcount", "gauge", metadata);
@@ -189,7 +189,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
             }
         }
         metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasSum()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gsum", "gauge", metadata);
@@ -205,7 +205,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -234,7 +234,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
@@ -244,7 +244,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -277,7 +277,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -337,7 +337,7 @@ private void writeEscapedHelp(Writer writer, String s) throws IOException {
         }
     }
 
-    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, MetricData data) throws IOException {
+    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, DataPointSnapshot data) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(jK  (13001720a04a50212f9bd53d10fdfd6ff399fff7jK  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajK  modifiedjK  K(jK  K(jK  KPjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X*N  @@ -3,12 +3,12 @@
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
@@ -18,10 +18,10 @@
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryData;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
-import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownData;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -133,7 +133,7 @@ public void testCounterComplete() throws IOException {
                 .withName("service_time_seconds")
                 .withHelp("total time spent serving")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.8)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -143,7 +143,7 @@ public void testCounterComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.9)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -174,7 +174,7 @@ public void testCounterMinimal() throws IOException {
                 "name: \"my_counter_total\" type: COUNTER metric { counter { value: 1.1 } }";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_counter")
-                .addCounterData(CounterData.newBuilder().withValue(1.1).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.1).build())
                 .build();
         assertOpenMetricsText(openMetricsText, counter);
         assertPrometheusText(prometheusText, counter);
@@ -216,15 +216,15 @@ public void testGaugeComplete() throws IOException {
                 .withName("disk_usage_ratio")
                 .withHelp("percentage used")
                 .withUnit(new Unit("ratio"))
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda2")
                                 .build())
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda1")
@@ -253,7 +253,7 @@ public void testGaugeMinimal() throws IOException {
                 "name: \"temperature_centigrade\" type: GAUGE metric { gauge { value: 22.3 } }";
         GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
                 .withName("temperature_centigrade")
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -359,7 +359,7 @@ public void testSummaryComplete() throws IOException {
                 .withName("http_request_duration_seconds")
                 .withHelp("request duration")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(7)
                         .withSum(2.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -374,7 +374,7 @@ public void testSummaryComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -427,7 +427,7 @@ public void testSummaryWithoutQuantiles() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .build())
@@ -460,7 +460,7 @@ public void testSummaryNoCountAndSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withQuantiles(Quantiles.newBuilder().addQuantile(0.95, 200.0).build())
                         .build())
                 .build();
@@ -492,7 +492,7 @@ public void testSummaryJustCount() throws IOException {
         //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(1)
                         .build())
                 .build();
@@ -524,7 +524,7 @@ public void testSummaryJustSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withSum(12.3)
                         .build())
                 .build();
@@ -543,7 +543,7 @@ public void testSummaryEmptyData() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder().build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder().build())
                 .build();
         assertOpenMetricsText("# EOF\n", summary);
         assertPrometheusText("", summary);
@@ -577,15 +577,15 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v1"))
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v2"))
                         .withCount(2)
                         .withSum(10.7)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v3"))
                         .build())
                 .build();
@@ -702,7 +702,7 @@ public void testClassicHistogramComplete() throws Exception {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(0.0, 3)
@@ -714,7 +714,7 @@ public void testClassicHistogramComplete() throws Exception {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.1)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.2, 2)
@@ -761,7 +761,7 @@ public void testClassicHistogramMinimal() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
                                 .build())
@@ -804,7 +804,7 @@ public void testClassicHistogramCountAndSum() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
@@ -926,7 +926,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                 .withName("cache_size_bytes")
                 .withHelp("number of bytes in the cache")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(17)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 3)
@@ -937,7 +937,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(18)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 4)
@@ -987,7 +987,7 @@ public void testClassicGaugeHistogramMinimal() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
                                 .build())
@@ -1033,7 +1033,7 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(27000)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
@@ -1155,7 +1155,7 @@ public void testNativeHistogramComplete() throws IOException {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withNativeSchema(5)
                         .withNativeZeroCount(1)
@@ -1189,7 +1189,7 @@ public void testNativeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.2)
                         .withNativeSchema(5)
                         .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
@@ -1233,7 +1233,7 @@ public void testNativeHistogramMinimal() throws IOException {
                 //@formatter:on
         HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
@@ -1258,7 +1258,7 @@ public void testInfo() throws IOException {
         InfoSnapshot info = InfoSnapshot.newBuilder()
                 .withName("version")
                 .withHelp("version information")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("version", "1.2.3"))
                         .build())
                 .build();
@@ -1288,13 +1288,13 @@ public void testStateSetComplete() throws IOException {
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
                 .withHelp("complete state set example")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "prod"))
                         .addState("state1", false)
                         .addState("state2", true)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "dev"))
                         .addState("state2", false)
                         .addState("state1", true)
@@ -1320,7 +1320,7 @@ public void testStateSetMinimal() throws IOException {
                 "state{state=\"bb\"} 0\n";
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("a", true)
                         .addState("bb", false)
                         .build())
@@ -1349,13 +1349,13 @@ public void testUnknownComplete() throws IOException {
                 .withName("my_special_thing_bytes")
                 .withHelp("help message")
                 .withUnit(Unit.BYTES)
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.of("env", "prod"))
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.of("env", "dev"))
                         .withExemplar(exemplar1)
@@ -1379,7 +1379,7 @@ public void testUnknownMinimal() throws IOException {
                 "other 22.3\n";
         UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
                 .withName("other")
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -1403,7 +1403,7 @@ public void testHelpEscape() throws IOException {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
                 .withHelp("Some text and \n some \" escaping") // example from https://openMetrics.io
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         assertOpenMetricsText(openMetrics, counter);
         assertPrometheusText(prometheus, counter);
@@ -1422,7 +1422,7 @@ public void testLabelValueEscape() throws IOException {
                 "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         // example from https://openMetrics.io
                         .withLabels(Labels.of("a", "x", "b", "escaping\" example \n "))
                         .withValue(1.0)u}(jK  (e994e951357da20776fd49fd0f3f5decf502c078jK  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X2  @@ -17,23 +17,23 @@ public class CounterSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public CounterSnapshot(MetricMetadata metadata, Collection<CounterData> data) {
+    public CounterSnapshot(MetricMetadata metadata, Collection<CounterDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<CounterData> getData() {
-        return (List<CounterData>) data;
+    public List<CounterDataPointSnapshot> getData() {
+        return (List<CounterDataPointSnapshot>) data;
     }
 
-    public static class CounterData extends MetricData {
+    public static class CounterDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link CounterData}, you can either call the constructor directly or use the
-         * Builder with {@link CounterData#newBuilder()}.
+         * To create a new {@link CounterDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link CounterDataPointSnapshot#newBuilder()}.
          *
          * @param value                  the counter value. Must not be negative.
          * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
@@ -42,7 +42,7 @@ public static class CounterData extends MetricData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
             this(value, labels, exemplar, createdTimestampMillis, 0);
         }
 
@@ -51,7 +51,7 @@ public CounterData(double value, Labels labels, Exemplar exemplar, long createdT
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(labels, createdTimestampMillis, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -75,7 +75,7 @@ protected void validate() {
             }
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -102,11 +102,11 @@ public Builder withCreatedTimestampMillis(long createdTimestampMillis) {
                 return this;
             }
 
-            public CounterData build() {
+            public CounterDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new CounterData(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
+                return new CounterDataPointSnapshot(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
             }
 
             @Override
@@ -122,18 +122,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<CounterData> counterData = new ArrayList<>();
+        private final List<CounterDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addCounterData(CounterData data) {
-            counterData.add(data);
+        public Builder addDataPoint(CounterDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public CounterSnapshot build() {
-            return new CounterSnapshot(buildMetadata(), counterData);
+            return new CounterSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (0ccd0b4c081713690c259a1093d232baf8675688jK  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DataPointSnapshot.javajK  renamedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xx  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-public abstract class MetricData {
+abstract class DataPointSnapshot {
     private final Labels labels;
     private final long createdTimestampMillis;
     private final long scrapeTimestampMillis;
 
-    protected MetricData(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         this.labels = labels;
         this.createdTimestampMillis = createdTimestampMillis;
         this.scrapeTimestampMillis = scrapeTimestampMillis;previous_filename\prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricData.javau}(jK  (d31427bf4d508fcd7610640ec4cb234d423d9f10jK  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javajK  renamedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xi  @@ -5,15 +5,15 @@
  * Histograms and Summaries represent distributions, like a latency distribution or a distribution
  * of request sizes in Bytes.
  */
-public abstract class DistributionData extends MetricData {
+abstract class DistributionDataPointSnapshot extends DataPointSnapshot {
     private final long count; // optional, negative value means no count.
     private final double sum; // optional, Double.NaN means no sum.
     private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.
 
     /**
      * See JavaDoc of the child classes.
      */
-    protected DistributionData(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         super(labels, createdTimestampMillis, scrapeTimestampMillis);
         this.count = count;
         this.sum = sum;
@@ -58,7 +58,7 @@ public Exemplars getExemplars() {
         return exemplars;
     }
 
-    public static abstract class Builder<T extends Builder<T>> extends MetricData.Builder<T> {
+    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {
 
         protected long count = -1;
         protected double sum = Double.NaN;jL  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionData.javau}(jK  (54c033d3446b3a08aba32e148fbe212295210a05jK  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -16,29 +16,29 @@ public final class GaugeSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeData> data) {
+    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<GaugeData> getData() {
-        return (List<GaugeData>) data;
+    public List<GaugeDataPointSnapshot> getData() {
+        return (List<GaugeDataPointSnapshot>) data;
     }
 
-    public static final class GaugeData extends MetricData {
+    public static final class GaugeDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link GaugeData}, you can either call the constructor directly or use the
-         * Builder with {@link GaugeData#newBuilder()}.
+         * To create a new {@link GaugeDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link GaugeDataPointSnapshot#newBuilder()}.
          *
          * @param value    the gauge value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, labels, exemplar, 0);
         }
 
@@ -47,7 +47,7 @@ public GaugeData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -64,7 +64,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -88,11 +88,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public GaugeData build() {
+            public GaugeDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new GaugeData(value, labels, exemplar, scrapeTimestampMillis);
+                return new GaugeDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -108,18 +108,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<GaugeData> gaugeData = new ArrayList<>();
+        private final List<GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addGaugeData(GaugeData data) {
-            gaugeData.add(data);
+        public Builder addDataPoint(GaugeDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public GaugeSnapshot build() {
-            return new GaugeSnapshot(buildMetadata(), gaugeData);
+            return new GaugeSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (860b291c7fb65b8bb730cd4b8af049df89ab350djK  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javajK  modifiedjK  KjK  KjK  K&jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -19,7 +19,7 @@ public final class HistogramSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         this(false, metadata, data);
     }
 
@@ -29,7 +29,7 @@ public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data
      * are semantically gauges and not counters.
      * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
      */
-    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         super(metadata, data);
         this.gaugeHistogram = isGaugeHistogram;
     }
@@ -39,11 +39,11 @@ public boolean isGaugeHistogram() {
     }
 
     @Override
-    public List<HistogramData> getData() {
-        return (List<HistogramData>) data;
+    public List<HistogramDataPointSnapshot> getData() {
+        return (List<HistogramDataPointSnapshot>) data;
     }
 
-    public static final class HistogramData extends DistributionData {
+    public static final class HistogramDataPointSnapshot extends DistributionDataPointSnapshot {
 
         // There are two types of histograms: Classic histograms and native histograms.
         // Classic histograms have a fixed set of buckets.
@@ -68,7 +68,7 @@ public static final class HistogramData extends DistributionData {
         /**
          * Constructor for classic histograms (as opposed to native histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets         required. Must not be empty. Must at least contain the +Inf bucket.
@@ -79,7 +79,7 @@ public static final class HistogramData extends DistributionData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 double sum,
                 Labels labels,
@@ -91,7 +91,7 @@ public HistogramData(
         /**
          * Constructor for native histograms (as opposed to classic histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
@@ -108,7 +108,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 int nativeSchema,
                 long nativeZeroCount,
                 double nativeZeroThreshold,
@@ -124,7 +124,7 @@ public HistogramData(
         /**
          * Constructor for a histogram with both, classic and native data.
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets                 required. Must not be empty. Must at least contain the +Inf bucket.
@@ -142,7 +142,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -161,7 +161,7 @@ public HistogramData(
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -298,7 +298,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private ClassicHistogramBuckets classicHistogramBuckets = ClassicHistogramBuckets.EMPTY;
             private int nativeSchema = CLASSIC_HISTOGRAM;
@@ -345,11 +345,11 @@ public Builder withNativeBucketsForNegativeValues(NativeHistogramBuckets buckets
                 return this;
             }
 
-            public HistogramData build() {
+            public HistogramDataPointSnapshot build() {
                 if (nativeSchema == CLASSIC_HISTOGRAM && classicHistogramBuckets.isEmpty()) {
                     throw new IllegalArgumentException("One of nativeSchema and classicHistogramBuckets is required.");
                 }
-                return new HistogramData(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+                return new HistogramDataPointSnapshot(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -360,14 +360,14 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<HistogramData> histogramData = new ArrayList<>();
+        private final List<HistogramDataPointSnapshot> dataPoints = new ArrayList<>();
         private boolean isGaugeHistogram = false;
 
         private Builder() {
         }
 
-        public Builder addData(HistogramData data) {
-            histogramData.add(data);
+        public Builder addDataPoint(HistogramDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -382,7 +382,7 @@ public Builder asGaugeHistogram() {
         }
 
         public HistogramSnapshot build() {
-            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), histogramData);
+            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (b49e0d1218825153dfc81322aded933ad9b73ce4jK  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xk
  @@ -18,7 +18,7 @@ public final class InfoSnapshot extends MetricSnapshot {
      *                 The metadata must not have a unit.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
+    public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
         if (metadata.getName().endsWith("_info")) {
             throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
@@ -29,19 +29,19 @@ public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
     }
 
     @Override
-    public List<InfoData> getData() {
-        return (List<InfoData>) data;
+    public List<InfoDataPointSnapshot> getData() {
+        return (List<InfoDataPointSnapshot>) data;
     }
 
-    public static class InfoData extends MetricData {
+    public static class InfoDataPointSnapshot extends DataPointSnapshot {
 
         /**
-         * To create a new {@link InfoData}, you can either call the constructor directly or use the
-         * Builder with {@link InfoData#newBuilder()}.
+         * To create a new {@link InfoDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link InfoDataPointSnapshot#newBuilder()}.
          *
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public InfoData(Labels labels) {
+        public InfoDataPointSnapshot(Labels labels) {
             this(labels, 0L);
         }
 
@@ -50,14 +50,14 @@ public InfoData(Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public InfoData(Labels labels, long scrapeTimestampMillis) {
+        public InfoDataPointSnapshot(Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
-            public InfoData build() {
-                return new InfoData(labels, scrapeTimestampMillis);
+            public InfoDataPointSnapshot build() {
+                return new InfoDataPointSnapshot(labels, scrapeTimestampMillis);
             }
 
             @Override
@@ -73,13 +73,13 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<InfoData> infoData = new ArrayList<>();
+        private final List<InfoDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addInfoData(InfoData data) {
-            infoData.add(data);
+        public Builder addDataPoint(InfoDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -89,7 +89,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public InfoSnapshot build() {
-            return new InfoSnapshot(buildMetadata(), infoData);
+            return new InfoSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (5108c3bd041c3dd2d07541d5b3946adc2f06876djK  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -13,19 +13,19 @@
 public abstract class MetricSnapshot {
 
     private final MetricMetadata metadata;
-    protected final List<? extends MetricData> data;
+    protected final List<? extends DataPointSnapshot> data;
 
-    protected MetricSnapshot(MetricMetadata metadata, MetricData... data) {
+    protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
         this(metadata, Arrays.asList(data));
     }
 
-    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends MetricData> data) {
+    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
         this.metadata = metadata;
         if (data == null) {
             throw new NullPointerException();
         }
-        List<? extends MetricData> dataCopy = new ArrayList<>(data);
-        dataCopy.sort(Comparator.comparing(MetricData::getLabels));
+        List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
+        dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);
         validateLabels();
     }
@@ -34,7 +34,7 @@ public MetricMetadata getMetadata() {
         return metadata;
     }
 
-    public abstract List<? extends MetricData> getData();
+    public abstract List<? extends DataPointSnapshot> getData();
 
     protected void validateLabels() {
         // Verify that labels are unique (the same set of names/values must not be used multiple times for the same metric).u}(jK  (6e0890a99df4df0c495911237516bc2a76a7c76ejK  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -11,7 +11,7 @@
  * Immutable representation of native histogram buckets.
  * <p>
  * The bucket index defines the boundaries of the bucket,
- * depending on the histogram's {@link HistogramSnapshot.HistogramData#getNativeSchema() schema}.
+ * depending on the histogram's {@link HistogramSnapshot.HistogramDataPointSnapshot#getNativeSchema() schema}.
  * <pre>
  *     base = 2^(2^-schema)
  *     lower bound = base^(index - 1)u}(jK  (4cad4ac1111b1e1cc47948d9497463b74f194309jK  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajK  modifiedjK  KjK  KjK  K jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -20,7 +20,7 @@ public final class StateSetSnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetData> data) {
+    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetDataPointSnapshot> data) {
         super(metadata, data);
         validate();
     }
@@ -29,34 +29,34 @@ private void validate() {
         if (getMetadata().hasUnit()) {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
-        for (StateSetData entry : getData()) {
+        for (StateSetDataPointSnapshot entry : getData()) {
             if (entry.getLabels().contains(getMetadata().getName())) {
                 throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
             }
         }
     }
 
     @Override
-    public List<StateSetData> getData() {
-        return (List<StateSetData>) data;
+    public List<StateSetDataPointSnapshot> getData() {
+        return (List<StateSetDataPointSnapshot>) data;
     }
 
 
-    public static class StateSetData extends MetricData implements Iterable<State> {
+    public static class StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<State> {
         private final String[] names;
         private final boolean[] values;
 
         /**
-         * To create a new {@link StateSetData}, you can either call the constructor directly or use the
-         * Builder with {@link StateSetData#newBuilder()}.
+         * To create a new {@link StateSetDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link StateSetDataPointSnapshot#newBuilder()}.
          *
          * @param names  state names. Must have at least 1 entry.
          *               The constructor will create a copy of the array.
          * @param values state values. Must have the same length as {@code names}.
          *               The constructor will create a copy of the array.
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels) {
             this(names, values, labels, 0L);
         }
 
@@ -65,7 +65,7 @@ public StateSetData(String[] names, boolean[] values, Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             if (names.length == 0) {
                 throw new IllegalArgumentException("StateSet must have at least one state.");
@@ -142,7 +142,7 @@ private static void swap(int i, int j, String[] names, boolean[] values) {
             values[i] = tmpValue;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private final ArrayList<String> names = new ArrayList<>();
             private final ArrayList<Boolean> values = new ArrayList<>();
@@ -160,12 +160,12 @@ protected Builder self() {
                 return this;
             }
 
-            public StateSetData build() {
+            public StateSetDataPointSnapshot build() {
                 boolean[] valuesArray = new boolean[values.size()];
                 for (int i = 0; i < values.size(); i++) {
                     valuesArray[i] = values.get(i);
                 }
-                return new StateSetData(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
+                return new StateSetDataPointSnapshot(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
             }
         }
 
@@ -194,13 +194,13 @@ public boolean isTrue() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<StateSetData> stateSetData = new ArrayList<>();
+        private final List<StateSetDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addStateSetData(StateSetData data) {
-            stateSetData.add(data);
+        public Builder addDataPoint(StateSetDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -210,7 +210,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public StateSetSnapshot build() {
-            return new StateSetSnapshot(buildMetadata(), stateSetData);
+            return new StateSetSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideup     }(jK  (cf84162a7b8690e761080f346b559d497479760cjK  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X<  @@ -16,23 +16,23 @@ public final class SummarySnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryData> data) {
+    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<SummaryData> getData() {
-        return (List<SummaryData>) data;
+    public List<SummaryDataPointSnapshot> getData() {
+        return (List<SummaryDataPointSnapshot>) data;
     }
 
-    public static final class SummaryData extends DistributionData {
+    public static final class SummaryDataPointSnapshot extends DistributionDataPointSnapshot {
 
         private final Quantiles quantiles;
 
 
         /**
-         * To create a new {@link SummaryData}, you can either call the constructor directly
-         * or use the Builder with {@link SummaryData#newBuilder()}.
+         * To create a new {@link SummaryDataPointSnapshot}, you can either call the constructor directly
+         * or use the Builder with {@link SummaryDataPointSnapshot#newBuilder()}.
          *
          * @param count                  total number of observations. Optional, pass -1 if not available.
          * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
@@ -45,7 +45,7 @@ public static final class SummaryData extends DistributionData {
          *                               not the creation of the snapshot.
          *                               The created timestamp optional. Use {@code 0L} if there is no created timestamp.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
             this(count, sum, quantiles, labels, exemplars, createdTimestampMillis, 0);
         }
 
@@ -54,7 +54,7 @@ public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, E
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(count, sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
             this.quantiles = quantiles;
             validate();
@@ -75,7 +75,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private Quantiles quantiles = Quantiles.EMPTY;
 
@@ -98,8 +98,8 @@ public Builder withCount(long count) {
                 return this;
             }
 
-            public SummaryData build() {
-                return new SummaryData(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            public SummaryDataPointSnapshot build() {
+                return new SummaryDataPointSnapshot(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -110,18 +110,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<SummaryData> summaryData = new ArrayList<>();
+        private final List<SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addSummaryData(SummaryData data) {
-            summaryData.add(data);
+        public Builder addDataPoint(SummaryDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public SummarySnapshot build() {
-            return new SummarySnapshot(buildMetadata(), summaryData);
+            return new SummarySnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (34735823be44bc387de912e87d582771794decfajK  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X8  @@ -17,29 +17,29 @@ public final class UnknownSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownData> data) {
+    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<UnknownData> getData() {
-        return (List<UnknownData>) data;
+    public List<UnknownDataPointSnapshot> getData() {
+        return (List<UnknownDataPointSnapshot>) data;
     }
 
-    public static final class UnknownData extends MetricData {
+    public static final class UnknownDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link UnknownData}, you can either call the constructor directly or use the
-         * Builder with {@link UnknownData#newBuilder()}.
+         * To create a new {@link UnknownDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link UnknownDataPointSnapshot#newBuilder()}.
          *
          * @param value    the value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, Labels.EMPTY, exemplar, 0);
         }
 
@@ -48,7 +48,7 @@ public UnknownData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -65,7 +65,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -89,11 +89,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public UnknownData build() {
+            public UnknownDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new UnknownData(value, labels, exemplar, scrapeTimestampMillis);
+                return new UnknownDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -109,18 +109,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<UnknownData> unknownData = new ArrayList<>();
+        private final List<UnknownDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addUnknownData(UnknownData data) {
-            unknownData.add(data);
+        public Builder addDataPoint(UnknownDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public UnknownSnapshot build() {
-            return new UnknownSnapshot(buildMetadata(), unknownData);
+            return new UnknownSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(jK  (4f2b2d75d287ccd7ba8b82c4cae985338a6f55aejK  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javajK  modifiedjK  K
jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -18,7 +18,7 @@ public void testCompleteGoodCase() {
                 .withName("http_server_requests_seconds")
                 .withHelp("total time spent serving requests")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(3.0)
@@ -31,7 +31,7 @@ public void testCompleteGoodCase() {
                                 .build())
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .build()
-                ).addCounterData(CounterData.newBuilder()
+                ).addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(2.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(4.0)
@@ -48,7 +48,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "http_server_requests_seconds", "total time spent serving requests", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        CounterDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("path", "/hello"), data.getLabels());
         Assert.assertEquals(2.0, data.getValue(), 0.0);
         Assert.assertEquals(4.0, data.getExemplar().getValue(), 0.0);
@@ -66,11 +66,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "events", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0);
+        CounterDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(1.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -91,17 +91,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
                 .build();
-        Iterator<CounterSnapshot.CounterData> iterator = snapshot.getData().iterator();
+        Iterator<CounterDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jK  (20a094a236ec5589bc0f928619b559353987a6f0jK  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("cache_size_bytes")
                 .withHelp("cache size in Bytes")
                 .withUnit(Unit.BYTES)
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(1024.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(1024.0)
@@ -28,7 +28,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addGaugeData(GaugeData.newBuilder()
+                ).addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(128.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(128.0)
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "cache_size_bytes", "cache size in Bytes", "bytes");
         Assert.assertEquals(2, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        GaugeDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("env", "dev"), data.getLabels());
         Assert.assertEquals(128.0, data.getValue(), 0.0);
         Assert.assertEquals(128.0, data.getExemplar().getValue(), 0.0);
@@ -62,11 +62,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("temperature")
-                .addGaugeData(GaugeData.newBuilder().withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withValue(23.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "temperature", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0);
+        GaugeDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(23.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -89,17 +89,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("gauge")
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
                 .build();
-        Iterator<GaugeSnapshot.GaugeData> iterator = snapshot.getData().iterator();
+        Iterator<GaugeDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jK  (9dc21a2358170bab952c996021e109e66e161618jK  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javajK  modifiedjK  KjK  KjK  K&jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramData;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -25,8 +25,8 @@ public void testGoodCaseComplete() {
                 .withName("request_size_bytes")
                 .withHelp("request sizes in bytes")
                 .withUnit(Unit.BYTES)
-                .addData(
-                        HistogramData.newBuilder()
+                .addDataPoint(
+                        HistogramDataPointSnapshot.newBuilder()
                                 .withSum(27000.0)
                                 .withNativeSchema(5)
                                 .withNativeZeroCount(2)
@@ -54,7 +54,7 @@ public void testGoodCaseComplete() {
                                 .withCreatedTimestampMillis(createdTimestamp)
                                 .withScrapeTimestampMillis(scrapeTimestamp)
                                 .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withCount(3) // TODO how is that not a compile error? This is a protected method!
                                 .withSum(400.2)
                         .withNativeSchema(5)
@@ -77,7 +77,7 @@ public void testGoodCaseComplete() {
         SnapshotTestUtil.assertMetadata(snapshot, "request_size_bytes", "request sizes in bytes", "bytes");
 
         Assert.assertEquals(2, snapshot.getData().size());
-        HistogramData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
+        HistogramDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
         Assert.assertTrue(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertTrue(data.hasCreatedTimestamp());
@@ -166,11 +166,11 @@ public void testEmptyHistogram() {
     public void testMinimalClassicHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("minimal_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertEquals(1, snapshot.getData().get(0).getClassicBuckets().size());
     }
@@ -179,14 +179,14 @@ public void testMinimalClassicHistogram() {
     public void testMinimalNativeHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("hist")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
         Assert.assertEquals("hist", snapshot.getMetadata().getName());
         Assert.assertFalse(snapshot.getMetadata().hasUnit());
         Assert.assertEquals(1, snapshot.getData().size());
-        HistogramSnapshot.HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasCreatedTimestamp());
         Assert.assertFalse(data.hasScrapeTimestamp());
         Assert.assertTrue(data.hasCount());
@@ -200,15 +200,15 @@ public void testMinimalNativeHistogram() {
     public void testClassicCount() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(1.0, 3)
                                 .addBucket(2.0, 2)
                                 .addBucket(Double.POSITIVE_INFINITY, 0)
                                 .build())
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(5, data.getCount());
@@ -217,12 +217,12 @@ public void testClassicCount() {
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyData() {
         // This will fail because one of nativeSchema and classicHistogramBuckets is required
-        HistogramData.newBuilder().build();
+        HistogramDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testEmptyNativeData() {
-        HistogramSnapshot.HistogramData data = HistogramSnapshot.HistogramData.newBuilder()
+        HistogramDataPointSnapshot data = HistogramDataPointSnapshot.newBuilder()
                 .withNativeSchema(5)
                 .build();
         Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
@@ -233,28 +233,28 @@ public void testEmptyNativeData() {
     public void testDataImmutable() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "a"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "b"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{2}))
                         .build())
                 .build();
-        Iterator<HistogramData> iterator = snapshot.getData().iterator();
+        Iterator<HistogramDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyClassicBuckets() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
     @Test
     public void testMinimalNativeData() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
@@ -263,7 +263,7 @@ public void testMinimalClassicData() {
         ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
                 .addBucket(Double.POSITIVE_INFINITY, 0)
                 .build();
-        new HistogramData(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
+        new HistogramDataPointSnapshot(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 }u}(jK  (e5b7d55be16907e5898140948d7e2250ad1b6aadjK  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajK  modifiedjK  KjK  KjK  K
jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -1,7 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -14,7 +12,7 @@ public void testCompleteGoodCase() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
                 .withHelp("Target info")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway"))
                         .build())
                 .build();
@@ -34,14 +32,14 @@ public void testEmptyInfo() {
     public void testDataImmutable() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway.v1"))
                         .build())
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9200", "service_name", "gateway.v2"))
                         .build())
                 .build();
-        Iterator<InfoSnapshot.InfoData> iterator = snapshot.getData().iterator();
+        Iterator<InfoSnapshot.InfoDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(jK  (492472c9408a101b92e3f33e6a00419c6b8bf62bjK  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javajK  modifiedjK  KjK  KjK  K
jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -13,15 +9,15 @@ public class MetricSnapshotTest {
     public void testDuplicateLabels() {
         CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/hello", "status", "200"))
                         .withValue(1.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/world", "status", "200"))
                         .withValue(2.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("status", "200", "path", "/hello"))
                         .withValue(3.0)
                         .build())u}(jK  (7066146c46da3afc1ab1efdfd5aac059e3e66682jK  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javajK  modifiedjK  K	jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xk  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -21,15 +17,15 @@ public void testEmpty() {
     public void testSort() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Assert.assertEquals(3, snapshots.size());
@@ -47,11 +43,11 @@ public void testDuplicateName() {
         //    and that is the conflict. Therefore, you cannot have a counter named "foo" and a gauge named "foo".
         CounterSnapshot c = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         GaugeSnapshot g = GaugeSnapshot.newBuilder()
                 .withName("my_metric")
-                .addGaugeData(GaugeSnapshot.GaugeData.newBuilder().withValue(1.0).build())
+                .addDataPoint(GaugeSnapshot.GaugeDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         new MetricSnapshots(c, g);
     }
@@ -60,7 +56,7 @@ public void testDuplicateName() {
     public void testBuilder() {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots.Builder builder = MetricSnapshots.newBuilder();
         Assert.assertFalse(builder.containsMetricName("my_metric"));
@@ -72,15 +68,15 @@ public void testBuilder() {
     public void testImmutable() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Iterator<MetricSnapshot> iterator = snapshots.iterator();u}(jK  (6c4fa61d35329e3482e6fcbbf2b06b49a826dc77jK  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javajK  modifiedjK  K
jK  K
jK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  Xl  @@ -14,14 +14,14 @@ public void testCompleteGoodCase() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_feature_flags")
                 .withHelp("Feature Flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .addState("feature1", true)
                         .addState("feature2", false)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature1", false)
                         .addState("feature2", false)
@@ -30,7 +30,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_feature_flags", "Feature Flags", null);
         Assert.assertEquals(2, snapshot.getData().size());
-        StateSetSnapshot.StateSetData data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
+        StateSetSnapshot.StateSetDataPointSnapshot data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
         Assert.assertEquals(Labels.of("entity", "controller"), data.getLabels());
         Assert.assertEquals(2, data.size());
         Assert.assertEquals("feature1", data.getName(0));
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
 
     @Test
     public void testStateSetDataSorted() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("b", true)
                 .addState("d", false)
                 .addState("c", true)
@@ -64,14 +64,14 @@ public void testStateSetDataSorted() {
     @Test(expected = IllegalArgumentException.class)
     public void testMustHaveState() {
         // Must have at least one state.
-        StateSetSnapshot.StateSetData.newBuilder().build();
+        StateSetSnapshot.StateSetDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testMinimal() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_flag")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("flag", true)
                         .build()
                 )
@@ -89,7 +89,7 @@ public void testEmpty() {
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("c", true)
@@ -101,7 +101,7 @@ public void testDataImmutable() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testDuplicateState() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("a", true)
@@ -112,18 +112,18 @@ public void testDuplicateState() {
     public void testStateSetImmutable() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature", true)
                         .build()
                 )
                 .build();
-        Iterator<StateSetSnapshot.StateSetData> iterator = snapshot.getData().iterator();
+        Iterator<StateSetSnapshot.StateSetDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
@@ -132,11 +132,11 @@ public void testStateSetImmutable() {
     public void testLabelsUnique() {
         StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )u}(jK  (cf65f46bf2c6096f777b1b9d767511927d757b4fjK  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javajK  modifiedjK  KjK  KjK  K
jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X	  @@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("latency_seconds")
                 .withHelp("latency in seconds")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCreatedTimestampMillis(createdTimestamp)
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .withLabels(Labels.of("endpoint", "/"))
@@ -42,15 +42,15 @@ public void testCompleteGoodCase() {
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("endpoint", "/test"))
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "latency_seconds", "latency in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        SummarySnapshot.SummaryData data = snapshot.getData().get(0);
+        SummarySnapshot.SummaryDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.of("endpoint", "/"), data.getLabels());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(1093, data.getCount());
@@ -77,7 +77,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         SummarySnapshot snapshot = SummarySnapshot.newBuilder()
                 .withName("size_bytes")
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCount(10)
                         .withSum(12.0)
                         .build())
@@ -94,7 +94,7 @@ public void testEmptySnapshot() {
 
     @Test
     public void testEmptyData() {
-        SummarySnapshot.SummaryData data = SummarySnapshot.SummaryData.newBuilder().build();
+        SummarySnapshot.SummaryDataPointSnapshot data = SummarySnapshot.SummaryDataPointSnapshot.newBuilder().build();
         Assert.assertEquals(0, data.getQuantiles().size());
         Assert.assertFalse(data.hasCount());
         Assert.assertFalse(data.hasSum());u}(jK  (b8a9827d28794d2698f99e4124b8e3a0eb82a596jK  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javajK  modifiedjK  KjK  KjK  K
jK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  XQ	  @@ -12,7 +12,7 @@ public void testCompleteGoodCase() {
                 .withName("my_unknown_seconds")
                 .withHelp("something in seconds")
                 .withUnit(Unit.SECONDS)
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.3)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(0.12)
@@ -24,7 +24,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                ).addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.29)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("env", "dev")
@@ -34,7 +34,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_unknown_seconds", "something in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        UnknownSnapshot.UnknownData data = snapshot.getData().get(1); // env="prod"
+        UnknownSnapshot.UnknownDataPointSnapshot data = snapshot.getData().get(1); // env="prod"
         Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
         Assert.assertEquals(0.3, data.getValue(), 0.0);
         Assert.assertEquals(0.12, data.getExemplar().getValue(), 0.0);
@@ -46,7 +46,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
                 .withName("test")
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .build())
                 .build();
@@ -66,6 +66,6 @@ public void testNameMissing() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        UnknownSnapshot.UnknownData.newBuilder().build();
+        UnknownSnapshot.UnknownDataPointSnapshot.newBuilder().build();
     }
 }u}(jK  (cadb934fd865b5ba4848ac688c8b5d016a8dace9jK  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javajK  modifiedjK  KjK  KjK  KjK  https://github.com/prometheus/client_java/blob/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajK  https://github.com/prometheus/client_java/raw/ebd226389cf46a9a57e77ac6ccf9c7c09322273e/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajK  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=ebd226389cf46a9a57e77ac6ccf9c7c09322273ejK  X  @@ -49,7 +49,7 @@ public void run() throws InterruptedException {
                 System.out.println("# ---------------------------------");
                 textWriter.write(System.out, snapshots);
                 System.out.println(TextFormat.printer().shortDebugString(protobufData));
-                HistogramSnapshot.HistogramData data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
+                HistogramSnapshot.HistogramDataPointSnapshot data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
                 System.out.println("Schema: " + data.getNativeSchema());
                 System.out.println("Number of buckets: " + data.getNativeBucketsForPositiveValues().size());
                 long duration = System.nanoTime() - start;ueu(fd373459616d18126824b68d09c428b3613dd097}(sha(fd373459616d18126824b68d09c428b3613dd097node_idEC_kwDOAHoJt9oAKGZkMzczNDU5NjE2ZDE4MTI2ODI0YjY4ZDA5YzQyOGIzNjEzZGQwOTccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-21T20:13:12Zu	committer}(j/M  Fabian Stäberj1M  fabian@fstab.dej3M  2023-07-21T21:20:50Zumessage#Add OpenTelemetry Exemplars exampletree}(j'M  (eaa83cad1311184862ce8464f0d42539f795375aurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/eaa83cad1311184862ce8464f0d42539f795375auj?M  hhttps://api.github.com/repos/prometheus/client_java/git/commits/fd373459616d18126824b68d09c428b3613dd097
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj?M  dhttps://api.github.com/repos/prometheus/client_java/commits/fd373459616d18126824b68d09c428b3613dd097html_urlYhttps://github.com/prometheus/client_java/commit/fd373459616d18126824b68d09c428b3613dd097comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/fd373459616d18126824b68d09c428b3613dd097/commentsj-M  }(loginfstabidJ' j)M  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j?M  "https://api.github.com/users/fstabjKM  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj5M  }(jPM  fstabjRM  J' j)M  MDQ6VXNlcjMzMDUzNQ==jTM  2https://avatars.githubusercontent.com/u/330535?v=4jVM  h3j?M  "https://api.github.com/users/fstabjKM  https://github.com/fstabjYM  ,https://api.github.com/users/fstab/followersj[M  9https://api.github.com/users/fstab/following{/other_user}j]M  2https://api.github.com/users/fstab/gists{/gist_id}j_M  9https://api.github.com/users/fstab/starred{/owner}{/repo}jaM  0https://api.github.com/users/fstab/subscriptionsjcM  'https://api.github.com/users/fstab/orgsjeM  (https://api.github.com/users/fstab/reposjgM  3https://api.github.com/users/fstab/events{/privacy}jiM  2https://api.github.com/users/fstab/received_eventsjkM  UserjmM  uparents]}(j'M  (b9baf5a92c66986b808fe6811496627e3923993cj?M  dhttps://api.github.com/repos/prometheus/client_java/commits/b9baf5a92c66986b808fe6811496627e3923993cjKM  Yhttps://github.com/prometheus/client_java/commit/b9baf5a92c66986b808fe6811496627e3923993cuastats}(totalM7	additionsM3	deletionsKufiles](}(j'M  (38869c26d5a10df782998766ca2b79860f26a2f8filename2examples/example-exemplars-tail-sampling/README.mdstatusaddedjM  KjM  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=fd373459616d18126824b68d09c428b3613dd097patchX  @@ -0,0 +1,131 @@
+Exemplars with OpenTelemetry's Tail Sampling
+--------------------------------------------
+
+## Background: What are Exemplars?
+
+Each Prometheus time series may contain Exemplars. Exemplars are additional metadata attached to a Prometheus time series.
+Exemplars are often used to reference trace IDs when distributed tracing is used.
+The following shows an example of a histogram in OpenMetrics text format where each non-empty bucket has an Exemplar:
+
+```
+# TYPE request_duration_seconds histogram
+# UNIT request_duration_seconds seconds
+# HELP request_duration_seconds request duration in seconds
+request_duration_seconds_bucket{http_status="200",le="0.005"} 0
+request_duration_seconds_bucket{http_status="200",le="0.01"} 5 # {span_id="826c6f49a0d6c931",trace_id="d2cf83f9f1fd22f793855edc4ae53320"} 0.007341934 1689971637.765
+request_duration_seconds_bucket{http_status="200",le="0.025"} 64 # {span_id="9ae17d91c9822c88",trace_id="320e53f894781db26fa0eb5fb0640426"} 0.014081662 1689971677.851
+request_duration_seconds_bucket{http_status="200",le="0.05"} 281 # {span_id="32c9706b1f798fce",trace_id="636a2bb9fe4aabea0f412b8cd6da2290"} 0.047227664 1689971700.484
+request_duration_seconds_bucket{http_status="200",le="0.1"} 1203 # {span_id="04902c82f56fb441",trace_id="c5cf7c1a4805e4b7a991c4e99fb38f87"} 0.094949368 1689971706.913
+request_duration_seconds_bucket{http_status="200",le="0.25"} 6338 # {span_id="81ffa3cbe3c8bf7e",trace_id="106a0d13ca1578a4c3ae4ec987b7f8f7"} 0.226545183 1689971700.004
+request_duration_seconds_bucket{http_status="200",le="0.5"} 10969 # {span_id="b7ac3d0a2b9570c3",trace_id="79b641c3d96bdba5554395e1521ffb13"} 0.439355954 1689971700.997
+request_duration_seconds_bucket{http_status="200",le="1.0"} 11180 # {span_id="b0cb8480a8b5c1ac",trace_id="4c57125265c4a7caa83c4d354f94bd40"} 0.625977473 1689971700.263
+request_duration_seconds_bucket{http_status="200",le="2.5"} 11209 # {span_id="4bce9aa28f1f8a65",trace_id="7fa30e3153f5129694bd58a23bcc96a8"} 1.529906213 1689971659.228
+request_duration_seconds_bucket{http_status="200",le="5.0"} 11236 # {span_id="e629a7d546da77e1",trace_id="20a43851621f908eab359217df2b5eed"} 2.936415405 1689971661.293
+request_duration_seconds_bucket{http_status="200",le="10.0"} 11243 # {span_id="024e3119605ab66e",trace_id="84721fdc42ef4d55e8416d3191b4d19e"} 5.163273443 1689971663.080
+request_duration_seconds_bucket{http_status="200",le="+Inf"} 11243
+request_duration_seconds_count{http_status="200"} 11243
+request_duration_seconds_sum{http_status="200"} 2843.3178731140015
+```
+
+In Grafana Exemplars can be visualized as little green dots. The following shows an example of the 95th [quantile](https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile) for the histogram above.
+
+![Screenshot of a Latency Graph with Exemplars](https://github.com/prometheus/client_java/assets/330535/68aada3d-f55b-4a7b-90be-222481f0ec79)
+
+If you move the mouse over an Exemplar, an overlay pops up with a link to a tracing tool like [Tempo](https://github.com/grafana/tempo).
+
+## Automatic Exemplar Generation
+
+The Prometheus Java client library automatically detects OpenTelemetry tracing. The library automatically produces Exemplars with OpenTelemetry trace IDs if applicable.
+
+## Sampling
+
+Distributed tracing produces a lot of data, and it is quite common to apply a sampling strategy to reduce the number of traces.
+
+There are two ways how to do this:
+
+1. _Head-based sampling_ is performed by the tracing library in the application itself.
+2. _Tail-based sampling_ is performed by an external infrastructure component like the [OpenTelemetry collector](https://opentelemetry.io/docs/collector/).
+
+When generating Exemplars, the Prometheus Java client libray must make sure that the Exemplar points to a trace that is actually sampled. Otherwise, Exemplar's trace ID will not be available in the monitoring backend, i.e. the Exemplar will link to a non-existing trace ID.
+
+With _head-based sampling_ this works out-of-the-box: The Prometheus client library calls OpenTelemetry's `Span.current().getSpanContext().isSampled()` function and selects Exemplars only if the current Span is sampled.
+
+With _tail-based sampling_ there is a trick: The Prometheus client library adds an attribute `exemplar="true"` to each Span that is used as an Exemplar. The remainder of this README shows how you can configure the `tail_sampling` processor of the OpenTelemetry collector to sample Spans marked with `exemplar="true"`.
+
+## Build the Example
+
+The example is built as part of the `client_java` parent project with
+
+```shell
+./mvnw package
+```
+
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+
+## Run the Example
+
+The `docker-compose` file will run the example with the following containers:
+
+* `hello-world-app`: Java service described above, with the OpenTelemetry Java instrumentation agent attached for distrubted tracing.
+* `greeting-service`: Java service described above, with the OpenTelemetry Java instrumentation agent attached for distrubted tracing.
+* `collector`: OpenTelemetry collector for receiving the distributed traces, performing _tail sampling_, and forwarding them to `tempo`.
+* `prometheus`: Prometheus server scraping metrics from `hello-world-app`, `greeting-service`, and `tempo`.
+* `tempo`: Trace database.
+* `grafana`: Has `prometheus` and `tempo` configured as data sources, and is configured with an example dashboard with Exemplars enabled.
+* `k6`: The [k6](https://k6.io/) load test tool for generating 50 requests / second on the Java services.
+
+With the Java services described above available in the `target/` directories, you can run the example with:
+
+```shell
+cd example-exemplars-tail-sampling
+docker-compose up
+```
+
+Grafana will run on [http://localhost:3000](ttp://localhost:3000). The default user is _admin_ with password _admin_.
+
+## Example Dashboard
+
+The example dashboard shows 50 requests / second for the Java serices:
+
+![Screenshot showing the request rate on the Java services](https://github.com/prometheus/client_java/assets/330535/9f8dc92e-c9aa-40b6-8fda-a0f7e98560ba)
+
+The Tempo metrics show that only ~5 traces / second are received:
+
+![Screenshot showing the number of traces per second received by Tempo](https://github.com/prometheus/client_java/assets/330535/5e439ac5-3c5c-4d40-a4cd-6737c2c82dfd)
+
+The reason is that the OpenTelemetry collector is configured to sample only 10% of the traces. Yet, all Exemplars in the latency graph point to traces that actually made it to Tempo.
+
+## OpenTelemetry Collector Config
+
+The OpenTelemetry collector is configured to keep all Spans with the attribute `exemplar="true"`. Probabilistic sampling applies only to the remainder of the Spans.
+
+```yaml
+processors:
+  batch:
+  tail_sampling:
+    expected_new_traces_per_sec: 10
+    policies:
+      [
+        {
+          name: keep-exemplars,
+          type: string_attribute,
+          string_attribute: { key: "exemplar", values: [ "true" ] }
+        },
+        {
+          name: keep-10-percent,
+          type: probabilistic,
+          probabilistic: { sampling_percentage: 10 }
+        },
+      ]
+```
+
+The Prometheus Java client library automatically sets the `exemplar="true"` attribute for each Span that is used as an Exemplar.
+
+The Exemplar sampler of the Prometheus Java client library is rate-limited, the `DEFAULT_MIN_RETENTION_PERIOD_SECONDS` is 7s.
+So only one Span per 7 seconds per time series will be marked with `exemplar="true"`.
+
+## Conclusion
+
+The Prometheus Java client library automatically generates Exemplars if OpenTelemetry tracing is detected.
+In order to make that work with _tail-based sampling_, the Prometheus Java client library adds an attribute `exemplar="true"` to each Span that's used as an Exemplar.
+The `tail_sampling` processor in the OpenTelemetry collector can be configured to always sample Spans marked as `exemplar="true"`.u     }(j'M  (f3bca68b8901a198bdad0a2d42714061bc10236bjM  Gexamples/example-exemplars-tail-sampling/config/grafana-dashboards.yamljM  addedjM  KjM  K jM  KjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-dashboards.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-dashboards.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-dashboards.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  @@ -0,0 +1,8 @@
+apiVersion: 1
+
+providers:
+  - name: 'Example Dashboard'
+    type: file
+    options:
+      path: /etc/grafana/example-dashboard.json
+      foldersFromFilesStructure: falseu}(j'M  (6f31ecb536e4c1c8afeca0bbc53e054f19010cb3jM  Hexamples/example-exemplars-tail-sampling/config/grafana-datasources.yamljM  addedjM  KjM  K jM  KjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-datasources.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-datasources.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-datasources.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -0,0 +1,22 @@
+apiVersion: 1
+
+datasources:
+
+  - name: Prometheus
+    type: prometheus
+    uid: prometheus
+    url: http://localhost:9090
+
+  - name: Tempo
+    type: tempo
+    uid: tempo
+    url: http://localhost:3200
+
+  - name: Prometheus
+    type: prometheus
+    uid: prometheus
+    url: http://localhost:9090
+    jsonData:
+      exemplarTraceIdDestinations:
+        - name: trace_id
+          datasourceUid: tempou}(j'M  (15c14e9e1a5eef8bb2037a0444a49dff882173e6jM  Nexamples/example-exemplars-tail-sampling/config/grafana-example-dashboard.jsonjM  addedjM  MdjM  K jM  MdjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-example-dashboard.jsonjM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-example-dashboard.jsonjM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fgrafana-example-dashboard.json?ref=fd373459616d18126824b68d09c428b3613dd097jM  X"  @@ -0,0 +1,356 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "builtIn": 1,
+        "datasource": {
+          "type": "grafana",
+          "uid": "-- Grafana --"
+        },
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "type": "dashboard"
+      }
+    ]
+  },
+  "editable": true,
+  "fiscalYearStartMonth": 0,
+  "graphTooltip": 0,
+  "links": [],
+  "liveNow": false,
+  "panels": [
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "prometheus"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 13,
+        "w": 18,
+        "x": 0,
+        "y": 0
+      },
+      "id": 2,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "prometheus"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "histogram_quantile(0.95, rate(request_duration_seconds{job=\"$instance\"}[5m]))",
+          "instant": false,
+          "range": true,
+          "refId": "A"
+        }
+      ],
+      "title": "Request Duration 95th Percentile",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "prometheus"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "reqps"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 11,
+        "w": 18,
+        "x": 0,
+        "y": 13
+      },
+      "id": 1,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "prometheus"
+          },
+          "editorMode": "code",
+          "exemplar": false,
+          "expr": "histogram_count(rate(request_duration_seconds{job=\"$instance\"}[5m]))",
+          "instant": true,
+          "key": "Q-ddf5e7ad-fa7a-4342-acf8-819848f226a3-0",
+          "range": true,
+          "refId": "A"
+        }
+      ],
+      "title": "Request Rate",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "prometheus"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "ops"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 18,
+        "x": 0,
+        "y": 24
+      },
+      "id": 3,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "prometheus"
+          },
+          "editorMode": "code",
+          "expr": "rate(tempo_ingester_traces_created_total[5m])",
+          "instant": true,
+          "key": "Q-0e8731c6-7df2-47bc-a1a3-45dcb9f5e92d-0",
+          "range": true,
+          "refId": "A"
+        }
+      ],
+      "title": "Traces Ingested in Tempo",
+      "type": "timeseries"
+    }
+  ],
+  "refresh": "",
+  "schemaVersion": 38,
+  "style": "dark",
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "current": {
+          "selected": true,
+          "text": "greeting-service",
+          "value": "greeting-service"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "prometheus"
+        },
+        "definition": "label_values(job)",
+        "hide": 0,
+        "includeAll": false,
+        "multi": false,
+        "name": "instance",
+        "options": [],
+        "query": {
+          "query": "label_values(job)",
+          "refId": "PrometheusVariableQueryEditor-VariableQuery"
+        },
+        "refresh": 1,
+        "regex": "/[^tempo]/",
+        "skipUrlSync": false,
+        "sort": 0,
+        "type": "query"
+      }
+    ]
+  },
+  "time": {
+    "from": "now-5m",
+    "to": "now"
+  },
+  "timepicker": {},
+  "timezone": "",
+  "title": "Example Dashboard",
+  "uid": "e11cc371-fef5-4783-b5a5-fe0302f00740",
+  "version": 1,
+  "weekStart": ""
+}u}(j'M  (5521a9565e8588e0d262ad5d70bfa3b749e1832ajM  <examples/example-exemplars-tail-sampling/config/k6-script.jsjM  addedjM  KjM  K jM  KjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fk6-script.jsjM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fk6-script.jsjM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fk6-script.js?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -0,0 +1,18 @@
+import http from 'k6/http';
+
+export const options = {
+    scenarios: {
+        constant_request_rate: {
+            executor: 'constant-arrival-rate',
+            rate: 50,
+            timeUnit: '1s',
+            duration: '2h',
+            preAllocatedVUs: 10,
+            maxVUs: 100,
+        },
+    },
+};
+
+export default function () {
+    http.get('http://localhost:8080');
+}u}(j'M  (2ad19f013505ad2bf3ec2f3a3aeb448b53154cfdjM  Cexamples/example-exemplars-tail-sampling/config/otelcol-config.yamljM  addedjM  K"jM  K jM  K"jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fotelcol-config.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fotelcol-config.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fotelcol-config.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -0,0 +1,34 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+  tail_sampling:
+    expected_new_traces_per_sec: 10
+    policies:
+      [
+        {
+          name: keep-exemplars,
+          type: string_attribute,
+          string_attribute: { key: "exemplar", values: [ "true" ] }
+        },
+        {
+          name: keep-10-percent,
+          type: probabilistic,
+          probabilistic: { sampling_percentage: 10 }
+        },
+      ]
+
+exporters:
+  otlphttp:
+    endpoint: http://localhost:4418
+
+service:
+  pipelines:
+    traces:
+      receivers: [otlp]
+      processors: [tail_sampling, batch]
+      exporters: [otlphttp]u}(j'M  (037c515f8a58d0526f4f267915370ef69b17a860jM  ?examples/example-exemplars-tail-sampling/config/prometheus.yamljM  addedjM  K
jM  K jM  K
jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fprometheus.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fprometheus.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Fprometheus.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  XK  @@ -0,0 +1,13 @@
+global:
+  scrape_interval: 5s
+
+scrape_configs:
+  - job_name: "tempo"
+    static_configs:
+      - targets: ["localhost:3200"]
+  - job_name: "hello-world-app"
+    static_configs:
+      - targets: ["localhost:8080"]
+  - job_name: "greeting-service"
+    static_configs:
+      - targets: ["localhost:8081"]u}(j'M  (12eed44cfcaaf6b5efccb1be2a10e7449f1910bfjM  Aexamples/example-exemplars-tail-sampling/config/tempo-config.yamljM  addedjM  KjM  K jM  KjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Ftempo-config.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Ftempo-config.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fconfig%2Ftempo-config.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  Xm  @@ -0,0 +1,20 @@
+server:
+  http_listen_port: 3200
+  grpc_listen_port: 9096
+
+distributor:
+  receivers:
+    otlp:
+      protocols:
+        grpc:
+          endpoint: "localhost:4417"
+        http:
+          endpoint: "localhost:4418"
+
+storage:
+  trace:
+    backend: local
+    wal:
+      path: /tmp/tempo/wal
+    local:
+      path: /tmp/tempo/blocksu}(j'M  (e4c43f99cd94388bab4ab664f458f9b5d55dc12fjM  <examples/example-exemplars-tail-sampling/docker-compose.yamljM  addedjM  K[jM  K jM  K[jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X
  @@ -0,0 +1,91 @@
+version: "3"
+services:
+  hello-world-app:
+    image: opentelemetry-java-agent
+    build:
+      context: .
+      dockerfile_inline: |
+        FROM openjdk:11-jre
+        WORKDIR /
+        RUN curl -sOL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.28.0/opentelemetry-javaagent.jar
+    network_mode: host
+    ports:
+      - "8080:8080"
+    volumes:
+      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+    environment:
+      - OTEL_TRACES_EXPORTER=otlp
+      - OTEL_METRICS_EXPORTER=none
+      - OTEL_LOGS_EXPORTER=none
+    command:
+      - java
+      - -javaagent:/opentelemetry-javaagent.jar
+      - -jar
+      - /hello-world-app.jar
+  greeting-service:
+    # The opentelemetry-java-agent image is coming from the hello-world-up service above.
+    image: opentelemetry-java-agent
+    network_mode: host
+    ports:
+      - "8081:8081"
+    volumes:
+      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+    environment:
+      - OTEL_TRACES_EXPORTER=otlp
+      - OTEL_METRICS_EXPORTER=none
+      - OTEL_LOGS_EXPORTER=none
+    command:
+      - java
+      - -javaagent:/opentelemetry-javaagent.jar
+      - -jar
+      - /greeting-service.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --config.file=/prometheus.yaml
+  tempo:
+    image: grafana/tempo:2.1.1
+    network_mode: host
+    ports:
+      - "3200:3200"
+      - "4417:4417"
+      - "4418:4418"
+      - "9096:9096"
+    volumes:
+      - ./config/tempo-config.yaml:/config.yaml
+    command:
+      - --config.file=/config.yaml
+  grafana:
+    image: grafana/grafana:10.0.0
+    network_mode: host
+    ports:
+      - "3000:3000"
+    volumes:
+      - ./config/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/grafana-datasources.yaml
+      - ./config/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yaml
+      - ./config/grafana-example-dashboard.json:/etc/grafana/example-dashboard.json
+  k6:
+    image: grafana/k6
+    network_mode: host
+    volumes:
+      - ./config/k6-script.js:/k6-script.js
+    command:
+      - run
+      - /k6-script.jsu}(j'M  (627af543cea73e9175713fd437484ff243971f31jM  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmljM  addedjM  KKjM  K jM  KKjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X_  @@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>example-exemplars-tail-sampling</artifactId>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-greeting-service</artifactId>
+
+    <name>Example - OpenTelemetry Exemplars - Greeting Service</name>
+    <description>
+        Part of a distributed "Hello, World" REST service to show Exemplars with OpenTelemetry's distributed tracing
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.otel_exemplars.greeting.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j'M  (2fd266cd979d7982e58d8cf22f2af8ed9caf27c0jM  examples/example-exemplars-tail-sampling/example-greeting-service/src/main/java/io/prometheus/metrics/examples/otel_exemplars/greeting/GreetingServlet.javajM  addedjM  K/jM  K jM  K/jM  X  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javajM  X
  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javajM  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.java?ref=fd373459616d18126824b68d09c428b3613dd097jM  X~  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.examples.otel_exemplars.greeting;
+
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.model.snapshots.Unit;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.Random;
+
+import static io.prometheus.metrics.model.snapshots.Unit.nanosToSeconds;
+
+/**
+ * Hello World REST servlet, with an example counter and an example histogram.
+ */
+public class GreetingServlet extends HttpServlet {
+
+    private final Random random = new Random(0);
+
+    private final Histogram histogram;
+
+    public GreetingServlet() {
+        histogram = Histogram.newBuilder()
+            .withName("request_duration_seconds")
+            .withHelp("request duration in seconds")
+            .withUnit(Unit.SECONDS)
+            .withLabelNames("http_status")
+            .register();
+        histogram.withLabelValues("200");
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        long start = System.nanoTime();
+        try {
+            Thread.sleep((long) (Math.abs((random.nextGaussian() + 1.0) * 100.0)));
+            resp.setStatus(200);
+            resp.setContentType("text/plain");
+            resp.getWriter().println("Hello, World!");
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        } finally {
+            histogram.withLabelValues("200").observe(nanosToSeconds(System.nanoTime() - start));
+        }
+    }
+}u}(j'M  (4982be3764fa2b6cf1e5817cf2278a684fc41abfjM  examples/example-exemplars-tail-sampling/example-greeting-service/src/main/java/io/prometheus/metrics/examples/otel_exemplars/greeting/Main.javajM  addedjM  K jM  K jM  K jM  X   https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FMain.javajM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FMain.javajM  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FMain.java?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.examples.otel_exemplars.greeting;
+
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+/**
+ * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
+ */
+public class Main {
+
+    public static void main(String[] args) throws LifecycleException {
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(8081);
+
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+
+        Tomcat.addServlet(ctx, "hello", new GreetingServlet());
+        ctx.addServletMappingDecoded("/*", "hello");
+
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+}u}(j'M  (5e705651220d6f132181301260fbc17e15a07c98jM  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmljM  addedjM  KKjM  K jM  KKjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=fd373459616d18126824b68d09c428b3613dd097jM  XX  @@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>example-exemplars-tail-sampling</artifactId>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-hello-world-app</artifactId>
+
+    <name>Example - OpenTelemetry Exemplars - Hello World App</name>
+    <description>
+        Part of a distributed "Hello, World" REST service to show Exemplars with OpenTelemetry's distributed tracing
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.otel_exemplars.app.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j'M  (d7c5db034d99a81706d7efb28a880d80ff5d5c87jM  examples/example-exemplars-tail-sampling/example-hello-world-app/src/main/java/io/prometheus/metrics/examples/otel_exemplars/app/HelloWorldServlet.javajM  addedjM  KAjM  K jM  KAjM  X  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javajM  X  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javajM  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.java?ref=fd373459616d18126824b68d09c428b3613dd097jM  X	  @@ -0,0 +1,65 @@
+package io.prometheus.metrics.examples.otel_exemplars.app;
+
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.model.snapshots.Unit;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.util.Random;
+
+import static io.prometheus.metrics.model.snapshots.Unit.nanosToSeconds;
+import static java.net.http.HttpResponse.BodyHandlers.ofString;
+
+/**
+ * Hello World REST servlet, with an example counter and an example histogram.
+ */
+public class HelloWorldServlet extends HttpServlet {
+
+    private final Random random = new Random(0);
+
+    private final Histogram histogram;
+
+    public HelloWorldServlet() {
+        histogram = Histogram.newBuilder()
+                .withName("request_duration_seconds")
+                .withHelp("request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+        histogram.withLabelValues("200");
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {
+        long start = System.nanoTime();
+        try {
+            Thread.sleep((long) (Math.abs((random.nextGaussian() + 1.0) * 100.0)));
+            String greeting = executeGreetingServiceRequest();
+            resp.setStatus(200);
+            resp.setContentType("text/plain");
+            resp.getWriter().print(greeting);
+        } catch (Exception e) {
+            throw new ServletException(e);
+        } finally {
+            histogram.withLabelValues("200").observe(nanosToSeconds(System.nanoTime() - start));
+        }
+    }
+
+    private String executeGreetingServiceRequest() throws URISyntaxException, IOException, InterruptedException {
+        HttpRequest request = HttpRequest.newBuilder()
+                .GET()
+                .uri(new URI("http://localhost:8081/"))
+                .build();
+        HttpClient httpClient = HttpClient.newHttpClient();
+        HttpResponse<String> response = httpClient.send(request, ofString());
+        return response.body();
+    }
+}u}(j'M  (cf8fee7f18d52563fdd421531814919a1dc787c8jM  examples/example-exemplars-tail-sampling/example-hello-world-app/src/main/java/io/prometheus/metrics/examples/otel_exemplars/app/Main.javajM  addedjM  K jM  K jM  K jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FMain.javajM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FMain.javajM  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FMain.java?ref=fd373459616d18126824b68d09c428b3613dd097jM  X   @@ -0,0 +1,32 @@
+package io.prometheus.metrics.examples.otel_exemplars.app;
+
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+/**
+ * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
+ */
+public class Main {
+
+    public static void main(String[] args) throws LifecycleException {
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(8080);
+
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+
+        Tomcat.addServlet(ctx, "hello", new HelloWorldServlet());
+        ctx.addServletMappingDecoded("/*", "hello");
+
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+}u}(j'M  (eb93cabb5ded42ffb005e01449be46cef2f01951jM  0examples/example-exemplars-tail-sampling/pom.xmljM  addedjM  K3jM  K jM  K3jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exemplars-tail-sampling</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Example - Exemplars with OpenTelemetry's Tail Sampling</name>
+    <description>
+        Example project showing Examplars with OpenTelemetry's Tail Sampling.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>example-greeting-service</module>
+        <module>example-hello-world-app</module>
+    </modules>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>11</source>
+                    <target>11</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j'M  (66d6378f72b7e30f7fe81664e3e0655092b2b553jM  )examples/example-tomcat-servlet/README.mdjM  renamedjM  K jM  K jM  K jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2FREADME.mdjM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2FREADME.mdjM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2FREADME.md?ref=fd373459616d18126824b68d09c428b3613dd097previous_filename)examples/tomcat-servlet-example/README.mdu}(j'M  (bc29592e331d419b4229b6554c78e30105758189jM  'examples/example-tomcat-servlet/pom.xmljM  renamedjM  KjM  KjM  KjM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fpom.xmljM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fpom.xmljM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fpom.xml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
-    <artifactId>tomcat-servlet-example</artifactId>
+    <artifactId>example-tomcat-servlet</artifactId>
 
-    <name>Tomcat Servlet Example</name>
+    <name>Example - Tomcat Servlet</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>jN  'examples/tomcat-servlet-example/pom.xmlu}(j'M  (1598028dbd14e0d6991a5a7a1796f150e5c9cd5ejM  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javajM  renamedjM  K jM  K jM  K jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=fd373459616d18126824b68d09c428b3613dd097jN  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(j'M  (3e33b1192f72f3b790d36a37270d632234c88927jM  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajM  renamedjM  K jM  K jM  K jM  https://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajM  https://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajM  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=fd373459616d18126824b68d09c428b3613dd097jN  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(j'M  (ebd589b48f41d23fd10217882d42c7f2e36757cejM  examples/pom.xmljM  modifiedjM  KjM  KjM  KjM  jhttps://github.com/prometheus/client_java/blob/fd373459616d18126824b68d09c428b3613dd097/examples%2Fpom.xmljM  ihttps://github.com/prometheus/client_java/raw/fd373459616d18126824b68d09c428b3613dd097/examples%2Fpom.xmljM  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=fd373459616d18126824b68d09c428b3613dd097jM  X  @@ -11,7 +11,7 @@
     <artifactId>examples</artifactId>
     <packaging>pom</packaging>
 
-    <name>Prometheus Metrics Examples</name>
+    <name>Examples</name>
     <description>
         Example projects for the Prometheus Metrics Library.
     </description>
@@ -33,7 +33,8 @@
     </developers>
 
     <modules>
-        <module>tomcat-servlet-example</module>
+        <module>example-tomcat-servlet</module>
+        <module>example-exemplars-tail-sampling</module>
     </modules>
 
 </project>ueu(b64019875d7bb2cfd4a8aff451c58268abec1bee}(sha(b64019875d7bb2cfd4a8aff451c58268abec1beenode_idEC_kwDOAHoJt9oAKGI2NDAxOTg3NWQ3YmIyY2ZkNGE4YWZmNDUxYzU4MjY4YWJlYzFiZWUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-25T22:24:40Zu	committer}(jFN  Fabian StäberjHN  fabian@fstab.dejJN  2023-08-25T22:24:40Zumessage,Add configuration for OpenTelemetry Exportertree}(j>N  (9fbe4e280d2cd39ad9679e6f66631ee0c829b09furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9fbe4e280d2cd39ad9679e6f66631ee0c829b09fujVN  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b64019875d7bb2cfd4a8aff451c58268abec1bee
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujVN  dhttps://api.github.com/repos/prometheus/client_java/commits/b64019875d7bb2cfd4a8aff451c58268abec1beehtml_urlYhttps://github.com/prometheus/client_java/commit/b64019875d7bb2cfd4a8aff451c58268abec1beecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b64019875d7bb2cfd4a8aff451c58268abec1bee/commentsjDN  }(loginfstabidJ' j@N  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jVN  "https://api.github.com/users/fstabjbN  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujLN  }(jgN  fstabjiN  J' j@N  MDQ6VXNlcjMzMDUzNQ==jkN  2https://avatars.githubusercontent.com/u/330535?v=4jmN  h3jVN  "https://api.github.com/users/fstabjbN  https://github.com/fstabjpN  ,https://api.github.com/users/fstab/followersjrN  9https://api.github.com/users/fstab/following{/other_user}jtN  2https://api.github.com/users/fstab/gists{/gist_id}jvN  9https://api.github.com/users/fstab/starred{/owner}{/repo}jxN  0https://api.github.com/users/fstab/subscriptionsjzN  'https://api.github.com/users/fstab/orgsj|N  (https://api.github.com/users/fstab/reposj~N  3https://api.github.com/users/fstab/events{/privacy}jN  2https://api.github.com/users/fstab/received_eventsjN  UserjN  uparents]}(j>N  (01740cd3e7dfc5e0a147c89961eea6b6177514c9jVN  dhttps://api.github.com/repos/prometheus/client_java/commits/01740cd3e7dfc5e0a147c89961eea6b6177514c9jbN  Yhttps://github.com/prometheus/client_java/commit/01740cd3e7dfc5e0a147c89961eea6b6177514c9uastats}(totalM{	additionsM	deletionsK}ufiles](}(j>N  (5a405102d6da7081dc94189c9235a9e6bf92082afilenamecexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedjN  KjN  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beepatchX  @@ -31,8 +31,9 @@ public static void main(String[] args) throws Exception {
                 .withUnit(Unit.SECONDS)
                 .register();
 
-        OpenTelemetryExporter openTelemetryExporter = new OpenTelemetryExporter();
-        openTelemetryExporter.start(PrometheusRegistry.defaultRegistry);
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
 
         while (true) {
             Thread.sleep(1000);u}(j>N  (6d06746f76a09f4d3be70c7bf19de87731cf51a5jN  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javajN  modifiedjN  KjN  K jN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(j>N  (2ebf42d5684951da23ac71d85a017e24bd7f5adcjN  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javajN  addedjN  KjN  K jN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  XK  @@ -0,0 +1,189 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(j>N  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcjN  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajN  modifiedjN  KjN  KjN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(j>N  (c4a09be7b8ca24e342cd99173c0a8674e703cb60jN  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajN  modifiedjN  KjN  KjN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(j>N  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3jN  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javajN  modifiedjN  KjN  K jN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u
      }(j>N  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770jN  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesjN  modifiedjN  KjN  K jN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j>N  (acdb7f691968cfac0725706f7050fc4fbea5ed09jN  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javajN  modifiedjN  M\jN  KjN  MjjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  XC  @@ -1,33 +1,367 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
 
 import java.time.Duration;
+import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 public class OpenTelemetryExporter {
 
-    public void start(PrometheusRegistry registry) {
-        PrometheusInstrumentationScope instrumentationScope = new PrometheusInstrumentationScope();
-        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScope.getInstrumentationScopeInfo().getName());
-        ResourceBuilder resourceBuilder = Resource.builder();
-        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
-            resourceBuilder.put(entry.getKey(), entry.getValue());
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
         }
-        Resource resource = resourceBuilder.build();
-        System.out.println("Found the following resource attributes: " + resource);
-        MetricExporter exporter = OtlpHttpMetricExporter.builder()
-                .setEndpoint("http://localhost:4318/v1/metrics")
-                .build();
         PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
-                .setInterval(Duration.ofSeconds(5)) // TODO: this is only for debugging, way too busy for production.
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
                 .build();
-        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScope.getInstrumentationScopeInfo(), resource);
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
         reader.register(prometheusMetricProducer);
     }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint != null) {
+                return endpoint;
+            }
+            endpoint = getString("otel.exporter.otlp.endpoint");
+            if (endpoint != null) {
+                return endpoint;
+            }
+            if (builder.endpoint != null) {
+                return builder.endpoint;
+            }
+            if (getProtocol(builder, config).equals("http/protobuf")) {
+                return "http://localhost:4317";
+            } else { // grpc
+                return "http://localhost:4318";
+            }
+        }
+
+        static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            timeoutSeconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            if (timeoutSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutSeconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
 }u}(j>N  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadjN  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javajN  modifiedjN  KjN  KjN  KjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajN  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X  @@ -10,17 +10,7 @@ class PrometheusInstrumentationScope {
     private static final String instrumentationScopeNameKey = "instrumentationScope.name";
     private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
 
-    private final InstrumentationScopeInfo instrumentationScopeInfo;
-
-    public PrometheusInstrumentationScope() {
-        this.instrumentationScopeInfo = loadInstrumentationScopeInfo();
-    }
-
-    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
-        return instrumentationScopeInfo;
-    }
-
-    private static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
         try {
             Properties properties = new Properties();
             properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));u}(j>N  (c4319b7fc6bb838489686542d8817d5c53daad94jN  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javajN  modifiedjN  KjN  K]jN  KqjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajN  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X  @@ -1,107 +1,34 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
-import java.io.File;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
 import java.util.HashMap;
 import java.util.Map;
 
-import static java.nio.file.Files.*;
-
 public class ResourceAttributes {
 
-    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
-
-    public static Map<String, String> get(String instrumentationScopeName) {
-        Map<String, String> result;
-        try {
-            result = getAttributesFromOtelAgent(instrumentationScopeName);
-            if (result != null) {
-                return result;
-            }
-        } catch (Exception ignored) {
-        }
-        Map<String, String> defaultAttributes = new HashMap<>();
-        defaultAttributes.put("key", "value");
-        return defaultAttributes;
-    }
-
-    private static Map<String, String> getAttributesFromOtelAgent(String instrumentationScopeName) throws Exception {
-        try {
-            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
-            try {
-                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
-
-                URLClassLoader classLoader = new URLClassLoader(otelJars);
-                Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
-                Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
-                if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
-                    // GlobalOpenTelemetry is injected by the OTel Java aqent
-                    Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
-                    Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
-                    Object sdkMeterProvider = getField("delegate", agentMeterProvider);
-                    Object sharedState = getField("sharedState", sdkMeterProvider);
-                    Object resource = callMethod("getResource", sharedState);
-                    Object attributes = callMethod("getAttributes", resource);
-                    Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
-
-                    Map<String, String> result = new HashMap<>();
-                    for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
-                        if (entry.getKey() != null && entry.getValue() != null) {
-                            result.put(entry.getKey().toString(), entry.getValue().toString());
-                        }
-                    }
-                    return result;
-                } else {
-                    System.out.println("No OTel Java agent attached."); // temporary, will be removedq
-                }
-            } finally {
-                deleteTempDir(tmpDir.toFile());
-            }
-        } catch (Exception ignored) {
-            ignored.printStackTrace();
-        }
-        return null;
-    }
-
-    private static Object getField(String name, Object obj) throws Exception {
-        Field field = obj.getClass().getDeclaredField(name);
-        field.setAccessible(true);
-        return field.get(obj);
-    }
-
-    private static Object callMethod(String name, Object obj) throws Exception {
-        Method method = obj.getClass().getMethod(name);
-        method.setAccessible(true);
-        return method.invoke(obj);
-    }
-
-    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
-        URL[] result = new URL[OTEL_JARS.length];
-        for (int i = 0; i < OTEL_JARS.length; i++) {
-            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
-            if (inputStream == null) {
-                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
-            }
-            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
-            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
-            inputStream.close();
-            result[i] = outputFile.toURI().toURL();
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
         }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
         return result;
     }
 
-    private static void deleteTempDir(File tmpDir) {
-        // We don't have subdirectories, so this simple implementation should work.
-        for (File file : tmpDir.listFiles()) {
-            file.delete();
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
         }
-        tmpDir.delete();
     }
 }u}(j>N  (053c2b53ab0a361d01905748b8e4445d725b3e63jN  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javajN  addedjN  K
jN  K jN  K
jN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajN  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(j>N  (093b3b44dc76bd71ffb168b5a87b471c2699ef06jN  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javajN  addedjN  K<jN  K jN  K<jN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajN  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(j>N  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16jN  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javajN  addedjN  KWjN  K jN  KWjN  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajN  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajN  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejN  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}ueu(fa1669cc7f0df4fd66ce7859050376f17d73a407}(sha(fa1669cc7f0df4fd66ce7859050376f17d73a407node_idEC_kwDOAHoJt9oAKGZhMTY2OWNjN2YwZGY0ZmQ2NmNlNzg1OTA1MDM3NmYxN2Q3M2E0MDccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-31T19:44:33Zu	committer}(jO  Fabian StäberjO  fabian@fstab.dejO  2023-08-31T19:44:33ZumessageAdd JVM Buffer Pool metricstree}(jO  (fa23c9f2f8d7af2622aaeee385e56b7e87265fa8urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/fa23c9f2f8d7af2622aaeee385e56b7e87265fa8uj+O  hhttps://api.github.com/repos/prometheus/client_java/git/commits/fa1669cc7f0df4fd66ce7859050376f17d73a407
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj+O  dhttps://api.github.com/repos/prometheus/client_java/commits/fa1669cc7f0df4fd66ce7859050376f17d73a407html_urlYhttps://github.com/prometheus/client_java/commit/fa1669cc7f0df4fd66ce7859050376f17d73a407comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/fa1669cc7f0df4fd66ce7859050376f17d73a407/commentsjO  }(loginfstabidJ' jO  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j+O  "https://api.github.com/users/fstabj7O  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj!O  }(j<O  fstabj>O  J' jO  MDQ6VXNlcjMzMDUzNQ==j@O  2https://avatars.githubusercontent.com/u/330535?v=4jBO  h3j+O  "https://api.github.com/users/fstabj7O  https://github.com/fstabjEO  ,https://api.github.com/users/fstab/followersjGO  9https://api.github.com/users/fstab/following{/other_user}jIO  2https://api.github.com/users/fstab/gists{/gist_id}jKO  9https://api.github.com/users/fstab/starred{/owner}{/repo}jMO  0https://api.github.com/users/fstab/subscriptionsjOO  'https://api.github.com/users/fstab/orgsjQO  (https://api.github.com/users/fstab/reposjSO  3https://api.github.com/users/fstab/events{/privacy}jUO  2https://api.github.com/users/fstab/received_eventsjWO  UserjYO  uparents]}(jO  (b987f508316e4b4ec898dee75c3c577656619c4dj+O  dhttps://api.github.com/repos/prometheus/client_java/commits/b987f508316e4b4ec898dee75c3c577656619c4dj7O  Yhttps://github.com/prometheus/client_java/commit/b987f508316e4b4ec898dee75c3c577656619c4duastats}(totalMX	additionsM0	deletionsK(ufiles](}(jO  (c1e66f31a65584ae60f0790b02fa1c364e4cfc46filenamexprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetrics.javastatusaddedjsO  K~jtO  K changesK~blob_urlhttps://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetrics.javaraw_urlhttps://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetrics.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetrics.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407patchX  @@ -0,0 +1,126 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.GaugeWithCallback;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.lang.management.BufferPoolMXBean;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+
+/**
+ * JVM Buffer Pool metrics. The {@link JvmBufferPoolMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.newBuilder().register();
+ * }</pre>
+ * However, if you want only the {@link JvmBufferPoolMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmBufferPoolMetrics.newBuilder().register();
+ * }</pre>
+ * Example metrics being exported:
+ * <pre>
+ * # HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool.
+ * # TYPE jvm_buffer_pool_capacity_bytes gauge
+ * jvm_buffer_pool_capacity_bytes{pool="direct"} 8192.0
+ * jvm_buffer_pool_capacity_bytes{pool="mapped"} 0.0
+ * # HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool.
+ * # TYPE jvm_buffer_pool_used_buffers gauge
+ * jvm_buffer_pool_used_buffers{pool="direct"} 1.0
+ * jvm_buffer_pool_used_buffers{pool="mapped"} 0.0
+ * # HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool.
+ * # TYPE jvm_buffer_pool_used_bytes gauge
+ * jvm_buffer_pool_used_bytes{pool="direct"} 8192.0
+ * jvm_buffer_pool_used_bytes{pool="mapped"} 0.0
+ * </pre>
+ */
+public class JvmBufferPoolMetrics {
+
+    private static final String JVM_BUFFER_POOL_USED_BYTES = "jvm_buffer_pool_used_bytes";
+    private static final String JVM_BUFFER_POOL_CAPACITY_BYTES = "jvm_buffer_pool_capacity_bytes";
+    private static final String JVM_BUFFER_POOL_USED_BUFFERS = "jvm_buffer_pool_used_buffers";
+
+    private final PrometheusProperties config;
+    private final List<BufferPoolMXBean> bufferPoolBeans;
+
+    private JvmBufferPoolMetrics(List<BufferPoolMXBean> bufferPoolBeans, PrometheusProperties config) {
+        this.config = config;
+        this.bufferPoolBeans = bufferPoolBeans;
+    }
+
+    private void register(PrometheusRegistry registry) {
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_BUFFER_POOL_USED_BYTES)
+                .withHelp("Used bytes of a given JVM buffer pool.")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("pool")
+                .withCallback(callback -> {
+                    for (BufferPoolMXBean pool : bufferPoolBeans) {
+                        callback.call(pool.getMemoryUsed(), pool.getName());
+                    }
+                })
+                .register(registry);
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_BUFFER_POOL_CAPACITY_BYTES)
+                .withHelp("Bytes capacity of a given JVM buffer pool.")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("pool")
+                .withCallback(callback -> {
+                    for (BufferPoolMXBean pool : bufferPoolBeans) {
+                        callback.call(pool.getTotalCapacity(), pool.getName());
+                    }
+                })
+                .register(registry);
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_BUFFER_POOL_USED_BUFFERS)
+                .withHelp("Used buffers of a given JVM buffer pool.")
+                .withLabelNames("pool")
+                .withCallback(callback -> {
+                    for (BufferPoolMXBean pool : bufferPoolBeans) {
+                        callback.call(pool.getCount(), pool.getName());
+                    }
+                })
+                .register(registry);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private List<BufferPoolMXBean> bufferPoolBeans;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withBufferPoolBeans(List<BufferPoolMXBean> bufferPoolBeans) {
+            this.bufferPoolBeans = bufferPoolBeans;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            List<BufferPoolMXBean> bufferPoolBeans = this.bufferPoolBeans;
+            if (bufferPoolBeans == null) {
+                bufferPoolBeans = ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class);
+            }
+            new JvmBufferPoolMetrics(bufferPoolBeans, config).register(registry);
+        }
+    }
+}u}(jO  (198a720fbea56da6b7e48ab6ec67ad5d529a8c2djyO  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javaj{O  modifiedjsO  KjtO  Kj}O  Kj~O  https://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javajO  https://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javajO  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407jO  X  @@ -6,25 +6,33 @@
  /**
  * Registers all JVM metrics. Example usage:
  * <pre>{@code
- *   JvmMetrics.register();
+ *   JvmMetrics.newBuilder().register();
  * }</pre>
  */
 public class JvmMetrics {
 
-    public static void register() {
-        register(PrometheusRegistry.defaultRegistry, PrometheusProperties.get());
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
     }
 
-    public static void register(PrometheusRegistry registry) {
-        register(registry, PrometheusProperties.get());
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
     }
 
-    public static void register(PrometheusProperties config) {
-        register(PrometheusRegistry.defaultRegistry, config);
-    }
+    public static class Builder {
+        private final PrometheusProperties config;
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            JvmThreadsMetrics.newBuilder(config).register(registry);
+            JvmBufferPoolMetrics.newBuilder(config).register(registry);
 
-    public static void register(PrometheusRegistry registry, PrometheusProperties config) {
-        JvmThreadsMetrics.register(registry, config);
-        // TODO: Add all other JVM metrics here.
+        }
     }
 }u}(jO  (3819a467dd695ad9add019eb3b2babe534904a7ajyO  uprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetrics.javaj{O  modifiedjsO  K9jtO  Kj}O  KRj~O  https://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javajO  https://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javajO  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407jO  X  @@ -15,11 +15,11 @@
 /**
  * JVM Thread metrics. The {@link JvmThreadsMetrics} are registered as part of the {@link JvmMetrics} like this:
  * <pre>{@code
- *   JvmMetrics.register();
+ *   JvmMetrics.newBuilder().register();
  * }</pre>
  * However, if you want only the {@link JvmThreadsMetrics} you can also register them directly:
  * <pre>{@code
- *   JvmThreadMetrics.register();
+ *   JvmThreadMetrics.newBuilder().register();
  * }</pre>
  * Example metrics being exported:
  * <pre>
@@ -55,7 +55,6 @@
 public class JvmThreadsMetrics {
 
     public static final String UNKNOWN = "UNKNOWN";
-
     public static final String JVM_THREADS_STATE = "jvm_threads_state";
     private static final String JVM_THREADS_CURRENT = "jvm_threads_current";
     private static final String JVM_THREADS_DAEMON = "jvm_threads_daemon";
@@ -64,29 +63,17 @@ public class JvmThreadsMetrics {
     private static final String JVM_THREADS_DEADLOCKED = "jvm_threads_deadlocked";
     private static final String JVM_THREADS_DEADLOCKED_MONITOR = "jvm_threads_deadlocked_monitor";
 
-    private JvmThreadsMetrics() {
-    }
-
-    public static void register() {
-        register(PrometheusRegistry.defaultRegistry, PrometheusProperties.get());
-    }
+    private final PrometheusProperties config;
+    private final ThreadMXBean threadBean;
+    private final boolean isNativeImage;
 
-    public static void register(PrometheusRegistry registry) {
-        register(registry, PrometheusProperties.get());
+    private JvmThreadsMetrics(boolean isNativeImage, ThreadMXBean threadBean, PrometheusProperties config) {
+        this.config = config;
+        this.threadBean = threadBean;
+        this.isNativeImage = isNativeImage;
     }
 
-    public static void register(PrometheusProperties config) {
-        register(PrometheusRegistry.defaultRegistry, config);
-    }
-
-    public static void register(PrometheusRegistry registry, PrometheusProperties config) {
-        Boolean isNativeImage = NativeImageChecker.isGraalVmNativeImage;
-        ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
-        register(isNativeImage, threadBean, registry, config);
-    }
-
-    // package private for testing
-    static void register(Boolean isNativeImage, ThreadMXBean threadBean, PrometheusRegistry registry, PrometheusProperties config) {
+    private void register(PrometheusRegistry registry) {
 
         GaugeWithCallback.newBuilder(config)
                 .withName(JVM_THREADS_CURRENT)
@@ -140,7 +127,7 @@ static void register(Boolean isNativeImage, ThreadMXBean threadBean, PrometheusR
         }
     }
 
-    private static Map<String, Integer> getThreadStateCountMap(ThreadMXBean threadBean) {
+    private Map<String, Integer> getThreadStateCountMap(ThreadMXBean threadBean) {
         long[] threadIds = threadBean.getAllThreadIds();
 
         // Code to remove any thread id values <= 0
@@ -177,7 +164,52 @@ private static Map<String, Integer> getThreadStateCountMap(ThreadMXBean threadBe
         return threadCounts;
     }
 
-    private static double nullSafeArrayLength(long[] array) {
+    private double nullSafeArrayLength(long[] array) {
         return null == array ? 0 : array.length;
     }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Boolean isNativeImage = NativeImageChecker.isGraalVmNativeImage;
+        private ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withThreadBean(ThreadMXBean threadBean) {
+            this.threadBean = threadBean;
+            return this;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withIsNativeImage(boolean isNativeImage) {
+            this.isNativeImage = isNativeImage;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            ThreadMXBean threadBean = this.threadBean != null ? this.threadBean : ManagementFactory.getThreadMXBean();
+            boolean isNativeImage = this.isNativeImage != null ? this.isNativeImage : NativeImageChecker.isGraalVmNativeImage;
+            new JvmThreadsMetrics(isNativeImage, threadBean, config).register(registry);
+        }
+    }
 }u}(jO  (d37a1e2d1f956aff50b02fbe94581424fe70a045jyO  prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/ExampleExporterForManualTesting.javaj{O  modifiedjsO  KjtO  Kj}O  Kj~O  https://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javajO  https://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javajO  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407jO  X,  @@ -9,7 +9,7 @@ public class ExampleExporterForManualTesting {
 
   public static void main(String[] args) throws IOException, InterruptedException {
 
-    JvmMetrics.register();
+    JvmMetrics.newBuilder().register();
 
     HTTPServer server = HTTPServer.newBuilder()
             .withPort(9400)u}(jO  (175c8a8599c2e95673dad7e11103f35404053a0cjyO  |prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetricsTest.javaj{O  addedjsO  K[jtO  K j}O  K[j~O  https://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.javajO  https://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.javajO  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmBufferPoolMetricsTest.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407jO  Xp  @@ -0,0 +1,91 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.management.BufferPoolMXBean;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class JvmBufferPoolMetricsTest {
+
+    private final BufferPoolMXBean directBuffer = Mockito.mock(BufferPoolMXBean.class);
+    private final BufferPoolMXBean mappedBuffer = Mockito.mock(BufferPoolMXBean.class);
+
+    @Before
+    public void setUp() {
+        when(directBuffer.getName()).thenReturn("direct");
+        when(directBuffer.getCount()).thenReturn(2L);
+        when(directBuffer.getMemoryUsed()).thenReturn(1234L);
+        when(directBuffer.getTotalCapacity()).thenReturn(3456L);
+        when(mappedBuffer.getName()).thenReturn("mapped");
+        when(mappedBuffer.getCount()).thenReturn(3L);
+        when(mappedBuffer.getMemoryUsed()).thenReturn(2345L);
+        when(mappedBuffer.getTotalCapacity()).thenReturn(4567L);
+    }
+
+    @Test
+    public void testGoodCase() throws IOException {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmBufferPoolMetrics.newBuilder()
+                        .withBufferPoolBeans(Arrays.asList(mappedBuffer, directBuffer))
+                                .register(registry);
+        MetricSnapshots snapshots = registry.scrape();
+
+        String expected = "" +
+                "# TYPE jvm_buffer_pool_capacity_bytes gauge\n" +
+                "# UNIT jvm_buffer_pool_capacity_bytes bytes\n" +
+                "# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool.\n" +
+                "jvm_buffer_pool_capacity_bytes{pool=\"direct\"} 3456.0\n" +
+                "jvm_buffer_pool_capacity_bytes{pool=\"mapped\"} 4567.0\n" +
+                "# TYPE jvm_buffer_pool_used_buffers gauge\n" +
+                "# HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool.\n" +
+                "jvm_buffer_pool_used_buffers{pool=\"direct\"} 2.0\n" +
+                "jvm_buffer_pool_used_buffers{pool=\"mapped\"} 3.0\n" +
+                "# TYPE jvm_buffer_pool_used_bytes gauge\n" +
+                "# UNIT jvm_buffer_pool_used_bytes bytes\n" +
+                "# HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool.\n" +
+                "jvm_buffer_pool_used_bytes{pool=\"direct\"} 1234.0\n" +
+                "jvm_buffer_pool_used_bytes{pool=\"mapped\"} 2345.0\n" +
+                "# EOF\n";
+
+        Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
+    }
+
+    private String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        writer.write(out, snapshots);
+        return out.toString(StandardCharsets.UTF_8.name());
+    }
+
+    @Test
+    public void testIgnoredMetricNotScraped() {
+        MetricNameFilter filter = MetricNameFilter.newBuilder()
+                .nameMustNotBeEqualTo("jvm_buffer_pool_used_bytes")
+                .build();
+
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmBufferPoolMetrics.newBuilder()
+                .withBufferPoolBeans(Arrays.asList(directBuffer, mappedBuffer))
+                .register(registry);
+        registry.scrape(filter);
+
+        verify(directBuffer, times(0)).getMemoryUsed();
+        verify(mappedBuffer, times(0)).getMemoryUsed();
+        verify(directBuffer, times(1)).getTotalCapacity();
+        verify(mappedBuffer, times(1)).getTotalCapacity();
+    }
+}u}(jO  (7d5657acbff7efe2774001db53ff81f9c6d9ca10jyO  yprometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetricsTest.javaj{O  modifiedjsO  K
jtO  Kj}O  K
j~O  https://github.com/prometheus/client_java/blob/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javajO  https://github.com/prometheus/client_java/raw/fa1669cc7f0df4fd66ce7859050376f17d73a407/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javajO  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.java?ref=fa1669cc7f0df4fd66ce7859050376f17d73a407jO  XC  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.instrumentation.jvm;
 
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.model.registry.MetricNameFilter;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
@@ -52,7 +53,10 @@ public void setUp() {
     @Test
     public void testGoodCase() throws IOException {
         PrometheusRegistry registry = new PrometheusRegistry();
-        JvmThreadsMetrics.register(false, mockThreadsBean, registry, PrometheusProperties.get());
+        JvmThreadsMetrics.newBuilder()
+                .withThreadBean(mockThreadsBean)
+                .withIsNativeImage(false)
+                .register(registry);
         MetricSnapshots snapshots = registry.scrape();
 
         String expected = "" +
@@ -102,7 +106,10 @@ public void testIgnoredMetricNotScraped() {
                 .build();
 
         PrometheusRegistry registry = new PrometheusRegistry();
-        JvmThreadsMetrics.register(false, mockThreadsBean, registry, PrometheusProperties.get());
+        JvmThreadsMetrics.newBuilder()
+                .withThreadBean(mockThreadsBean)
+                .withIsNativeImage(false)
+                .register(registry);
         registry.scrape(filter);
 
         verify(mockThreadsBean, times(0)).findDeadlockedThreads();
@@ -112,7 +119,7 @@ public void testIgnoredMetricNotScraped() {
     @Test
     public void testInvalidThreadIds() {
         PrometheusRegistry registry = new PrometheusRegistry();
-        JvmThreadsMetrics.register(registry);
+        JvmThreadsMetrics.newBuilder().register(registry);
         MetricSnapshots snapshots = registry.scrape();
 
         // Number of threads to create with invalid thread idsueu(1d01ba565e2e591629716c995bbbdbda55ac1fa4}(sha(1d01ba565e2e591629716c995bbbdbda55ac1fa4node_idEC_kwDOAHoJt9oAKDFkMDFiYTU2NWUyZTU5MTYyOTcxNmM5OTViYmJkYmRhNTVhYzFmYTQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:21:09Zu	committer}(jO  Fabian StäberjO  fabian@fstab.dejO  2023-06-12T20:21:09ZumessageMove core metrics packagetree}(jO  (3c1ae3e11dada2474ac868567088c1635cc0b936urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/3c1ae3e11dada2474ac868567088c1635cc0b936ujO  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1d01ba565e2e591629716c995bbbdbda55ac1fa4      
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujO  dhttps://api.github.com/repos/prometheus/client_java/commits/1d01ba565e2e591629716c995bbbdbda55ac1fa4html_urlYhttps://github.com/prometheus/client_java/commit/1d01ba565e2e591629716c995bbbdbda55ac1fa4comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1d01ba565e2e591629716c995bbbdbda55ac1fa4/commentsjO  }(loginfstabidJ' jO  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jO  "https://api.github.com/users/fstabjO  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujO  }(jO  fstabjO  J' jO  MDQ6VXNlcjMzMDUzNQ==jO  2https://avatars.githubusercontent.com/u/330535?v=4jO  h3jO  "https://api.github.com/users/fstabjO  https://github.com/fstabjO  ,https://api.github.com/users/fstab/followersjO  9https://api.github.com/users/fstab/following{/other_user}jO  2https://api.github.com/users/fstab/gists{/gist_id}jO  9https://api.github.com/users/fstab/starred{/owner}{/repo}jO  0https://api.github.com/users/fstab/subscriptionsjO  'https://api.github.com/users/fstab/orgsjO  (https://api.github.com/users/fstab/reposjO  3https://api.github.com/users/fstab/events{/privacy}jO  2https://api.github.com/users/fstab/received_eventsjO  UserjO  uparents]}(jO  (61d3f495b47818f91e51ac6fd82b517ceff43ec9jO  dhttps://api.github.com/repos/prometheus/client_java/commits/61d3f495b47818f91e51ac6fd82b517ceff43ec9jO  Yhttps://github.com/prometheus/client_java/commit/61d3f495b47818f91e51ac6fd82b517ceff43ec9uastats}(totalK	additionsKL	deletionsKNufiles](}(jO  (ea804f452647195e5df0198d23f88cb9068d3196filename_prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javastatusrenamedjP  KjP  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaraw_urlhttps://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4patchX   @@ -1,11 +1,11 @@
-package io.prometheus.metrics.exemplars;
+package io.prometheus.metrics.core.exemplars;
 
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.util.Scheduler;
+import io.prometheus.metrics.core.util.Scheduler;
 
 import java.util.ArrayList;
 import java.util.List;previous_filenameZprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/ExemplarSampler.javau}(jO  (c9047e399fa3b461718d9a05046b0c58fecfe704jP  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfig.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.exemplars;
+package io.prometheus.metrics.core.exemplars;
 
 import io.prometheus.metrics.config.ExemplarProperties;
 import io.prometheus.metrics.config.PrometheusProperties;j#P  `prometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/ExemplarSamplerConfig.javau}(jO  (2b5a5408aab133d7098447fe3fc72de0b7be3324jP  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicLong;j#P  Lprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Buffer.javau}(jO  (22662c62ebde47679a03e46d1aeb6000a7954107jP  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 // The original implementation was copied from
 // https://raw.githubusercontent.com/Netflix/ocelli/master/ocelli-core/src/main/java/netflix/ocelli/stats/CKMSQuantiles.javaj#P  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/CKMSQuantiles.javau}(jO  (f4b8f304cb516a02abc626611eff674448ad1913jP  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajP  renamedjP  K
jP  K
jP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X|
  @@ -1,13 +1,13 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.exemplars.ExemplarSampler;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.observer.DiscreteEventObserver;
+import io.prometheus.metrics.core.observer.DiscreteEventObserver;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -167,7 +167,7 @@ public static class FromCallback extends Metric {
         private final DoubleSupplier callback;
         private final long createdTimeMillis = System.currentTimeMillis();
 
-        private FromCallback(io.prometheus.metrics.core.Counter.FromCallback.Builder builder) {
+        private FromCallback(Counter.FromCallback.Builder builder) {
             super(builder);
             this.callback = builder.callback;
         }
@@ -182,26 +182,26 @@ public CounterSnapshot collect() {
             )));
         }
 
-        public static class Builder extends Metric.Builder<io.prometheus.metrics.core.Counter.FromCallback.Builder, io.prometheus.metrics.core.Counter.FromCallback> {
+        public static class Builder extends Metric.Builder<Counter.FromCallback.Builder, Counter.FromCallback> {
 
             private DoubleSupplier callback;
 
             private Builder(PrometheusProperties config) {
                 super(Collections.emptyList(), config);
             }
 
-            public io.prometheus.metrics.core.Counter.FromCallback.Builder withCallback(DoubleSupplier callback) {
+            public Counter.FromCallback.Builder withCallback(DoubleSupplier callback) {
                 this.callback = callback;
                 return this;
             }
 
             @Override
-            public io.prometheus.metrics.core.Counter.FromCallback build() {
-                return new io.prometheus.metrics.core.Counter.FromCallback(withName(normalizeName(name)));
+            public Counter.FromCallback build() {
+                return new Counter.FromCallback(withName(normalizeName(name)));
             }
 
             @Override
-            protected io.prometheus.metrics.core.Counter.FromCallback.Builder self() {
+            protected Counter.FromCallback.Builder self() {
                 return this;
             }
         }j#P  Mprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Counter.javau}(jO  (695ebffd812831c2d043f488a8f8cb56427a4e18jP  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,13 +1,13 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.exemplars.ExemplarSampler;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.observer.GaugingObserver;
+import io.prometheus.metrics.core.observer.GaugingObserver;
 
 import java.util.ArrayList;
 import java.util.Collections;j#P  Kprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Gauge.javau}(jO  (46d3b1d4d03d862fdfbe61b0df1e37d62e407d62jP  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  XG  @@ -1,17 +1,17 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.ExemplarProperties;
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.exemplars.ExemplarSampler;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.HistogramSnapshot;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.NativeHistogramBuckets;
-import io.prometheus.metrics.observer.DistributionObserver;
-import io.prometheus.metrics.util.Scheduler;
+import io.prometheus.metrics.core.observer.DistributionObserver;
+import io.prometheus.metrics.core.util.Scheduler;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -25,7 +25,6 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
-import java.util.function.Function;
 
 /**
  * Prometheus supports two internal representations of histograms:j#P  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Histogram.javau}(jO  (ce1993dd1a9390389272988a1f287121dbeacf40jP  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.InfoSnapshot;j#P  Jprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Info.javau}(jO  (02002d8b7f7095b3fc587b507dbfe984a40c9487jP  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X~  @@ -1,12 +1,10 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.*;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.function.Function;
 
 public abstract class Metric {
 j#P  Lprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Metric.javau}(jO  (7c9a1aab987d79115d635c24a14198cac5a9f43cjP  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricData.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricData.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.observer.Observer;
+import io.prometheus.metrics.core.observer.Observer;
 
 // package private
 abstract class MetricData<T extends Observer> {j#P  Pprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/MetricData.javau}(jO  (66704363aedc4c285cf668082bb758867e661fbbjP  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/ObservingMetric.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetric.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,10 +1,10 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.MetricSnapshot;
-import io.prometheus.metrics.observer.Observer;
+import io.prometheus.metrics.core.observer.Observer;
 
 import java.util.ArrayList;
 import java.util.Arrays;j#P  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/ObservingMetric.javau}(jO  (80badc2de13ee2e0223aedd0405e6eb88afd2924jP  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,10 +1,10 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.StateSetSnapshot;
-import io.prometheus.metrics.observer.StateObserver;
+import io.prometheus.metrics.core.observer.StateObserver;
 
 import java.util.ArrayList;
 import java.util.Collections;j#P  Nprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/StateSet.javau}(jO  (66d8df49981a2be70a515d5dad1180c717596d04jP  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X4  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
@@ -7,7 +7,7 @@
 import io.prometheus.metrics.model.Quantile;
 import io.prometheus.metrics.model.Quantiles;
 import io.prometheus.metrics.model.SummarySnapshot;
-import io.prometheus.metrics.observer.DistributionObserver;
+import io.prometheus.metrics.core.observer.DistributionObserver;
 
 import java.util.ArrayList;
 import java.util.Collections;j#P  Mprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Summary.javau}(jO  (d08de2aab0bc0df41b1465a97ee74e1f51242273jP  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TimeWindowQuantiles.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.core.CKMSQuantiles.Quantile;
+import io.prometheus.metrics.core.metrics.CKMSQuantiles.Quantile;
 
 import java.util.concurrent.TimeUnit;
 j#P  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/TimeWindowQuantiles.javau}(jO  (923ccf2adf88f0a706f06ce132ed5e84ec20408bjP  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DiscreteEventObserver.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDiscreteEventObserver.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.observer;
+package io.prometheus.metrics.core.observer;
 
 import io.prometheus.metrics.model.Labels;
 j#P  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/DiscreteEventObserver.javau}(jO  (55e7fb55c170862367d52012816b3a4259298271jP  cprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DistributionObserver.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDistributionObserver.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.observer;
+package io.prometheus.metrics.core.observer;
 
 import io.prometheus.metrics.model.Labels;
 j#P  ^prometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/DistributionObserver.javau}(jO  (568d6ca5247972d5a38bd7fc41cf79357420f63djP  ^prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/GaugingObserver.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FGaugingObserver.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.observer;
+package io.prometheus.metrics.core.observer;
 
 import io.prometheus.metrics.model.Labels;
 j#P  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/GaugingObserver.javau}(jO  (1824cd860508c6fe58ba279e8ef42ad9667d405djP  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/Observer.javajP  addedjP  KjP  K jP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FObserver.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FObserver.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  _@@ -0,0 +1,4 @@
+package io.prometheus.metrics.core.observer;
+
+public interface Observer {
+}u}(jO  (89ec0f176e091536df11595fd98fec0b9ed2fc83jP  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/StateObserver.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateObserver.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FStateObserver.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.observer;
+package io.prometheus.metrics.core.observer;
 
 public interface StateObserver extends Observer {
     void setTrue(String state);j#P  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/StateObserver.javau}(jO  (39ce0e550e606a9fc48c14c6007bf2a316071922jP  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/Timer.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FTimer.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FTimer.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FTimer.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.observer;
+package io.prometheus.metrics.core.observer;
 
 import java.io.Closeable;
 import java.io.IOException;j#P  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/Timer.javau}(jO  (937c5959c1c40c70e36ecbdee3bcc9410a198b16jP  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/registry/Collector.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FCollector.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.registry;
+package io.prometheus.metrics.core.registry;
 
 import io.prometheus.metrics.model.MetricSnapshots;
 j#P  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/registry/Collector.javau}(jO  (8390b93a8848405a533a49ceed58ddb0a3f16c1bjP  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/registry/PrometheusRegistry.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fregistry%2FPrometheusRegistry.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,13 +1,14 @@
-package io.prometheus.metrics.registry;
+package io.prometheus.metrics.core.registry;
 
+import io.prometheus.metrics.core.metrics.Metric;
 import io.prometheus.metrics.model.Labels;
 
 public class PrometheusRegistry {
     public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
-    public void register(io.prometheus.metrics.core.Metric metric) {}
+    public void register(Metric metric) {}
     public void register(Collector collector) {}
 
-    public void unregister(io.prometheus.metrics.core.Metric metric) {}
+    public void unregister(Metric metric) {}
     public void unregister(Collector collector) {}
     public void unregister(String name) {}
     public void unregister(String name, Labels labels) {}j#P  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/registry/PrometheusRegistry.javau}(jO  (0a6f267bdf90c4d259904a1c299b8cb4abb1d357jP  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/util/Scheduler.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.util;
+package io.prometheus.metrics.core.util;
 
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executors;j#P  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/util/Scheduler.javau}(jO  (22446c1cd789b37d9b0297936b1bdd3146f74fe1jP  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/observer/Observer.javajP  removedjP  K jP  KjP  KjP  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fobserver%2FObserver.javajP  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fobserver%2FObserver.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fobserver%2FObserver.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j!P  Z@@ -1,4 +0,0 @@
-package io.prometheus.metrics.observer;
-
-public interface Observer {
-}u}(jO  (c20482e44fd4dbf031a75df60a851bb089bd8bfdjP  mprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfigTestUtil.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.exemplars;
+package io.prometheus.metrics.core.exemplars;
 
-import io.prometheus.metrics.core.Counter;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 
 import java.lang.reflect.Field;
 j#P  hprometheus-metrics-core/src/test/java/io/prometheus/metrics/exemplars/ExemplarSamplerConfigTestUtil.javau}(jO  (fd36a32ac201eca7e77fa0897229e6802c811902jP  cprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  Xt  @@ -1,10 +1,12 @@
-package io.prometheus.metrics.exemplars;
+package io.prometheus.metrics.core.exemplars;
 
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Label;
-import io.prometheus.metrics.util.Scheduler;
+import io.prometheus.metrics.core.util.Scheduler;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;j#P  ^prometheus-metrics-core/src/test/java/io/prometheus/metrics/exemplars/ExemplarSamplerTest.javau}(jO  (3eed2121c2feef940ab2a028c398d34d498e6b96jP  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,9 +1,9 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.expositionformat.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.CounterSnapshot;
@@ -19,7 +19,7 @@
 
 import java.util.Iterator;
 
-import static io.prometheus.metrics.core.TestUtil.assertExemplarEquals;
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.rules.ExpectedException.none;
 j#P  Qprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/CounterTest.javau}(jO  (51a79eccca977f36656097f1afc0cc2d64c4bfc3jP  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  XK  @@ -1,22 +1,18 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.observer.Timer;
+import io.prometheus.metrics.core.observer.Timer;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.util.concurrent.TimeUnit;
-
-import static io.prometheus.metrics.core.TestUtil.assertExemplarEquals;
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
 import static org.junit.Assert.assertEquals;
 
 public class GaugeTest {j#P  Oprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/GaugeTest.javau}(jO  (2f5bcdd68aa6cc6a2f01314f505f8a1c63485a6cjP  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,17 +1,17 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.expositionformat.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
 import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.ClassicHistogramBucket;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.HistogramSnapshot;
 import io.prometheus.metrics.model.Labels;
-import io.prometheus.metrics.observer.DistributionObserver;
+import io.prometheus.metrics.core.observer.DistributionObserver;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -37,7 +37,7 @@
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
 
-import static io.prometheus.metrics.core.TestUtil.assertExemplarEquals;
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 j#P  Sprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/HistogramTest.javau}(jO  (55662006ca6bd2752287a94b2f6cd17bce266108jP  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  X  @@ -1,5 +1,6 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
+import io.prometheus.metrics.core.metrics.Info;
 import io.prometheus.metrics.model.InfoSnapshot;
 import io.prometheus.metrics.model.Labels;
 import org.junit.Assert;j#P  Nprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/InfoTest.javau}(jO  (bf8db1f8d2c4cd06b44403eeac4e99651ac11e69jP  aprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/ObservingMetricTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FObservingMetricTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,5 +1,6 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
+import io.prometheus.metrics.core.metrics.Counter;
 import org.junit.Assert;
 import org.junit.Test;
 j#P  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/ObservingMetricTest.javau}(jO  (3b0f4bbdc293dc52f1b0ecc29f7e85ec1160f89fjP  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  XI  @@ -1,6 +1,6 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.CounterSnapshot;
+import io.prometheus.metrics.core.metrics.StateSet;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.StateSetSnapshot;
 import org.junit.Assert;j#P  Rprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/StateSetTest.javau}(jO  (c92f9171f98e85bf95dd6290c0858e1553daa175jP  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TestUtil.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.model.Exemplar;
 import org.junit.Assert;j#P  Nprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/TestUtil.javau}(jO  (996e199db1f7bd41488532f5dccdd98e8fe8f0f4jP  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TodoTest.javajP  renamedjP  KjP  KjP  KjP  https://github.com/prometheus/client_java/blob/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javajP  https://github.com/prometheus/client_java/raw/1d01ba565e2e591629716c995bbbdbda55ac1fa4/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javajP  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.java?ref=1d01ba565e2e591629716c995bbbdbda55ac1fa4j!P  ~@@ -1,4 +1,4 @@
-package io.prometheus.metrics.core;
+package io.prometheus.metrics.core.metrics;
 
 public class TodoTest {
 j#P  Nprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/TodoTest.javaueu(a9efe238980887ec71ad324df14251516629662f}(sha(a9efe238980887ec71ad324df14251516629662fnode_idEC_kwDOAHoJt9oAKGE5ZWZlMjM4OTgwODg3ZWM3MWFkMzI0ZGYxNDI1MTUxNjYyOTY2MmYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:59:28Zu	committer}(jVQ  Fabian StäberjXQ  fabian@fstab.dejZQ  2023-08-26T21:59:28Zumessage
Fix readmetree}(jNQ  (24263cb1c58797ab27834cf66b06d271d12c0541urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/24263cb1c58797ab27834cf66b06d271d12c0541ujfQ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/a9efe238980887ec71ad324df14251516629662f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujfQ  dhttps://api.github.com/repos/prometheus/client_java/commits/a9efe238980887ec71ad324df14251516629662fhtml_urlYhttps://github.com/prometheus/client_java/commit/a9efe238980887ec71ad324df14251516629662fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/a9efe238980887ec71ad324df14251516629662f/commentsjTQ  }(loginfstabidJ' jPQ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jfQ  "https://api.github.com/users/fstabjrQ  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj\Q  }(jwQ  fstabjyQ  J' jPQ  MDQ6VXNlcjMzMDUzNQ==j{Q  2https://avatars.githubusercontent.com/u/330535?v=4j}Q  h3jfQ  "https://api.github.com/users/fstabjrQ  https://github.com/fstabjQ  ,https://api.github.com/users/fstab/followersjQ  9https://api.github.com/users/fstab/following{/other_user}jQ  2https://api.github.com/users/fstab/gists{/gist_id}jQ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jQ  0https://api.github.com/users/fstab/subscriptionsjQ  'https://api.github.com/users/fstab/orgsjQ  (https://api.github.com/users/fstab/reposjQ  3https://api.github.com/users/fstab/events{/privacy}jQ  2https://api.github.com/users/fstab/received_eventsjQ  UserjQ  uparents]}(jNQ  (899fe45b0c0b1435c012df04ac531ad943100d57jfQ  dhttps://api.github.com/repos/prometheus/client_java/commits/899fe45b0c0b1435c012df04ac531ad943100d57jrQ  Yhttps://github.com/prometheus/client_java/commit/899fe45b0c0b1435c012df04ac531ad943100d57uastats}(totalK	additionsK	deletionsKufiles]}(jNQ  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953filename2examples/example-exemplars-tail-sampling/README.mdstatusmodifiedjQ  KjQ  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/a9efe238980887ec71ad324df14251516629662f/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/a9efe238980887ec71ad324df14251516629662f/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=a9efe238980887ec71ad324df14251516629662fpatchX  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 uau(cdb39e3b94bc4e1f5938e345c0aca16a6e817182}(sha(cdb39e3b94bc4e1f5938e345c0aca16a6e817182node_idEC_kwDOAHoJt9oAKGNkYjM5ZTNiOTRiYzRlMWY1OTM4ZTM0NWMwYWNhMTZhNmU4MTcxODIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(jQ  Fabian StäberjQ  fabian@fstab.dejQ  2023-08-11T20:37:32ZumessageAdd OpenTelemetry Exportertree}(jQ  (f4200ef7af519d6dae3f83e19605f68cc78a83c6urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f4200ef7af519d6dae3f83e19605f68cc78a83c6ujQ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cdb39e3b94bc4e1f5938e345c0aca16a6e817182
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujQ  dhttps://api.github.com/repos/prometheus/client_java/commits/cdb39e3b94bc4e1f5938e345c0aca16a6e817182html_urlYhttps://github.com/prometheus/client_java/commit/cdb39e3b94bc4e1f5938e345c0aca16a6e817182comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/commentsjQ  }(loginfstabidJ' jQ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jQ  "https://api.github.com/users/fstabjQ  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujQ  }(jQ  fstabjQ  J' jQ  MDQ6VXNlcjMzMDUzNQ==jQ  2https://avatars.githubusercontent.com/u/330535?v=4jQ  h3jQ  "https://api.github.com/users/fstabjQ  https://github.com/fstabjQ  ,https://api.github.com/users/fstab/followersjQ  9https://api.github.com/users/fstab/following{/other_user}jQ  2https://api.github.com/users/fstab/gists{/gist_id}jQ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jQ  0https://api.github.com/users/fstab/subscriptionsjQ  'https://api.github.com/users/fstab/orgsjR  (https://api.github.com/users/fstab/reposjR  3https://api.github.com/users/fstab/events{/privacy}jR  2https://api.github.com/users/fstab/received_eventsjR  Userj	R  uparents]}(jQ  (97cfe5accbf64cba792cdc32a524244f71a66086jQ  dhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086jQ  Yhttps://github.com/prometheus/client_java/commit/97cfe5accbf64cba792cdc32a524244f71a66086uastats}(totalM	additionsM	deletionsKufiles](}(jQ  (d18ecdfb29d1d2e8f8b720a1d7c77a1a3d79b4d4filename#examples/example-httpserver/pom.xmlstatusmodifiedj#R  Kj$R  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-httpserver%2Fpom.xmlraw_url~https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-httpserver%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182patchXJ  @@ -58,7 +58,7 @@
                         <configuration>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>u}(jQ  (1913676345d30c927811eda0605a2999cb4f0bb0j)R  (examples/example-opentelemetry/README.mdj+R  addedj#R  K%j$R  K j-R  K%j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2FREADME.mdj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2FREADME.mdj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jQ  (3f4ef3995f855ba5cd63ba4e666601a402c2c241j)R  9examples/example-opentelemetry/config/otelcol-config.yamlj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamlj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamlj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X`  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: "http://localhost:9090/api/v1/push"
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging]u}(jQ  (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391j)R  5examples/example-opentelemetry/config/prometheus.yamlj+R  addedj#R  K j$R  K j-R  K j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yamlj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yamlj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182u}(jQ  (18fe52635228407f44434721757b66e8225fd072j)R  2examples/example-opentelemetry/docker-compose.yamlj+R  addedj#R  K j$R  K j-R  K j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fdocker-compose.yamlj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fdocker-compose.yamlj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fdocker-compose.yaml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,32 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    volumes:
+      - ./target/prometheus-opentelemetry-example-app.jar:/prometheus-opentelemetry-example-app.jar
+    command:
+      - java
+      - -jar
+      - /prometheus-opentelemetry-example-app.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --config.file=/prometheus.yamlu}(jQ  (d04c33121a49d5418adcb903f8fcf257af833fb5j)R  &examples/example-opentelemetry/pom.xmlj+R  addedj#R  KGj$R  K j-R  KGj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fpom.xmlj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fpom.xmlj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fpom.xml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>prometheus-opentelemetry-example-app</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u      }(jQ  (ef5c5157172b0193dfe2e25898f835f0a7810d2dj)R  cexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj2R  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,27 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+    public static void main(String[] args) throws InterruptedException {
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter openTelemetryExporter = new OpenTelemetryExporter();
+        openTelemetryExporter.start(PrometheusRegistry.defaultRegistry);
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jQ  (78241ce64e491d4cd3ee77185a278c3ea7c1dfc6j)R  examples/pom.xmlj+R  modifiedj#R  Kj$R  K j-R  Kj.R  jhttps://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fpom.xmlj0R  ihttps://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/examples%2Fpom.xmlj2R  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  @@ -36,6 +36,7 @@
         <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-opentelemetry</module>
     </modules>
 
 </project>u}(jQ  (7889df125f300c512a1310ce5e1fe8eface6e618j)R  pom.xmlj+R  modifiedj#R  Kj$R  K j-R  Kj.R  _https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/pom.xmlj0R  ^https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/pom.xmlj2R  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  Xj  @@ -58,6 +58,7 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
         <module>examples</module>
         <module>integration-tests</module>
 u}(jQ  (d9eddf5d1959653d954ffab6dc310f85fad3c698j)R  1prometheus-metrics-exporter-opentelemetry/pom.xmlj+R  addedj#R  K\j$R  K j-R  K\j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj2R  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>1.28.0-alpha</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+        -->
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>1.28.0</version>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+</project>u}(jQ  (5376fefc2144e7586997bd1c561acf9885597738j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj2R  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.opentelemetry.sdk.metrics.export.MetricExporter;
+import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.time.Duration;
+
+public class OpenTelemetryExporter {
+
+    public void start(PrometheusRegistry registry) {
+        PrometheusResourceAttributes resourceAttributes = new PrometheusResourceAttributes();
+        MetricExporter exporter = OtlpHttpMetricExporter.builder()
+                .setEndpoint("http://localhost:4318/v1/metrics")
+                .build();
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(5)) // TODO: this is only for debugging, way too busy for production.
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, resourceAttributes.getInstrumentationScopeInfo(), resourceAttributes.getResource());
+        reader.register(prometheusMetricProducer);
+    }
+}u}(jQ  (0c72909ccf466456f52c3bcc229183b53fee330bj)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj+R  addedj#R  K)j$R  K j-R  K)j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj2R  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.metrics.internal.export.MetricProducer;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        MetricSnapshots snapshots = registry.scrape(); // TODO: Filter
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                result.add(factory.create((CounterSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+}u}(jQ  (fb2e026df0acc7b6d7af76f32f914dab07fbca24j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusResourceAttributes.javaj+R  addedj#R  KDj$R  K j-R  KDj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusResourceAttributes.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X
  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.opentelemetry.api.GlobalOpenTelemetry;
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
+import io.opentelemetry.sdk.resources.Resource;
+
+import java.lang.reflect.Field;
+import java.util.Properties;
+
+public class PrometheusResourceAttributes {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusResourceAttributes() {
+        this.instrumentationScopeInfo = loadInstrumentationScopeInfo();
+        this.resource = loadExistingResource(GlobalOpenTelemetry.get());
+    }
+
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+        return instrumentationScopeInfo;
+    }
+
+    public Resource getResource() {
+        return resource;
+    }
+
+    private static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusResourceAttributes.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+
+    private static Resource loadExistingResource(OpenTelemetry openTelemetry) {
+        try {
+            MeterProvider meterProvider = openTelemetry.getMeterProvider();
+            if (meterProvider instanceof SdkMeterProvider) {
+                Field sharedStateField = SdkMeterProvider.class.getDeclaredField("sharedState");
+                sharedStateField.setAccessible(true);
+                MeterProviderSharedState sharedState = (MeterProviderSharedState) sharedStateField.get(meterProvider);
+                return sharedState.getResource();
+            }
+        } catch (Exception ignored) {}
+        return Resource.empty();
+    }
+}u}(jQ  (2468702a1904c740460e98980e907474ab31e751j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj+R  addedj#R  K1j$R  K j-R  K1j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  XM  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl implements DoublePointData {
+
+    private final double value;
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.value = value;
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(jQ  (dbd69b2d45f75e70160b07bd111df064359682c2j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(jQ  (4ea1586db7d3b7ac853334b924b3a6852539555ej)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  y@@ -0,0 +1,4 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+class PrometheusClassicHistogram {
+}u}(jQ  (0a45904d7a58f70efa94c130f372eb1fe1f4dc43j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj+R  addedj#R  K3j$R  K j-R  K3j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X  @@ -0,0 +1,51 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                startEpochNanos,
+                epochNanos,
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(jQ  (31a6aaae7cfc712bc25569de7c696bb8c9730c06j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj+R  addedj#R  K*j$R  K j-R  K*j.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj2R  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  Xi  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.common.AttributesBuilder;
+import io.opentelemetry.sdk.metrics.data.Data;
+import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return Collections.emptyList();
+    }
+}u}(jQ  (00474905371b1ab53ce6d06fd76d93fc652d5741j)R  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj+R  addedj#R  KJj$R  K j-R  KJj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj2R  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  X	  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
+import io.opentelemetry.sdk.metrics.data.DoublePointData;
+import io.opentelemetry.sdk.metrics.data.MetricData;
+import io.opentelemetry.sdk.metrics.data.MetricDataType;
+import io.opentelemetry.sdk.metrics.data.SumData;
+import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = metricMetadata.getName();
+        this.description = metricMetadata.getHelp();
+        this.unit = metricMetadata.getUnit() == null ? null : metricMetadata.getUnit().toString();
+        this.data = data;
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (getType() == MetricDataType.DOUBLE_SUM) {
+            return (PrometheusCounter) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(jQ  (f5d86ba1f71fd7393035dff48f730aca3caea09ej)R  \prometheus-metrics-exporter-opentelemetry/src/main/resources/instrumentationScope.propertiesj+R  addedj#R  Kj$R  K j-R  Kj.R  https://github.com/prometheus/client_java/blob/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.propertiesj0R  https://github.com/prometheus/client_java/raw/cdb39e3b94bc4e1f5938e345c0aca16a6e817182/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.propertiesj2R  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2FinstrumentationScope.properties?ref=cdb39e3b94bc4e1f5938e345c0aca16a6e817182j4R  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}ueu(a76a65ddb62b50eb2c33a46e98cde4f4479a54a6}(sha(a76a65ddb62b50eb2c33a46e98cde4f4479a54a6node_idEC_kwDOAHoJt9oAKGE3NmE2NWRkYjYyYjUwZWIyYzMzYTQ2ZTk4Y2RlNGY0NDc5YTU0YTYcommit}(author}(name
Doug Hoardemaildhoard@users.noreply.github.comdate2023-08-05T23:17:26Zu	committer}(jR  GitHubjR  noreply@github.comjR  2023-08-05T23:17:26ZumessageuMerge pull request #856 from dhoard/text-write-performance-change

Changed to remove use of inefficient String methodtree}(jR  (a04cccc7b10e87865f8a4f2780a3065b517f862burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a04cccc7b10e87865f8a4f2780a3065b517f862bujR  hhttps://api.github.com/repos/prometheus/client_java/git/commits/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkztiGCRBK7hj4Ov3rIwAAKlQIAC8Vy+5Vm/5XjKzzfRzptyZF
ulFTEWUibOqjctwgWaWrlqxnlPTDiweJlTHulnXBDHCiDbt6V8pcmAZSTgBUTXgi
rst3sbnTlwv/dKDk1x6SsTROYCefQNo2g6S1MuozL87nBjJfy8C0y7n1MKtK4DII
lCUni85iSKx2FVfJZ4DuWe36ApGyRl0TBpoha9udrweHnEC5IObJO4BP3uvEECz7
YEbqEV1ZGnAa4nWOCd2KhIfZ8LH30Yi7OgXw2d1ecUN2L0i5hAKHQ2cHa6RI3A96
2/Q3J+1Wscle11OynLo78LcyuqS+3T/GS3A1II2dIVj/23ZS5eQSZmAUntJSV4U=
=Nkam
-----END PGP SIGNATURE-----
payloadX  tree a04cccc7b10e87865f8a4f2780a3065b517f862b
parent 98967b8367216f4107ad5621f260ed895c930262
parent 27fe3b733165230c4f5ae6f9bbf3242b095b8ad7
author Doug Hoard <dhoard@users.noreply.github.com> 1691277446 -0400
committer GitHub <noreply@github.com> 1691277446 -0400

Merge pull request #856 from dhoard/text-write-performance-change

Changed to remove use of inefficient String methoduujR  dhttps://api.github.com/repos/prometheus/client_java/commits/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6html_urlYhttps://github.com/prometheus/client_java/commit/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6/commentsjR  }(logindhoardidJV'jR  MDQ6VXNlcjE5Mzc2NDcw
avatar_url4https://avatars.githubusercontent.com/u/19376470?v=4gravatar_idh3jR  #https://api.github.com/users/dhoardjR  https://github.com/dhoard
followers_url-https://api.github.com/users/dhoard/followers
following_url:https://api.github.com/users/dhoard/following{/other_user}	gists_url3https://api.github.com/users/dhoard/gists{/gist_id}starred_url:https://api.github.com/users/dhoard/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/dhoard/subscriptionsorganizations_url(https://api.github.com/users/dhoard/orgs	repos_url)https://api.github.com/users/dhoard/repos
events_url4https://api.github.com/users/dhoard/events{/privacy}received_events_url3https://api.github.com/users/dhoard/received_eventstypeUser
site_adminujR  }(jR  web-flowjR  J/jR  MDQ6VXNlcjE5ODY0NDQ3jR  4https://avatars.githubusercontent.com/u/19864447?v=4j S  h3jR  %https://api.github.com/users/web-flowjR  https://github.com/web-flowjS  /https://api.github.com/users/web-flow/followersjS  <https://api.github.com/users/web-flow/following{/other_user}jS  5https://api.github.com/users/web-flow/gists{/gist_id}j	S  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jS  3https://api.github.com/users/web-flow/subscriptionsj
S  *https://api.github.com/users/web-flow/orgsjS  +https://api.github.com/users/web-flow/reposjS  6https://api.github.com/users/web-flow/events{/privacy}jS  5https://api.github.com/users/web-flow/received_eventsjS  UserjS  uparents](}(jR  (98967b8367216f4107ad5621f260ed895c930262jR  dhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262jR  Yhttps://github.com/prometheus/client_java/commit/98967b8367216f4107ad5621f260ed895c930262u}(jR  (27fe3b733165230c4f5ae6f9bbf3242b095b8ad7jR  dhttps://api.github.com/repos/prometheus/client_java/commits/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7jR  Yhttps://github.com/prometheus/client_java/commit/27fe3b733165230c4f5ae6f9bbf3242b095b8ad7uestats}(totalK
	additionsK	deletionsKufiles]}(jR  (58c0ebfa9381d5ef96cef2786d75238983757bd5filenameVsimpleclient_common/src/main/java/io/prometheus/client/exporter/common/TextFormat.javastatusmodifiedj5S  Kj6S  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javaraw_urlhttps://github.com/prometheus/client_java/raw/a76a65ddb62b50eb2c33a46e98cde4f4479a54a6/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.java?ref=a76a65ddb62b50eb2c33a46e98cde4f4479a54a6patchX  @@ -137,8 +137,9 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
   }
 
   private static void writeEscapedHelp(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");
@@ -153,8 +154,9 @@ private static void writeEscapedHelp(Writer writer, String s) throws IOException
   }
 
   private static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");uau(70e24e7e506b2fdd178cdd171ebcd2cd9aecb093}(sha(70e24e7e506b2fdd178cdd171ebcd2cd9aecb093node_idEC_kwDOAHoJt9oAKDcwZTI0ZTdlNTA2YjJmZGQxNzhjZGQxNzFlYmNkMmNkOWFlY2IwOTMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jRS  Fabian StäberjTS  fabian@fstab.dejVS  2023-07-29T21:21:08Zumessage%Extrace common exporter functionalitytree}(jJS  (2476113528e4a6a6afd962d0396ef51ac943a49furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/2476113528e4a6a6afd962d0396ef51ac943a49fujbS  hhttps://api.github.com/repos/prometheus/client_java/git/commits/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujbS  dhttps://api.github.com/repos/prometheus/client_java/commits/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093html_urlYhttps://github.com/prometheus/client_java/commit/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/commentsjPS  }(loginfstabidJ' jLS  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jbS  "https://api.github.com/users/fstabjnS  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujXS  }(jsS  fstabjuS  J' jLS  MDQ6VXNlcjMzMDUzNQ==jwS  2https://avatars.githubusercontent.com/u/330535?v=4jyS  h3jbS  "https://api.github.com/users/fstabjnS  https://github.com/fstabj|S  ,https://api.github.com/users/fstab/followersj~S  9https://api.github.com/users/fstab/following{/other_user}jS  2https://api.github.com/users/fstab/gists{/gist_id}jS  9https://api.github.com/users/fstab/starred{/owner}{/repo}jS  0https://api.github.com/users/fstab/subscriptionsjS  'https://api.github.com/users/fstab/orgsjS  (https://api.github.com/users/fstab/reposjS  3https://api.github.com/users/fstab/events{/privacy}jS  2https://api.github.com/users/fstab/received_eventsjS  UserjS  uparents]}(jJS  (644da5a0b6e121cf83b8654e86616c138caefabajbS  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabajnS  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalMP	additionsMP	deletionsK ufiles](}(jJS  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcfilename*prometheus-metrics-exporter-common/pom.xmlstatusaddedjS  K5jS  K changesK5blob_urlhttps://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093patchXk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jJS  (3854871dc04af2dc0ec88d1be9e816f25b1c7dacjS  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javajS  addedjS  KjS  K jS  KjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  @@ -0,0 +1,8 @@
+package io.prometheus.metrics.exporter.common;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    @Override
+    void close();
+}u}(jJS  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bjS  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javajS  addedjS  KGjS  K jS  KGjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(jJS  (4e843df5ad2f4a6191407b04f928bf0d7b247c95jS  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javajS  addedjS  KjS  K jS  KjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  Xa  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setStatus(int)}
+     */
+    void setStatus(int statusCode);
+
+    /**
+     * See {@code jakarta.servlet.ServletResponse.getOutputStream()}
+     */
+    OutputStream getOutputStream() throws IOException;
+}u}(jJS  (cdee93fe12486809cd73f1ddf8c7b5e075b93a9bjS  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javajS  addedjS  KjS  K jS  KjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  X  @@ -0,0 +1,165 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Enumeration;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private final LocalByteArray threadLocalResponseBuffer = new LocalByteArray();
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue() {
+            return new ByteArrayOutputStream(1 << 20); // 1 MB
+        }
+    }
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = threadLocalResponseBuffer.get();
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                response.setStatus(200);
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.getOutputStream())) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                long contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (!request.getMethod().equals("HEAD")) {
+                    try (OutputStream outputStream = response.getOutputStream()) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } finally {
+            exchange.close();
+            threadLocalResponseBuffer.get().reset();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam != null) {
+            switch (debugParam) {
+                case "openmetrics":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), snapshots);
+                    return true;
+                case "text":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), snapshots);
+                    return true;
+                case "prometheus-protobuf":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    response.getOutputStream().write(debugString.getBytes(StandardCharsets.UTF_8));
+                    return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(jJS  (318e865f55bdd893d762a5f4e759a502e8bbc983jS  4prometheus-metrics-exporter-common/version-rules.xmljS  addedjS  KjS  K jS  KjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fversion-rules.xmljS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exporter-common%2Fversion-rules.xmljS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jJS  (3db354c56f52afb4c46e0a080ef010b492c401d6jS  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javajS  modifiedjS  KjS  K jS  KjS  https://github.com/prometheus/client_java/blob/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajS  https://github.com/prometheus/client_java/raw/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajS  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jS  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }ueu(97cfe5accbf64cba792cdc32a524244f71a66086}(sha(97cfe5accbf64cba792cdc32a524244f71a66086node_idEC_kwDOAHoJt9oAKDk3Y2ZlNWFjY2JmNjRjYmE3OTJjZGMzMmE1MjQyNDRmNzFhNjYwODYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jS  Fabian StäberjS  fabian@fstab.dejS  2023-08-06T17:56:54ZumessageHAdd HTTPServer exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jS  (3a1bbce7405d972de5652fbadc1d914c218040d3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/3a1bbce7405d972de5652fbadc1d914c218040d3ujT  hhttps://api.github.com/repos/prometheus/client_java/git/commits/97cfe5accbf64cba792cdc32a524244f71a66086
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujT  dhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086html_urlYhttps://github.com/prometheus/client_java/commit/97cfe5accbf64cba792cdc32a524244f71a66086comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/97cfe5accbf64cba792cdc32a524244f71a66086/commentsjS  }(loginfstabidJ' jS  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jT  "https://api.github.com/users/fstabjT  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujS  }(jT  fstabjT  J' jS  MDQ6VXNlcjMzMDUzNQ==jT  2https://avatars.githubusercontent.com/u/330535?v=4jT  h3jT  "https://api.github.com/users/fstabjT  https://github.com/fstabj!T  ,https://api.github.com/users/fstab/followersj#T  9https://api.github.com/users/fstab/following{/other_user}j%T  2https://api.github.com/users/fstab/gists{/gist_id}j'T  9https://api.github.com/users/fstab/starred{/owner}{/repo}j)T  0https://api.github.com/users/fstab/subscriptionsj+T  'https://api.github.com/users/fstab/orgsj-T  (https://api.github.com/users/fstab/reposj/T  3https://api.github.com/users/fstab/events{/privacy}j1T  2https://api.github.com/users/fstab/received_eventsj3T  Userj5T  uparents]}(jS  (644da5a0b6e121cf83b8654e86616c138caefabajT  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabajT  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalM		additionsM		deletionsK@ufiles](}(jS  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedjOT  K%jPT  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=97cfe5accbf64cba792cdc32a524244f71a66086patchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jS  (fd1f204d1d1ed425f184838aea568a893c9ae334jUT  #examples/example-httpserver/pom.xmljWT  addedjOT  KFjPT  K jYT  KFjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2Fpom.xmlV     j\T  ~https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jS  (0563d583a93f32d63b484dd0d677f75db81927cajUT  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javajWT  addedjOT  K!jPT  K jYT  K!jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X=  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jS  (571e55a2b5d259f0401a881e9631fa0acce8e791jUT  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajWT  modifiedjOT  KjPT  KjYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(jS  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cjUT  examples/pom.xmljWT  modifiedjOT  KjPT  K jYT  KjZT  jhttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fpom.xmlj\T  ihttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/examples%2Fpom.xmlj^T  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(jS  (aa81b08e8189c21bee10839e7605abd4b2c49b12jUT  #integration-tests/it-common/pom.xmljWT  addedjOT  K8jPT  K jYT  K8jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fpom.xmlj\T  ~https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jS  (d60e5397941da631e78c1289365208a3becd4641jUT  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javajWT  addedjOT  K$jPT  K jYT  K$jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(jS  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8jUT  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javajWT  addedjOT  KejPT  K jYT  KejZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(jS  (4eafa72596ce3619761aa5c3681eeabb90322228jUT  Iintegration-tests/it-common/src/test/resources/project_version.propertiesjWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(jS  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbjUT  -integration-tests/it-common/version-rules.xmljWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fversion-rules.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-common%2Fversion-rules.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jS  (8767c971d0f813a8af5a6dee7d7276f15ae79be6jUT  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmljWT  addedjOT  KIjPT  K jYT  KIjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jS  (474db7804aabba78dee5e810f3952924b2853255jUT  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javajWT  addedjOT  KbjPT  K jYT  KbjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj^T  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jS  (a470df5c021d465c51388b5a740ba88a49d40858jUT  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmljWT  addedjOT  KSjPT  K jYT  KSjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jS  (efa119c4e2292afc04d79a6f1b049bca20e923bejUT  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javajWT  addedjOT  KqjPT  K jYT  KqjZT  X  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj\T  X
  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj^T  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jS  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2jUT  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmljWT  addedjOT  KNjPT  K jYT  KNjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jS  (21956ae78f5aca3a25abb6b5bb32a80999930390jUT  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javajWT  addedjOT  KqjPT  K jYT  KqjZT  X  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj\T  X  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj^T  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jS  (8d7404585288239abecdd5265b2984d493cb0628jUT  6integration-tests/it-exporter/it-exporter-test/pom.xmljWT  addedjOT  KBjPT  K jYT  KBjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(jS  (2f7baf9088dc2d262d348e2d5b28e023b44d745ajUT  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javajWT  addedjOT  MVjPT  K jYT  MVjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(jS  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3jUT  %integration-tests/it-exporter/pom.xmljWT  addedjOT  K1jPT  K jYT  K1jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fit-exporter%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u     }(jS  (cce89906f28eebfb57aa16a5ab222f52117f4794jUT  integration-tests/pom.xmljWT  addedjOT  K@jPT  K jYT  K@jZT  shttps://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fpom.xmlj\T  rhttps://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/integration-tests%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(jS  (fc8359e560a3e05c90838b2ece08e0853d823358jUT  pom.xmljWT  modifiedjOT  KjPT  K jYT  KjZT  _https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/pom.xmlj\T  ^https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/pom.xmlj^T  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(jS  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcjUT  *prometheus-metrics-exporter-common/pom.xmljWT  addedjOT  K5jPT  K jYT  K5jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jS  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4jUT  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javajWT  addedjOT  K
jPT  K jYT  K
jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(jS  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bjUT  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javajWT  addedjOT  KGjPT  K jYT  KGjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(jS  (4e3db6955fe7fbf010877f9faef50315ac489eedjUT  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javajWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(jS  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fjUT  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javajWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(jS  (318e865f55bdd893d762a5f4e759a502e8bbc983jUT  4prometheus-metrics-exporter-common/version-rules.xmljWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fversion-rules.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-common%2Fversion-rules.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jS  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160jUT  .prometheus-metrics-exporter-httpserver/pom.xmljWT  addedjOT  K+jPT  K jYT  K+jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jS  (e8a54e0cf687d16358a139f83d42f5960106395ajUT  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javajWT  addedjOT  KCjPT  K jYT  KCjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jS  (7c0275fc3624f8dff2d802b37671eb91fca4b48cjUT  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .buildAndStart();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server. Same as {@link #close()}.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer. Same as {@link #stop()}.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     * This is useful if you did not specify a port and the server picked a free port automatically.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build and start the HTTPServer.
+         */
+        public HTTPServer buildAndStart() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(jS  (03b647d99ed2bc1d67a3c66a11c33d900b53d501jUT  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javajWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jS  (4f1b4f63a7e59feb619963afc5d901560bc83e08jUT  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javajWT  addedjOT  KwjPT  K jYT  KwjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u}(jS  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bjUT  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javajWT  addedjOT  K-jPT  K jYT  K-jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(jS  (378ac6ddc334fbe20d07b3510cf6434894770c6bjUT  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javajWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(jS  (318e865f55bdd893d762a5f4e759a502e8bbc983jUT  8prometheus-metrics-exporter-httpserver/version-rules.xmljWT  addedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jS  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79jUT  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljWT  modifiedjOT  KjPT  KjYT  K	jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(jS  (656d661ebddd423ba12fc58b1dbd136062e5a282jUT  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javajWT  addedjOT  K^jPT  K jYT  K^jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(jS  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ejUT  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javajWT  modifiedjOT  KjPT  K4jYT  K8jZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj^T  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(jS  (3db354c56f52afb4c46e0a080ef010b492c401d6jUT  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javajWT  modifiedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(jS  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfejUT  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajWT  modifiedjOT  KjPT  KjYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u	     }(jS  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72jUT  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajWT  modifiedjOT  KjPT  KjYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(jS  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfjUT  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajWT  modifiedjOT  KjPT  K jYT  KjZT  https://github.com/prometheus/client_java/blob/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj\T  https://github.com/prometheus/client_java/raw/97cfe5accbf64cba792cdc32a524244f71a66086/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj^T  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=97cfe5accbf64cba792cdc32a524244f71a66086j`T  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(4db5d6ae4cf9a3a44c8b00261859cce581e0d521}(sha(4db5d6ae4cf9a3a44c8b00261859cce581e0d521node_idEC_kwDOAHoJt9oAKDRkYjVkNmFlNGNmOWEzYTQ0YzhiMDAyNjE4NTljY2U1ODFlMGQ1MjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-25T17:38:50Zu	committer}(jU  Fabian StäberjU  fabian@fstab.dejU  2023-07-25T17:38:50Zumessage*Allow dots in metric names and label namestree}(jU  (ac3c56ef66cbb8b4ad08d51f9de8030a04c7a4aburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ac3c56ef66cbb8b4ad08d51f9de8030a04c7a4abujU  hhttps://api.github.com/repos/prometheus/client_java/git/commits/4db5d6ae4cf9a3a44c8b00261859cce581e0d521
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujU  dhttps://api.github.com/repos/prometheus/client_java/commits/4db5d6ae4cf9a3a44c8b00261859cce581e0d521html_urlYhttps://github.com/prometheus/client_java/commit/4db5d6ae4cf9a3a44c8b00261859cce581e0d521comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/commentsjU  }(loginfstabidJ' jU  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jU  "https://api.github.com/users/fstabjU  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujU  }(jU  fstabjU  J' jU  MDQ6VXNlcjMzMDUzNQ==jU  2https://avatars.githubusercontent.com/u/330535?v=4jU  h3jU  "https://api.github.com/users/fstabjU  https://github.com/fstabjU  ,https://api.github.com/users/fstab/followersjU  9https://api.github.com/users/fstab/following{/other_user}jU  2https://api.github.com/users/fstab/gists{/gist_id}jU  9https://api.github.com/users/fstab/starred{/owner}{/repo}jU  0https://api.github.com/users/fstab/subscriptionsjU  'https://api.github.com/users/fstab/orgsjU  (https://api.github.com/users/fstab/reposjU  3https://api.github.com/users/fstab/events{/privacy}jU  2https://api.github.com/users/fstab/received_eventsjU  UserjU  uparents]}(jU  (9f0755cfa5f07e66bf9677a661af9878da3dd12bjU  dhttps://api.github.com/repos/prometheus/client_java/commits/9f0755cfa5f07e66bf9677a661af9878da3dd12bjU  Yhttps://github.com/prometheus/client_java/commit/9f0755cfa5f07e66bf9677a661af9878da3dd12buastats}(totalKx	additionsKj	deletionsKufiles](}(jU  (57dbdcda129fcdd0636d77b05acafe65f69b1c89filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedjV  Kj
V  KchangesK	blob_urlhttps://github.com/prometheus/client_java/blob/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=4db5d6ae4cf9a3a44c8b00261859cce581e0d521patchXA  @@ -9,13 +9,16 @@
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Counter metric.
  * <p>
@@ -109,8 +112,8 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
         return new CounterSnapshot(getMetadata(), data);
     }
 
-    static String normalizeName(String name) {
-        if (name != null && name.endsWith("_total")) {
+    static String stripTotalSuffix(String name) {
+        if (name != null && prometheusName(name).endsWith("_total")) {
             name = name.substring(0, name.length() - 6);
         }
         return name;
@@ -236,7 +239,7 @@ private Builder(PrometheusProperties properties) {
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(normalizeName(name));
+            return super.withName(stripTotalSuffix(name));
         }
 
         @Overrideu}(jU  (0e0fe7ccf05d525171bf493f1b39471e3d196e14jV  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javajV  modifiedjV  Kj
V  KjV  KjV  https://github.com/prometheus/client_java/blob/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajV  https://github.com/prometheus/client_java/raw/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajV  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=4db5d6ae4cf9a3a44c8b00261859cce581e0d521jV  X9  @@ -85,7 +85,7 @@ private Builder(PrometheusProperties properties) {
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(Counter.normalizeName(name));
+            return super.withName(Counter.stripTotalSuffix(name));
         }
 
         @Overrideu}(jU  (2bf6f3ca9e016fe44e68196c99a0335762c7d85djV  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajV  modifiedjV  Kj
V  K	jV  KjV  https://github.com/prometheus/client_java/blob/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajV  https://github.com/prometheus/client_java/raw/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajV  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=4db5d6ae4cf9a3a44c8b00261859cce581e0d521jV  Xw  @@ -2,16 +2,16 @@
 
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Label;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Info metric. Example:
  * <pre>{@code
@@ -95,10 +95,7 @@ private Builder(PrometheusProperties config) {
          */
         @Override
         public Builder withName(String name) {
-            if (name != null && name.endsWith("_info")) {
-                name = name.substring(0, name.length() - 5);
-            }
-            return super.withName(name);
+            return super.withName(stripInfoSuffix(name));
         }
 
         /**
@@ -112,16 +109,16 @@ public Builder withUnit(Unit unit) {
             return this;
         }
 
-        private static String normalizeName(String name) {
-            if (name != null && name.endsWith("_info")) {
+        private static String stripInfoSuffix(String name) {
+            if (name != null && prometheusName(name).endsWith("_info")) {
                 name = name.substring(0, name.length() - 5);
             }
             return name;
         }
 
         @Override
         public Info build() {
-            return new Info(withName(normalizeName(name)));
+            return new Info(this);
         }
 
         @Overrideu}(jU  (1e6da5edec20c857f4e8951aa5761ca2545b8a7djV  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajV  modifiedjV  Kj
V  KjV  KjV  https://github.com/prometheus/client_java/blob/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajV  https://github.com/prometheus/client_java/raw/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajV  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=4db5d6ae4cf9a3a44c8b00261859cce581e0d521jV  Xm  @@ -9,6 +9,8 @@
 import java.util.Arrays;
 import java.util.List;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
  * <p>
@@ -33,7 +35,7 @@ protected MetricMetadata getMetadata() {
     private String makeName(String name, Unit unit) {
         if (unit != null) {
             String suffix = "_" + unit;
-            if (!name.endsWith(suffix)) {
+            if (!prometheusName(name).endsWith(suffix)) {
                 name = name + suffix;
             }
         }u}(jU  (061cff95d4d409ae56c18a8c24db86c93d9dd554jV  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajV  modifiedjV  KZj
V  K jV  KZjV  https://github.com/prometheus/client_java/blob/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajV  https://github.com/prometheus/client_java/raw/4db5d6ae4cf9a3a44c8b00261859cce581e0d521/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajV  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=4db5d6ae4cf9a3a44c8b00261859cce581e0d521jV  X_  @@ -32,6 +32,7 @@ public class ExpositionFormatsTest {
 
     private final String exemplar1String = "{env=\"prod\",span_id=\"12345\",trace_id=\"abcde\"} 1.7 1672850685.829";
     private final String exemplar2String = "{env=\"dev\",span_id=\"23456\",trace_id=\"bcdef\"} 2.4 1672850685.830";
+    private final String exemplarWithDotsString = "{some_exemplar_key=\"some value\"} 3.0 1690298864.383";
 
     private final String exemplar1protoString = "exemplar { " +
             "label { name: \"env\" value: \"prod\" } " +
@@ -47,6 +48,11 @@ public class ExpositionFormatsTest {
             "value: 2.4 " +
             "timestamp { seconds: 1672850685 nanos: 830000000 } }";
 
+    private final String exemplarWithDotsProtoString = "exemplar { " +
+            "label { name: \"some_exemplar_key\" value: \"some value\" } " +
+            "value: 3.0 " +
+            "timestamp { seconds: 1690298864 nanos: 383000000 } }";
+
     private final String createdTimestamp1s = "1672850385.800";
     private final long createdTimestamp1 = (long) (1000 * Double.parseDouble(createdTimestamp1s));
     private final String createdTimestamp2s = "1672850285.000";
@@ -72,6 +78,12 @@ public class ExpositionFormatsTest {
             .withTimestampMillis(1672850685830L)
             .build();
 
+    private final Exemplar exemplarWithDots = Exemplar.newBuilder()
+            .withLabels(Labels.of("some.exemplar.key", "some value"))
+            .withValue(3.0)
+            .withTimestampMillis(1690298864383L)
+            .build();
+
     @Test
     public void testCounterComplete() throws IOException {
         String openMetricsText = "" +
@@ -183,6 +195,42 @@ public void testCounterMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, counter);
     }
 
+    @Test
+    public void testCounterWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_count counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE my_request_count_total counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_count_total\" " +
+                "type: COUNTER " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "counter { " +
+                        "value: 3.0 " + exemplarWithDotsProtoString + " " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my.request.count")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(3.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
     @Test
     public void testGaugeComplete() throws IOException {
         String openMetricsText = "" +
@@ -264,6 +312,48 @@ public void testGaugeMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gauge);
     }
 
+    @Test
+    public void testGaugeWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "# UNIT my_temperature_celsius celsius\n" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_temperature_celsius\" " +
+                "help: \"Temperature\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"location_id\" value: \"data-center-1\" } " +
+                    "gauge { " +
+                        "value: 23.0 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("my.temperature.celsius")
+                .withHelp("Temperature")
+                .withUnit(Unit.CELSIUS)
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(23.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("location.id", "data-center-1")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
     @Test
     public void testSummaryComplete() throws IOException {
         String openMetricsText = "" +ueu(644da5a0b6e121cf83b8654e86616c138caefaba}(sha(644da5a0b6e121cf83b8654e86616c138caefabanode_idEC_kwDOAHoJt9oAKDY0NGRhNWEwYjZlMTIxY2Y4M2I4NjU0ZTg2NjE2YzEzOGNhZWZhYmEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T15:28:10Zu	committer}(jIV  Fabian StäberjKV  fabian@fstab.dejMV  2023-07-27T15:28:31ZumessageYRemove obsolete step from CircleCI build

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jAV  (c316a7990f38071a722f83659823b567419ad447urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c316a7990f38071a722f83659823b567419ad447ujYV  hhttps://api.github.com/repos/prometheus/client_java/git/commits/644da5a0b6e121cf83b8654e86616c138caefaba
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujYV  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabahtml_urlYhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabacomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefaba/commentsjGV  }(loginfstabidJ' jCV  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jYV  "https://api.github.com/users/fstabjeV  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujOV  }(jjV  fstabjlV  J' jCV  MDQ6VXNlcjMzMDUzNQ==jnV  2https://avatars.githubusercontent.com/u/330535?v=4jpV  h3jYV  "https://api.github.com/users/fstabjeV  https://github.com/fstabjsV  ,https://api.github.com/users/fstab/followersjuV  9https://api.github.com/users/fstab/following{/other_user}jwV  2https://api.github.com/users/fstab/gists{/gist_id}jyV  9https://api.github.com/users/fstab/starred{/owner}{/repo}j{V  0https://api.github.com/users/fstab/subscriptionsj}V  'https://api.github.com/users/fstab/orgsjV  (https://api.github.com/users/fstab/reposjV  3https://api.github.com/users/fstab/events{/privacy}jV  2https://api.github.com/users/fstab/received_eventsjV  UserjV  uparents]}(jAV  (0a66b758b088ea9b8cc7cfd731ee6a36733f4924jYV  dhttps://api.github.com/repos/prometheus/client_java/commits/0a66b758b088ea9b8cc7cfd731ee6a36733f4924jeV  Yhttps://github.com/prometheus/client_java/commit/0a66b758b088ea9b8cc7cfd731ee6a36733f4924uastats}(totalK	additionsK	deletionsKufiles]}(jAV  (58c65b38b7c25bcf282dac90641e8d99a2700dc9filename.circleci/config.ymlstatusmodifiedjV  KjV  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/644da5a0b6e121cf83b8654e86616c138caefaba/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/644da5a0b6e121cf83b8654e86616c138caefaba/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=644da5a0b6e121cf83b8654e86616c138caefabapatchXR  @@ -16,7 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      - run: cd protobuf-shaded && ../mvnw install && cd ..
+      # - run: cd protobuf-shaded && ../mvnw install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:uau(7314b0db6ce732e47a91590383445466b6b3237e}(sha(7314b0db6ce732e47a91590383445466b6b3237enode_idEC_kwDOAHoJt9oAKDczMTRiMGRiNmNlNzMyZTQ3YTkxNTkwMzgzNDQ1NDY2YjZiMzIzN2Ucommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:36:26Zu	committer}(jV  Fabian StäberjV  fabian@fstab.dejV  2023-08-26T21:36:26ZumessageFix mermaid flowcharttree}(jV  (a0d3eb7b38e263c4e2418e43ccff3f9c1e7dd9d0urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a0d3eb7b38e263c4e2418e43ccff3f9c1e7dd9d0ujV  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7314b0db6ce732e47a91590383445466b6b3237e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujV  dhttps://api.github.com/repos/prometheus/client_java/commits/7314b0db6ce732e47a91590383445466b6b3237ehtml_urlYhttps://github.com/prometheus/client_java/commit/7314b0db6ce732e47a91590383445466b6b3237ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7314b0db6ce732e47a91590383445466b6b3237e/commentsjV  }(loginfstabidJ' jV  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jV  "https://api.github.com/users/fstabjV  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujV  }(jV  fstabjV  J' jV  MDQ6VXNlcjMzMDUzNQ==jV  2https://avatars.githubusercontent.com/u/330535?v=4jV  h3jV  "https://api.github.com/users/fstabjV  https://github.com/fstabjV  ,https://api.github.com/users/fstab/followersjV  9https://api.github.com/users/fstab/following{/other_user}jV  2https://api.github.com/users/fstab/gists{/gist_id}jV  9https://api.github.com/users/fstab/starred{/owner}{/repo}jV  0https://api.github.com/users/fstab/subscriptionsjV  'https://api.github.com/users/fstab/orgsjV  (https://api.github.com/users/fstab/reposjV  3https://api.github.com/users/fstab/events{/privacy}jV  2https://api.github.com/users/fstab/received_eventsjV  UserjV  uparents]}(jV  (b82edcd6cf8048207a45523a5d07429f0308ee63jV  dhttps://api.github.com/repos/prometheus/client_java/commits/b82edcd6cf8048207a45523a5d07429f0308ee63jV  Yhttps://github.com/prometheus/client_java/commit/b82edcd6cf8048207a45523a5d07429f0308ee63uastats}(totalK	additionsK	deletionsKufiles]}(jV  (53ddc430b7e34d348a973c1211a825aad16daccbfilename(examples/example-opentelemetry/README.mdstatusmodifiedjW  KjW  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/7314b0db6ce732e47a91590383445466b6b3237e/examples%2Fexample-opentelemetry%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/7314b0db6ce732e47a91590383445466b6b3237e/examples%2Fexample-opentelemetry%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=7314b0db6ce732e47a91590383445466b6b3237epatch@@ -16,7 +16,7 @@ Assuming `./target/prometheus-opentelemetry-example-app.jar` is present, run the
 docker-compose up
 ```
 
-This will set up the following scenario
+This will set up the following scenario:
 
 ```mermaid
 flowchart LRuau(dcb0e0a253f764884a9ef189323ba6c5e48fafa4}(sha(dcb0e0a253f764884a9ef189323ba6c5e48fafa4node_idEC_kwDOAHoJt9oAKGRjYjBlMGEyNTNmNzY0ODg0YTllZjE4OTMyM2JhNmM1ZTQ4ZmFmYTQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-09T21:29:09Zu	committer}(j3W  Fabian Stäberj5W  fabian@fstab.dej7W  2023-07-09T21:29:09ZumessageRefactor propertiestree}(j+W  (43c749d57079dbcba73906a93f51046cb282b82furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/43c749d57079dbcba73906a93f51046cb282b82fujCW  hhttps://api.github.com/repos/prometheus/client_java/git/commits/dcb0e0a253f764884a9ef189323ba6c5e48fafa4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujCW  dhttps://api.github.com/repos/prometheus/client_java/commits/dcb0e0a253f764884a9ef189323ba6c5e48fafa4html_urlYhttps://github.com/prometheus/client_java/commit/dcb0e0a253f764884a9ef189323ba6c5e48fafa4comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/commentsj1W  }(loginfstabidJ' j-W  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jCW  "https://api.github.com/users/fstabjOW  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj9W  }(jTW  fstabjVW  J' j-W  MDQ6VXNlcjMzMDUzNQ==jXW  2https://avatars.githubusercontent.com/u/330535?v=4jZW  h3jCW  "https://api.github.com/users/fstabjOW  https://github.com/fstabj]W  ,https://api.github.com/users/fstab/followersj_W  9https://api.github.com/users/fstab/following{/other_user}jaW  2https://api.github.com/users/fstab/gists{/gist_id}jcW  9https://api.github.com/users/fstab/starred{/owner}{/repo}jeW  0https://api.github.com/users/fstab/subscriptionsjgW  'https://api.github.com/users/fstab/orgsjiW  (https://api.github.com/users/fstab/reposjkW  3https://api.github.com/users/fstab/events{/privacy}jmW  2https://api.github.com/users/fstab/received_eventsjoW  UserjqW  uparents]}(j+W  (f188773d87ffc9059459a01d1d30688e61bb231ajCW  dhttps://api.github.com/repos/prometheus/client_java/commits/f188773d87ffc9059459a01d1d30688e61bb231ajOW  Yhttps://github.com/prometheus/client_java/commit/f188773d87ffc9059459a01d1d30688e61bb231auastats}(totalM 	additionsMG	deletionsKufiles](}(j+W  (86ed8ae84af78f4815248aac0ba806a647f735f4filename]prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarsProperties.javastatusrenamedjW  KjW  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4patchX  @@ -5,7 +5,7 @@
 /**
  * Properties starting with io.prometheus.exemplars
  */
-public class ExemplarProperties {
+public class ExemplarsProperties {
 
     private static final String MIN_RETENTION_PERIOD_SECONDS = "minRetentionPeriodSeconds";
     private static final String MAX_RETENTION_PERIOD_SECONDS = "maxRetentionPeriodSeconds";
@@ -15,7 +15,7 @@ public class ExemplarProperties {
     private final Integer maxRetentionPeriodSeconds;
     private final Integer sampleIntervalMilliseconds;
 
-    public ExemplarProperties(
+    public ExemplarsProperties(
             Integer minRetentionPeriodSeconds,
             Integer maxRetentionPeriodSeconds,
             Integer sampleIntervalMilliseconds) {
@@ -53,7 +53,7 @@ public Integer getSampleIntervalMilliseconds() {
         return sampleIntervalMilliseconds;
     }
 
-    static ExemplarProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static ExemplarsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
         Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
         Integer sampleIntervalMilliseconds = Util.loadInteger(prefix + "." + SAMPLE_INTERVAL_MILLISECONDS, properties);
@@ -68,7 +68,7 @@ static ExemplarProperties load(String prefix, Map<Object, Object> properties) th
             }
         }
 
-        return new ExemplarProperties(
+        return new ExemplarsProperties(
                 minRetentionPeriodSeconds,
                 maxRetentionPeriodSeconds,
                 sampleIntervalMillisecondsprevious_filename\prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarProperties.javau}(j+W  (a3028f35808e8fa01de3114f7110c4d08b84f623jW  bprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterFilterProperties.javajW  addedjW  KejW  K jW  KejW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X?  @@ -0,0 +1,101 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter.filter
+ */
+public class ExporterFilterProperties {
+
+    public static final String NAME_MUST_BE_EQUAL_TO = "nameMustBeEqualTo";
+    public static final String NAME_MUST_NOT_BE_EQUAL_TO = "nameMustNotBeEqualTo";
+    public static final String NAME_MUST_START_WITH = "nameMustStartWith";
+    public static final String NAME_MUST_NOT_START_WITH = "nameMustNotStartWith";
+
+    private final List<String> allowedNames;
+    private final List<String> excludedNames;
+    private final List<String> allowedPrefixes;
+    private final List<String> excludedPrefixes;
+
+    public ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes) {
+        this(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, "");
+    }
+
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes, String prefix) {
+        this.allowedNames = allowedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedNames));
+        this.excludedNames = excludedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedNames));
+        this.allowedPrefixes = allowedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedPrefixes));
+        this.excludedPrefixes = excludedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedPrefixes));
+        validate(prefix);
+    }
+
+    public List<String> getAllowedNames() {
+        return allowedNames;
+    }
+
+    public List<String> getExcludedNames() {
+        return excludedNames;
+    }
+
+    public List<String> getAllowedPrefixes() {
+        return allowedPrefixes;
+    }
+
+    public List<String> getExcludedPrefixes() {
+        return excludedPrefixes;
+    }
+
+    private void validate(String prefix) throws PrometheusPropertiesException {
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private List<String> allowedNames;
+        private List<String> excludedNames;
+        private List<String> allowedPrefixes;
+        private List<String> excludedPrefixes;
+
+        private Builder() {
+        }
+
+        public Builder withAllowedNames(String... allowedNames) {
+            this.allowedNames = Arrays.asList(allowedNames);
+            return this;
+        }
+
+        public Builder withExcludedNames(String... excludedNames) {
+            this.excludedNames = Arrays.asList(excludedNames);
+            return this;
+        }
+
+        public Builder withAllowedPrefixes(String... allowedPrefixes) {
+            this.allowedPrefixes = Arrays.asList(allowedPrefixes);
+            return this;
+        }
+
+        public Builder withExcludedPrefixes(String... excludedPrefixes) {
+            this.excludedPrefixes = Arrays.asList(excludedPrefixes);
+            return this;
+        }
+
+        public ExporterFilterProperties build() {
+            return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes);
+        }
+    }
+
+    static ExporterFilterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        List<String> allowedNames = Util.loadStringList(prefix + "." + NAME_MUST_BE_EQUAL_TO, properties);
+        List<String> excludedNames = Util.loadStringList(prefix + "." + NAME_MUST_NOT_BE_EQUAL_TO, properties);
+        List<String> allowedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_START_WITH, properties);
+        List<String> excludedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_NOT_START_WITH, properties);
+        return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, prefix);
+    }
+}u}(j+W  (ca90815968dd3de0b97bf00d2f913b0668ecc2e5jW  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javajW  renamedjW  KjW  KjW  K
jW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -3,26 +3,26 @@
 import java.util.Map;
 
 /**
- * Properties starting with io.prometheus.httpServer
+ * Properties starting with io.prometheus.exporter.httpServer
  */
-public class HttpServerProperties {
+public class ExporterHttpServerProperties {
 
     // TODO: Not used yet, will be used when we port the simpleclient_httpserver module to the new data model.
 
     private static final String PORT = "port";
     private final Integer port;
 
-    public HttpServerProperties(Integer port) {
+    public ExporterHttpServerProperties(Integer port) {
         this.port = port;
     }
 
     public Integer getPort() {
         return port;
     }
 
-    static HttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static ExporterHttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer port = Util.loadInteger(prefix + "." + PORT, properties);
         Util.assertValue(port, t -> t > 0, "Expecting value > 0", prefix, PORT);
-        return new HttpServerProperties(port);
+        return new ExporterHttpServerProperties(port);
     }
 }jW  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/HttpServerProperties.javau}(j+W  (168771a27fd3361ac825378529d34e7cd1013c5fjW  \prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterProperties.javajW  renamedjW  KjW  KjW  K
jW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -3,17 +3,17 @@
 import java.util.Map;
 
 /**
- * Properties starting with io.prometheus.expositionFormat
+ * Properties starting with io.prometheus.exporter
  */
-public class ExpositionFormatProperties {
+public class ExporterProperties {
 
     private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
     private static final String EXEMPLARS_ON_ALL_METRIC_TYPES = "exemplarsOnAllMetricTypes";
 
     private final Boolean includeCreatedTimestamps;
     private final Boolean exemplarsOnAllMetricTypes;
 
-    public ExpositionFormatProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
+    public ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
         this.includeCreatedTimestamps = includeCreatedTimestamps;
         this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
     }
@@ -33,9 +33,9 @@ public boolean getExemplarsOnAllMetricTypes() {
         return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
     }
 
-    static ExpositionFormatProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    static ExporterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
         Boolean exemplarsOnAllMetricTypes = Util.loadBoolean(prefix + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
-        return new ExpositionFormatProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+        return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
     }
 }jW  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExpositionFormatProperties.javau}(j+W  (e5231d35c360b4af0c09d3cc5faaf09ac5a6495cjW  [prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsProperties.javajW  renamedjW  K9jW  K4jW  KmjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X<  @@ -1,11 +1,16 @@
 package io.prometheus.metrics.config;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
+import static java.util.Collections.unmodifiableList;
+
 /**
  * Properties starting with io.prometheus.metrics
  */
-public class MetricProperties {
+public class MetricsProperties {
 
     private static final String EXEMPLARS_ENABLED = "exemplarsEnabled";
     private static final String HISTOGRAM_NATIVE_ONLY = "histogramNativeOnly";
@@ -24,29 +29,29 @@ public class MetricProperties {
     private final Boolean exemplarsEnabled;
     private final Boolean histogramNativeOnly;
     private final Boolean histogramClassicOnly;
-    private final double[] histogramClassicUpperBounds;
+    private final List<Double> histogramClassicUpperBounds;
     private final Integer histogramNativeInitialSchema;
     private final Double histogramNativeMinZeroThreshold;
     private final Double histogramNativeMaxZeroThreshold;
     private final Integer histogramNativeMaxNumberOfBuckets;
     private final Long histogramNativeResetDurationSeconds;
-    private final double[] summaryQuantiles;
-    private final double[] summaryQuantileErrors;
+    private final List<Double> summaryQuantiles;
+    private final List<Double> summaryQuantileErrors;
     private final Long summaryMaxAgeSeconds;
     private final Integer summaryNumberOfAgeBuckets;
 
-    public MetricProperties(
+    public MetricsProperties(
             Boolean exemplarsEnabled,
             Boolean histogramNativeOnly,
             Boolean histogramClassicOnly,
-            double[] histogramClassicUpperBounds,
+            List<Double> histogramClassicUpperBounds,
             Integer histogramNativeInitialSchema,
             Double histogramNativeMinZeroThreshold,
             Double histogramNativeMaxZeroThreshold,
             Integer histogramNativeMaxNumberOfBuckets,
             Long histogramNativeResetDurationSeconds,
-            double[] summaryQuantiles,
-            double[] summaryQuantileErrors,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
             Long summaryMaxAgeSeconds,
             Integer summaryNumberOfAgeBuckets) {
         this(exemplarsEnabled,
@@ -65,32 +70,32 @@ public MetricProperties(
                 "");
     }
 
-    private MetricProperties(
+    private MetricsProperties(
             Boolean exemplarsEnabled,
             Boolean histogramNativeOnly,
             Boolean histogramClassicOnly,
-            double[] histogramClassicUpperBounds,
+            List<Double> histogramClassicUpperBounds,
             Integer histogramNativeInitialSchema,
             Double histogramNativeMinZeroThreshold,
             Double histogramNativeMaxZeroThreshold,
             Integer histogramNativeMaxNumberOfBuckets,
             Long histogramNativeResetDurationSeconds,
-            double[] summaryQuantiles,
-            double[] summaryQuantileErrors,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
             Long summaryMaxAgeSeconds,
             Integer summaryNumberOfAgeBuckets,
             String configPropertyPrefix) {
         this.exemplarsEnabled = exemplarsEnabled;
         this.histogramNativeOnly = isHistogramNativeOnly(histogramClassicOnly, histogramNativeOnly);
         this.histogramClassicOnly = isHistogramClassicOnly(histogramClassicOnly, histogramNativeOnly);
-        this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds == null ? null : unmodifiableList(new ArrayList<>(histogramClassicUpperBounds));
         this.histogramNativeInitialSchema = histogramNativeInitialSchema;
         this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
         this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
         this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
         this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
-        this.summaryQuantiles = summaryQuantiles;
-        this.summaryQuantileErrors = summaryQuantileErrors;
+        this.summaryQuantiles = summaryQuantiles == null ? null : unmodifiableList(new ArrayList<>(summaryQuantiles));
+        this.summaryQuantileErrors = summaryQuantileErrors == null ? null : unmodifiableList(new ArrayList<>(summaryQuantileErrors));
         this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
         this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
         validate(configPropertyPrefix);
@@ -148,7 +153,7 @@ private void validate(String prefix) throws PrometheusPropertiesException {
             if (summaryQuantiles == null) {
                 throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Can't configure " + SUMMARY_QUANTILE_ERRORS + " without configuring " + SUMMARY_QUANTILES);
             }
-            if (summaryQuantileErrors.length != summaryQuantiles.length) {
+            if (summaryQuantileErrors.size() != summaryQuantiles.size()) {
                 throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": must have the same length as " + SUMMARY_QUANTILES);
             }
             for (double error : summaryQuantileErrors) {
@@ -184,7 +189,7 @@ public Boolean getHistogramClassicOnly() {
     /**
      * See {@code Histogram.Builder.withClassicBuckets()}
      */
-    public double[] getHistogramClassicUpperBounds() {
+    public List<Double> getHistogramClassicUpperBounds() {
         return histogramClassicUpperBounds;
     }
 
@@ -226,25 +231,25 @@ public Long getHistogramNativeResetDurationSeconds() {
     /**
      * See {@code Summary.Builder.withQuantile()}
      */
-    public double[] getSummaryQuantiles() {
+    public List<Double> getSummaryQuantiles() {
         return summaryQuantiles;
     }
 
     /**
      * See {@code Summary.Builder.withQuantile()}
      */
-    public double[] getSummaryQuantileErrors() {
+    public List<Double> getSummaryQuantileErrors() {
         if (summaryQuantileErrors != null) {
             return summaryQuantileErrors;
         } else {
-            double[] result = new double[summaryQuantiles.length];
-            for (int i = 0; i < result.length; i++) {
-                if (summaryQuantiles[i] <= 0.01 || summaryQuantiles[i] >= 0.99) {
-                    result[i] = 0.001;
-                } else if (summaryQuantiles[i] <= 0.02 || summaryQuantiles[i] >= 0.98) {
-                    result[i] = 0.005;
+            List<Double> result = new ArrayList<>(summaryQuantiles.size());
+            for (int i = 0; i < result.size(); i++) {
+                if (summaryQuantiles.get(i) <= 0.01 || summaryQuantiles.get(i) >= 0.99) {
+                    result.set(i, 0.001);
+                } else if (summaryQuantiles.get(i) <= 0.02 || summaryQuantiles.get(i) >= 0.98) {
+                    result.set(i, 0.005);
                 } else {
-                    result[i] = 0.01;
+                    result.set(i, 0.01);
                 }
             }
             return result;
@@ -269,19 +274,19 @@ public Integer getSummaryNumberOfAgeBuckets() {
      * Properties that are loaded will be removed from {@code properties}.
      * The remaining entries in {@code properties} are unused.
      */
-    static MetricProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
-        return new MetricProperties(
+    static MetricsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return new MetricsProperties(
                 Util.loadBoolean(prefix + "." + EXEMPLARS_ENABLED, properties),
                 Util.loadBoolean(prefix + "." + HISTOGRAM_NATIVE_ONLY, properties),
                 Util.loadBoolean(prefix + "." + HISTOGRAM_CLASSIC_ONLY, properties),
-                Util.loadDoubleArray(prefix + "." + HISTOGRAM_CLASSIC_UPPER_BOUNDS, properties),
+                Util.loadDoubleList(prefix + "." + HISTOGRAM_CLASSIC_UPPER_BOUNDS, properties),
                 Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_INITIAL_SCHEMA, properties),
                 Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD, properties),
                 Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD, properties),
                 Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS, properties),
                 Util.loadLong(prefix + "." + HISTOGRAM_NATIVE_RESET_DURATION_SECONDS, properties),
-                Util.loadDoubleArray(prefix + "." + SUMMARY_QUANTILES, properties),
-                Util.loadDoubleArray(prefix + "." + SUMMARY_QUANTILE_ERRORS, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILES, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILE_ERRORS, properties),
                 Util.loadLong(prefix + "." + SUMMARY_MAX_AGE_SECONDS, properties),
                 Util.loadInteger(prefix + "." + SUMMARY_NUMBER_OF_AGE_BUCKETS, properties),
                 prefix);
@@ -295,22 +300,22 @@ public static class Builder {
         private Boolean exemplarsEnabled;
         private Boolean histogramNativeOnly;
         private Boolean histogramClassicOnly;
-        private double[] histogramClassicUpperBounds;
+        private List<Double> histogramClassicUpperBounds;
         private Integer histogramNativeInitialSchema;
         private Double histogramNativeMinZeroThreshold;
         private Double histogramNativeMaxZeroThreshold;
         private Integer histogramNativeMaxNumberOfBuckets;
         private Long histogramNativeResetDurationSeconds;
-        private double[] summaryQuantiles;
-        private double[] summaryQuantileErrors;
+        private List<Double> summaryQuantiles;
+        private List<Double> summaryQuantileErrors;
         private Long summaryMaxAgeSeconds;
         private Integer summaryNumberOfAgeBuckets;
 
         private Builder() {
         }
 
-        public MetricProperties build() {
-            return new MetricProperties(exemplarsEnabled,
+        public MetricsProperties build() {
+            return new MetricsProperties(exemplarsEnabled,
                     histogramNativeOnly,
                     histogramClassicOnly,
                     histogramClassicUpperBounds,
@@ -326,103 +331,103 @@ public MetricProperties build() {
         }
 
         /**
-         * See {@link MetricProperties#getExemplarsEnabled()}
+         * See {@link MetricsProperties#getExemplarsEnabled()}
          */
         public Builder withExemplarsEnabled(Boolean exemplarsEnabled) {
             this.exemplarsEnabled = exemplarsEnabled;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeOnly()}
+         * See {@link MetricsProperties#getHistogramNativeOnly()}
          */
         public Builder withHistogramNativeOnly(Boolean histogramNativeOnly) {
             this.histogramNativeOnly = histogramNativeOnly;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramClassicOnly()}
+         * See {@link MetricsProperties#getHistogramClassicOnly()}
          */
         public Builder withHistogramClassicOnly(Boolean histogramClassicOnly) {
             this.histogramClassicOnly = histogramClassicOnly;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramClassicUpperBounds()}
+         * See {@link MetricsProperties#getHistogramClassicUpperBounds()}
          */
         public Builder withHistogramClassicUpperBounds(double... histogramClassicUpperBounds) {
-            this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+            this.histogramClassicUpperBounds = Util.toList(histogramClassicUpperBounds);
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeInitialSchema()}
+         * See {@link MetricsProperties#getHistogramNativeInitialSchema()}
          */
         public Builder withHistogramNativeInitialSchema(Integer histogramNativeInitialSchema) {
             this.histogramNativeInitialSchema = histogramNativeInitialSchema;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeMinZeroThreshold()}
+         * See {@link MetricsProperties#getHistogramNativeMinZeroThreshold()}
          */
         public Builder withHistogramNativeMinZeroThreshold(Double histogramNativeMinZeroThreshold) {
             this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeMaxZeroThreshold()}
+         * See {@link MetricsProperties#getHistogramNativeMaxZeroThreshold()}
          */
         public Builder withHistogramNativeMaxZeroThreshold(Double histogramNativeMaxZeroThreshold) {
             this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeMaxNumberOfBuckets()}
+         * See {@link MetricsProperties#getHistogramNativeMaxNumberOfBuckets()}
          */
         public Builder withHistogramNativeMaxNumberOfBuckets(Integer histogramNativeMaxNumberOfBuckets) {
             this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getHistogramNativeResetDurationSeconds()}
+         * See {@link MetricsProperties#getHistogramNativeResetDurationSeconds()}
          */
         public Builder withHistogramNativeResetDurationSeconds(Long histogramNativeResetDurationSeconds) {
             this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getSummaryQuantiles()}
+         * See {@link MetricsProperties#getSummaryQuantiles()}
          */
         public Builder withSummaryQuantiles(double... summaryQuantiles) {
-            this.summaryQuantiles = summaryQuantiles;
+            this.summaryQuantiles = Util.toList(summaryQuantiles);
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getSummaryQuantileErrors()}
+         * See {@link MetricsProperties#getSummaryQuantileErrors()}
          */
         public Builder withSummaryQuantileErrors(double... summaryQuantileErrors) {
-            this.summaryQuantileErrors = summaryQuantileErrors;
+            this.summaryQuantileErrors = Util.toList(summaryQuantileErrors);
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getSummaryMaxAgeSeconds()}
+         * See {@link MetricsProperties#getSummaryMaxAgeSeconds()}
          */
         public Builder withSummaryMaxAgeSeconds(Long summaryMaxAgeSeconds) {
             this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
             return this;
         }
 
         /**
-         * See {@link MetricProperties#getSummaryNumberOfAgeBuckets()}
+         * See {@link MetricsProperties#getSummaryNumberOfAgeBuckets()}
          */
         public Builder withSummaryNumberOfAgeBuckets(Integer summaryNumberOfAgeBuckets) {
             this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;jW  Zprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricProperties.javau}(j+W  (7d5bf39b29261ca5e731b4acadc15678b8f5e577jW  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajW  modifiedjW  KjW  KjW  K1jW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X
  @@ -10,46 +10,53 @@ public class PrometheusProperties {
 
     private static final PrometheusProperties defaultInstance = PrometheusPropertiesLoader.load();
 
-    private final MetricProperties defaultMetricProperties;
-    private final Map<String, MetricProperties> metricProperties = new HashMap<>();
-    private final ExemplarProperties exemplarConfig;
-    private final ExpositionFormatProperties expositionFormatProperties;
-    private final HttpServerProperties httpServerConfig;
+    private final MetricsProperties defaultMetricsProperties;
+    private final Map<String, MetricsProperties> metricProperties = new HashMap<>();
+    private final ExemplarsProperties exemplarProperties;
+    private final ExporterProperties exporterProperties;
+    private final ExporterFilterProperties exporterFilterProperties;
+    private final ExporterHttpServerProperties httpServerConfig;
 
     public static PrometheusProperties get() throws PrometheusPropertiesException {
         return defaultInstance;
     }
 
     public PrometheusProperties(
-            MetricProperties defaultMetricProperties,
-            Map<String, MetricProperties> metricProperties,
-            ExemplarProperties exemplarConfig,
-            ExpositionFormatProperties expositionFormatProperties,
-            HttpServerProperties httpServerConfig) {
-        this.defaultMetricProperties = defaultMetricProperties;
+            MetricsProperties defaultMetricsProperties,
+            Map<String, MetricsProperties> metricProperties,
+            ExemplarsProperties exemplarProperties,
+            ExporterProperties exporterProperties,
+            ExporterFilterProperties exporterFilterProperties,
+            ExporterHttpServerProperties httpServerConfig) {
+        this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
-        this.exemplarConfig = exemplarConfig;
-        this.expositionFormatProperties = expositionFormatProperties;
+        this.exemplarProperties = exemplarProperties;
+        this.exporterProperties = exporterProperties;
+        this.exporterFilterProperties = exporterFilterProperties;
         this.httpServerConfig = httpServerConfig;
     }
 
-    public MetricProperties getDefaultMetricProperties() {
-        return defaultMetricProperties;
+    public MetricsProperties getDefaultMetricProperties() {
+        return defaultMetricsProperties;
     }
 
-    public MetricProperties getMetricProperties(String metricName) {
+    public MetricsProperties getMetricProperties(String metricName) {
         return metricProperties.get(metricName);
     }
 
-    public ExemplarProperties getExemplarConfig() {
-        return exemplarConfig;
+    public ExemplarsProperties getExemplarProperties() {
+        return exemplarProperties;
     }
 
-    public ExpositionFormatProperties getExpositionFormatConfig() {
-        return expositionFormatProperties;
+    public ExporterProperties getExporterProperties() {
+        return exporterProperties;
     }
 
-    public HttpServerProperties getHttpServerConfig() {
+    public ExporterFilterProperties getExporterFilterProperties() {
+        return exporterFilterProperties;
+    }
+
+    public ExporterHttpServerProperties getExporterHttpServerProperties() {
         return httpServerConfig;
     }
 }u}(j+W  (09498ecdf280960931c09b7136db5ef666ea1af5jW  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajW  modifiedjW  KjW  K	jW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X
  @@ -12,22 +12,30 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+/**
+ * The Properties Loader is early stages.
+ * <p>
+ * It would be great to implement a subset of
+ * <a href="https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/features.html#features.external-config">Spring Boot's Externalized Configuration</a>,
+ * like support for YAML, Properties, and env vars, or support for Spring's naming conventions for properties.
+ */
 public class PrometheusPropertiesLoader {
 
     public static PrometheusProperties load() throws PrometheusPropertiesException {
         Map<Object, Object> properties = loadProperties();
-        Map<String, MetricProperties> metricsConfigs = loadMetricsConfigs(properties);
-        MetricProperties defaultMetricProperties = MetricProperties.load("io.prometheus.metrics", properties);
-        ExemplarProperties exemplarConfig = ExemplarProperties.load("io.prometheus.exemplars", properties);
-        ExpositionFormatProperties expositionFormatProperties = ExpositionFormatProperties.load("io.prometheus.expositionFormat", properties);
-        HttpServerProperties httpServerConfig = HttpServerProperties.load("io.prometheus.httpServer", properties);
+        Map<String, MetricsProperties> metricsConfigs = loadMetricsConfigs(properties);
+        MetricsProperties defaultMetricsProperties = MetricsProperties.load("io.prometheus.metrics", properties);
+        ExemplarsProperties exemplarConfig = ExemplarsProperties.load("io.prometheus.exemplars", properties);
+        ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
+        ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
+        ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricProperties, metricsConfigs, exemplarConfig, expositionFormatProperties, httpServerConfig);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
     }
 
     // This will remove entries from properties when they are processed.
-    private static Map<String, MetricProperties> loadMetricsConfigs(Map<Object, Object> properties) {
-        Map<String, MetricProperties> result = new HashMap<>();
+    private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
+        Map<String, MetricsProperties> result = new HashMap<>();
         Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
         // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
         // because entries are removed when MetricsConfig.load(...) is called.
@@ -40,7 +48,7 @@ private static Map<String, MetricProperties> loadMetricsConfigs(Map<Object, Obje
             if (matcher.find()) {
                 String metricName = matcher.group(1);
                 if (!result.containsKey(metricName)) {
-                    result.put(metricName, MetricProperties.load("io.prometheus.metrics." + metricName, properties));
+                    result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
                 }
             }
         }u4     }(j+W  (d2e775b20a382bd9dcad8bb69d00ea630530e2bdjW  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javajW  modifiedjW  KjW  KjW  K jW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,5 +1,8 @@
 package io.prometheus.metrics.config;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
 
@@ -24,23 +27,42 @@ public static Boolean loadBoolean(String name, Map<Object, Object> properties) t
         return null;
     }
 
-    public static double[] loadDoubleArray(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+    public static List<Double> toList(double... values) {
+        if (values == null) {
+            return null;
+        }
+        List<Double> result = new ArrayList<>(values.length);
+        for (double value : values) {
+            result.add(value);
+        }
+        return result;
+    }
+
+    public static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            return Arrays.asList(property.split("\\s*,\\s*"));
+        }
+        return null;
+    }
+
+    public static List<Double> loadDoubleList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
-            String[] numbers = property.split(",");
-            double[] result = new double[numbers.length];
+            String[] numbers = property.split("\\s*,\\s*");
+            Double[] result = new Double[numbers.length];
             for (int i = 0; i < numbers.length; i++) {
                 try {
                     if ("+Inf".equals(numbers[i].trim())) {
                         result[i] = Double.POSITIVE_INFINITY;
                     } else {
-                        result[i] = Double.parseDouble(numbers[i].trim());
+                        result[i] = Double.parseDouble(numbers[i]);
                     }
                 } catch (NumberFormatException e) {
                     throw new PrometheusPropertiesException(name + "=" + property + ": Expecting comma separated list of double values");
                 }
             }
-            return result;
+            return Arrays.asList(result);
         }
         return null;
     }u}(j+W  (45fec1be02d04501b2ca84257c08aac56e2d18a0jW  bprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -12,8 +12,8 @@ public class PrometheusPropertiesTest {
     @Test
     public void testPrometheusConfig() {
         PrometheusProperties result = PrometheusProperties.get();
-        Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().length);
-        Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().length);
+        Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().size());
+        Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().size());
     }
 
     @Test
@@ -23,7 +23,7 @@ public void testEmptyUpperBounds() throws IOException {
             properties.load(stream);
         }
         Assert.assertEquals(1, properties.size());
-        MetricProperties.load("io.prometheus.metrics", properties);
+        MetricsProperties.load("io.prometheus.metrics", properties);
         Assert.assertEquals(0, properties.size());
     }
 }u}(j+W  (56b3daeb354e590015008fb2e98342eafbd3165ajW  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesjW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X=  @@ -6,13 +6,15 @@ io.prometheus.metrics.summaryQuantileErrors = 0.01, 0.01, 0.001
 io.prometheus.metrics.exemplarsEnabled = true
 io.prometheus.metrics.http_duration_seconds.exemplarsEnabled = true
 
-io.prometheus.expositionFormat.includeCreatedTimestamps = false
-# io.prometheus.expositionFormat.exemplarsForAllMetricTypes = true
+io.prometheus.exporter.includeCreatedTimestamps = false
+io.prometheus.exporter.exemplarsOnAllMetricTypes = true
+io.prometheus.exporter.filter.nameMustBeEqualTo = a, b, c
+
 
 io.prometheus.exemplars.minRetentionPeriodSeconds = 30
 io.prometheus.exemplars.maxRetentionPeriodSeconds = 30
 io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
-io.prometheus.httpServer.port = 9000
+io.prometheus.exporter.httpServer.port = 9000
 
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j+W  (9712f29dfe56bf37373428c3f5544a7f774bb201jW  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfig.javajW  modifiedjW  K
jW  K
jW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X1  @@ -1,24 +1,24 @@
 package io.prometheus.metrics.core.exemplars;
 
-import io.prometheus.metrics.config.ExemplarProperties;
+import io.prometheus.metrics.config.ExemplarsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 
 import java.util.concurrent.TimeUnit;
 
 public class ExemplarSamplerConfig {
 
     /**
-     * See {@link ExemplarProperties#getMinRetentionPeriodSeconds()}
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
      */
     public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDS = 7;
 
     /**
-     * See {@link ExemplarProperties#getMaxRetentionPeriodSeconds()}
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
      */
     public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDS = 70;
 
     /**
-     * See {@link ExemplarProperties#getSampleIntervalMilliseconds()}
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
      */
     private static final int DEFAULT_SAMPLE_INTERVAL_MILLISECONDS = 90;
 
@@ -31,26 +31,26 @@ public class ExemplarSamplerConfig {
     /**
      * Constructor for all metric types except classic histograms.
      *
-     * @param properties        See {@link PrometheusProperties#getExemplarConfig()}.
+     * @param properties        See {@link PrometheusProperties#getExemplarProperties()}.
      * @param numberOfExemplars Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default.
-     *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarProperties, double[])}.
+     *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarsProperties, double[])}.
      */
-    public ExemplarSamplerConfig(ExemplarProperties properties, int numberOfExemplars) {
+    public ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars) {
         this(properties, numberOfExemplars, null);
     }
 
     /**
      * Constructor for classic histogram metrics.
      *
-     * @param properties                  See {@link PrometheusProperties#getExemplarConfig()}.
+     * @param properties                  See {@link PrometheusProperties#getExemplarProperties()}.
      * @param histogramClassicUpperBounds the ExemplarSampler will provide one Exemplar per histogram bucket.
      *                                    Must be sorted, and must include the +Inf bucket.
      */
-    public ExemplarSamplerConfig(ExemplarProperties properties, double[] histogramClassicUpperBounds) {
+    public ExemplarSamplerConfig(ExemplarsProperties properties, double[] histogramClassicUpperBounds) {
         this(properties, histogramClassicUpperBounds.length, histogramClassicUpperBounds);
     }
 
-    private ExemplarSamplerConfig(ExemplarProperties properties, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+    private ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars, double[] histogramClassicUpperBounds) {
         this(
                 TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMinRetentionPeriodSeconds(), DEFAULT_MIN_RETENTION_PERIOD_SECONDS)),
                 TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMaxRetentionPeriodSeconds(), DEFAULT_MAX_RETENTION_PERIOD_SECONDS)),
@@ -106,21 +106,21 @@ public double[] getHistogramClassicUpperBounds() {
     }
 
     /**
-     * See {@link ExemplarProperties#getMinRetentionPeriodSeconds()}
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
      */
     public long getMinRetentionPeriodMillis() {
         return minRetentionPeriodMillis;
     }
 
     /**
-     * See {@link ExemplarProperties#getMaxRetentionPeriodSeconds()}
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
      */
     public long getMaxRetentionPeriodMillis() {
         return maxRetentionPeriodMillis;
     }
 
     /**
-     * See {@link ExemplarProperties#getSampleIntervalMilliseconds()}
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
      */
     public long getSampleIntervalMillis() {
         return sampleIntervalMillis;u}(j+W  (6b5301cc57ebbfe521e6932631c5698f192378fejW  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X   @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.datapoints.CounterDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
@@ -37,10 +37,10 @@ public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint>
 
     private Counter(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
-        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         if (exemplarsEnabled) {
-            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 1);
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
         } else {
             exemplarSamplerConfig = null;
         }u}(j+W  (1b0edfeb1d6fecb569272b142f57a6d39452e69bjW  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
@@ -43,10 +43,10 @@ public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> imple
 
     private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
-        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         if (exemplarsEnabled) {
-            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 1);
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
         } else {
             exemplarSamplerConfig = null;
         }u}(j+W  (50f352e26737c02cf4114fc330c1b5c573a5a3f7jW  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajW  modifiedjW  KjW  KjW  K#jW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.ExemplarProperties;
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.ExemplarsProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
@@ -109,8 +109,8 @@ public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.D
 
     private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
-        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         nativeInitialSchema = getConfigProperty(properties, props -> {
             if (Boolean.TRUE.equals(props.getHistogramClassicOnly())) {
                 return CLASSIC_HISTOGRAM;
@@ -122,10 +122,7 @@ private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProp
             if (Boolean.TRUE.equals(props.getHistogramNativeOnly())) {
                 return new double[]{};
             } else if (props.getHistogramClassicUpperBounds() != null) {
-                SortedSet<Double> upperBounds = new TreeSet<>();
-                for (double upperBound : props.getHistogramClassicUpperBounds()) {
-                    upperBounds.add(upperBound);
-                }
+                SortedSet<Double> upperBounds = new TreeSet<>(props.getHistogramClassicUpperBounds());
                 upperBounds.add(Double.POSITIVE_INFINITY);
                 double[] result = new double[upperBounds.size()];
                 int i = 0;
@@ -137,16 +134,16 @@ private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProp
                 return null;
             }
         });
-        double max = getConfigProperty(properties, MetricProperties::getHistogramNativeMaxZeroThreshold);
-        double min = getConfigProperty(properties, MetricProperties::getHistogramNativeMinZeroThreshold);
+        double max = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxZeroThreshold);
+        double min = getConfigProperty(properties, MetricsProperties::getHistogramNativeMinZeroThreshold);
         nativeMaxZeroThreshold = max == builder.DEFAULT_NATIVE_MAX_ZERO_THRESHOLD && min > max ? min : max;
         nativeMinZeroThreshold = Math.min(min, nativeMaxZeroThreshold);
-        nativeMaxBuckets = getConfigProperty(properties, MetricProperties::getHistogramNativeMaxNumberOfBuckets);
-        nativeResetDurationSeconds = getConfigProperty(properties, MetricProperties::getHistogramNativeResetDurationSeconds);
-        ExemplarProperties exemplarProperties = prometheusProperties.getExemplarConfig();
+        nativeMaxBuckets = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxNumberOfBuckets);
+        nativeResetDurationSeconds = getConfigProperty(properties, MetricsProperties::getHistogramNativeResetDurationSeconds);
+        ExemplarsProperties exemplarsProperties = prometheusProperties.getExemplarProperties();
         exemplarSamplerConfig = classicUpperBounds.length == 0 ?
-                new ExemplarSamplerConfig(exemplarProperties, 4) :
-                new ExemplarSamplerConfig(exemplarProperties, classicUpperBounds);
+                new ExemplarSamplerConfig(exemplarsProperties, 4) :
+                new ExemplarSamplerConfig(exemplarsProperties, classicUpperBounds);
     }
 
     /**
@@ -671,8 +668,8 @@ public Histogram build() {
         }
 
         @Override
-        protected MetricProperties toProperties() {
-            return MetricProperties.newBuilder()
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(exemplarsEnabled)
                     .withHistogramNativeOnly(nativeOnly)
                     .withHistogramClassicOnly(classicOnly)
@@ -689,8 +686,8 @@ protected MetricProperties toProperties() {
          * Default properties for histogram metrics.
          */
         @Override
-        public MetricProperties getDefaultProperties() {
-            return MetricProperties.newBuilder()
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(true)
                     .withHistogramNativeOnly(false)
                     .withHistogramClassicOnly(false)u}(j+W  (308c61be14cdabfa86b8ab39f5bfee20bfcebd8djW  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  Xe  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
@@ -54,8 +54,8 @@ public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoi
 
     private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
-        exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
             if (this.getMetadata().getName().equals(name)) {u}(j+W  (591c16e6b22cd0145f4996d95ad1102ea430320fjW  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajW  modifiedjW  K
jW  K
jW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
@@ -88,27 +88,27 @@ protected T getNoLabels() {
         return noLabels;
     }
 
-    protected MetricProperties[] getMetricProperties(Builder builder, PrometheusProperties prometheusProperties) {
+    protected MetricsProperties[] getMetricProperties(Builder builder, PrometheusProperties prometheusProperties) {
         String metricName = getMetadata().getName();
         if (prometheusProperties.getMetricProperties(metricName) != null) {
-            return new MetricProperties[]{
+            return new MetricsProperties[]{
                     prometheusProperties.getMetricProperties(metricName), // highest precedence
                     builder.toProperties(), // second-highest precedence
                     prometheusProperties.getDefaultMetricProperties(), // third-highest precedence
                     builder.getDefaultProperties() // fallback
             };
         } else {
-            return new MetricProperties[]{
+            return new MetricsProperties[]{
                     builder.toProperties(), // highest precedence
                     prometheusProperties.getDefaultMetricProperties(), // second-highest precedence
                     builder.getDefaultProperties() // fallback
             };
         }
     }
 
-    protected <T> T getConfigProperty(MetricProperties[] properties, Function<MetricProperties, T> getter) {
+    protected <T> T getConfigProperty(MetricsProperties[] properties, Function<MetricsProperties, T> getter) {
         T result;
-        for (MetricProperties props : properties) {
+        for (MetricsProperties props : properties) {
             result = getter.apply(props);
             if (result != null) {
                 return result;
@@ -140,17 +140,17 @@ public B withoutExemplars() {
         /**
          * Override if there are more properties than just exemplars enabled.
          */
-        protected MetricProperties toProperties() {
-            return MetricProperties.newBuilder()
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(exemplarsEnabled)
                     .build();
         }
 
         /**
          * Override if there are more properties than just exemplars enabled.
          */
-        public MetricProperties getDefaultProperties() {
-            return MetricProperties.newBuilder()
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(true)
                     .build();
         }u}(j+W  (6c7863ef416b0bbc4a31f2600712e5d32ca4bbabjW  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.config.MetricProperties;
+import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
@@ -47,21 +47,21 @@ public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataP
 
     private Summary(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
-        MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
-        this.exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        this.exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.quantiles = Collections.unmodifiableList(makeQuantiles(properties));
-        this.maxAgeSeconds = getConfigProperty(properties, MetricProperties::getSummaryMaxAgeSeconds);
-        this.ageBuckets = getConfigProperty(properties, MetricProperties::getSummaryNumberOfAgeBuckets);
-        this.exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 4);
+        this.maxAgeSeconds = getConfigProperty(properties, MetricsProperties::getSummaryMaxAgeSeconds);
+        this.ageBuckets = getConfigProperty(properties, MetricsProperties::getSummaryNumberOfAgeBuckets);
+        this.exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 4);
     }
 
-    private List<CKMSQuantiles.Quantile> makeQuantiles(MetricProperties[] properties) {
+    private List<CKMSQuantiles.Quantile> makeQuantiles(MetricsProperties[] properties) {
         List<CKMSQuantiles.Quantile> result = new ArrayList<>();
-        double[] quantiles = getConfigProperty(properties, MetricProperties::getSummaryQuantiles);
-        double[] errors = getConfigProperty(properties, MetricProperties::getSummaryQuantileErrors);
+        List<Double> quantiles = getConfigProperty(properties, MetricsProperties::getSummaryQuantiles);
+        List<Double> quantileErrors = getConfigProperty(properties, MetricsProperties::getSummaryQuantileErrors);
         if (quantiles != null) {
-            for (int i=0; i<quantiles.length; i++) {
-                result.add(new CKMSQuantiles.Quantile(quantiles[i], errors[i]));
+            for (int i=0; i<quantiles.size(); i++) {
+                result.add(new CKMSQuantiles.Quantile(quantiles.get(i), quantileErrors.get(i)));
             }
         }
         return result;
@@ -280,7 +280,7 @@ public Builder withNumberOfAgeBuckets(int ageBuckets) {
         }
 
         @Override
-        protected MetricProperties toProperties() {
+        protected MetricsProperties toProperties() {
             double[] quantiles = null;
             double[] quantileErrors = null;
             if (!this.quantiles.isEmpty()) {
@@ -291,7 +291,7 @@ protected MetricProperties toProperties() {
                     quantileErrors[i] = this.quantiles.get(i).epsilon;
                 }
             }
-            return MetricProperties.newBuilder()
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(exemplarsEnabled)
                     .withSummaryQuantiles(quantiles)
                     .withSummaryQuantileErrors(quantileErrors)
@@ -304,8 +304,8 @@ protected MetricProperties toProperties() {
          * Default properties for summary metrics.
          */
         @Override
-        public MetricProperties getDefaultProperties() {
-            return MetricProperties.newBuilder()
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
                     .withExemplarsEnabled(true)
                     .withSummaryNumberOfAgeBuckets(DEFAULT_NUMBER_OF_AGE_BUCKETS)
                     .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)u}(j+W  (f913753cd1f16ea1413664649faefc42c89b8a23jW  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormats.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.config.ExpositionFormatProperties;
+import io.prometheus.metrics.config.ExporterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 
 public class ExpositionFormats {
@@ -18,10 +18,10 @@ private ExpositionFormats(PrometheusProtobufWriter prometheusProtobufWriter,
     }
 
     public static ExpositionFormats init() {
-        return init(PrometheusProperties.get().getExpositionFormatConfig());
+        return init(PrometheusProperties.get().getExporterProperties());
     }
 
-    public static ExpositionFormats init(ExpositionFormatProperties properties) {
+    public static ExpositionFormats init(ExporterProperties properties) {
         return new ExpositionFormats(
                 new PrometheusProtobufWriter(),
                 new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),u}(j+W  (0559ce0bef9d73bef4ca2c69da261ba53075c975jW  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -35,7 +35,7 @@
  */
 public class OpenMetricsTextFormatWriter implements ExpositionFormatWriter {
 
-    public final static String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
+    public static final String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
     private final boolean createdTimestampsEnabled;
     private final boolean exemplarsOnAllMetricTypesEnabled;
 u}(j+W  (d6de08114a9b4472ec47d05337365c3f4f83b52ejW  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -33,7 +33,7 @@
  */
 public class PrometheusProtobufWriter implements ExpositionFormatWriter {
 
-    public final String CONTENT_TYPE = "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited";
+    public static final String CONTENT_TYPE = "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited";
 
     @Override
     public boolean accepts(String acceptHeader) {u}(j+W  (a4499dd9da43bb6d1dc392d8c42a6880bc985fadjW  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajW  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  XR  @@ -32,7 +32,7 @@
  */
 public class PrometheusTextFormatWriter implements ExpositionFormatWriter {
 
-    public final static String CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
+    public static final String CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
 
     private final boolean writeCreatedTimestamps;
 u}(j+W  (c01be427bf0de90ad01afc6b48fce538165eccafjW  Stmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajW  modifiedjW  KjW  KjW  KjW  https://github.com/prometheus/client_java/blob/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajW  https://github.com/prometheus/client_java/raw/dcb0e0a253f764884a9ef189323ba6c5e48fafa4/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajW  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=dcb0e0a253f764884a9ef189323ba6c5e48fafa4jW  X  @@ -6,7 +6,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import io.prometheus.metrics.config.HttpServerProperties;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
@@ -98,7 +98,7 @@ public static class Builder {
         private HttpServer httpServer = null;
         private ExecutorService executorService = null;
         private PrometheusRegistry registry = null;
-        private HttpServerProperties properties = null;
+        private ExporterHttpServerProperties properties = null;
         private boolean daemon = false;
         private Predicate<String> sampleNameFilter;
         private Authenticator authenticator = null;
@@ -115,7 +115,7 @@ public Builder withPort(int port) {
             return this;
         }
 
-        public Builder withProperties(HttpServerProperties properties) {
+        public Builder withProperties(ExporterHttpServerProperties properties) {
             this.properties = properties;
             return this;
         }
@@ -221,7 +221,7 @@ private int findPort() {
             if (port != null) {
                 return port;
             }
-            HttpServerProperties defaultProperties = PrometheusProperties.get().getHttpServerConfig();
+            ExporterHttpServerProperties defaultProperties = PrometheusProperties.get().getExporterHttpServerProperties();
             if (defaultProperties != null && defaultProperties.getPort() != null) {
                 return defaultProperties.getPort();
             }ueu(97ccbfc71002c2b5da28f409779c8e3c6bac09ad}(sha(97ccbfc71002c2b5da28f409779c8e3c6bac09adnode_idEC_kwDOAHoJt9oAKDk3Y2NiZmM3MTAwMmMyYjVkYTI4ZjQwOTc3OWM4ZTNjNmJhYzA5YWQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T12:59:03Zu	committer}(jUX  Fabian StäberjWX  fabian@fstab.dejYX  2023-07-17T12:59:03Zumessage1Remove protobuf-shaded from project after releasetree}(jMX  (658a77a9c9445b8bd187a8e3ee53e422b5b70e3durlfhttps://api.github.com/repos/prometheus/client_java/git/trees/658a77a9c9445b8bd187a8e3ee53e422b5b70e3dujeX  hhttps://api.github.com/repos/prometheus/client_java/git/commits/97ccbfc71002c2b5da28f409779c8e3c6bac09ad
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujeX  dhttps://api.github.com/repos/prometheus/client_java/commits/97ccbfc71002c2b5da28f409779c8e3c6bac09adhtml_urlYhttps://github.com/prometheus/client_java/commit/97ccbfc71002c2b5da28f409779c8e3c6bac09adcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/97ccbfc71002c2b5da28f409779c8e3c6bac09ad/commentsjSX  }(loginfstabidJ' jOX  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jeX  "https://api.github.com/users/fstabjqX  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj[X  }(jvX  fstabjxX  J' jOX  MDQ6VXNlcjMzMDUzNQ==jzX  2https://avatars.githubusercontent.com/u/330535?v=4j|X  h3jeX  "https://api.github.com/users/fstabjqX  https://github.com/fstabjX  ,https://api.github.com/users/fstab/followersjX  9https://api.github.com/users/fstab/following{/other_user}jX  2https://api.github.com/users/fstab/gists{/gist_id}jX  9https://api.github.com/users/fstab/starred{/owner}{/repo}jX  0https://api.github.com/users/fstab/subscriptionsjX  'https://api.github.com/users/fstab/orgsjX  (https://api.github.com/users/fstab/reposjX  3https://api.github.com/users/fstab/events{/privacy}jX  2https://api.github.com/users/fstab/received_eventsjX  UserjX  uparents]}(jMX  (480d698aafdb0dd1664d15061b2bb382dafdf41ejeX  dhttps://api.github.com/repos/prometheus/client_java/commits/480d698aafdb0dd1664d15061b2bb382dafdf41ejqX  Yhttps://github.com/prometheus/client_java/commit/480d698aafdb0dd1664d15061b2bb382dafdf41euastats}(totalK	additionsK	deletionsKufiles](}(jMX  (7ba273e55c69052dabda53f2189fe61b541d9e3efilenamepom.xmlstatusmodifiedjX  K jX  KchangesKblob_url_https://github.com/prometheus/client_java/blob/97ccbfc71002c2b5da28f409779c8e3c6bac09ad/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/97ccbfc71002c2b5da28f409779c8e3c6bac09ad/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=97ccbfc71002c2b5da28f409779c8e3c6bac09adpatchX;  @@ -57,7 +57,6 @@
         <module>prometheus-metrics-exposition-formats</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>examples</module>
-        <module>protobuf-shaded</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(jMX  (2cd178393fae1ee2d96e515ad9c70233a1f058e8jX  -prometheus-metrics-exposition-formats/pom.xmljX  modifiedjX  KjX  KjX  KjX  https://github.com/prometheus/client_java/blob/97ccbfc71002c2b5da28f409779c8e3c6bac09ad/prometheus-metrics-exposition-formats%2Fpom.xmljX  https://github.com/prometheus/client_java/raw/97ccbfc71002c2b5da28f409779c8e3c6bac09ad/prometheus-metrics-exposition-formats%2Fpom.xmljX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=97ccbfc71002c2b5da28f409779c8e3c6bac09adjX  X)  @@ -46,7 +46,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>protobuf-shaded</artifactId>
-            <version>${project.version}</version>
+            <version>1.0.0-alpha-1</version>
         </dependency>
 
         <!-- test dependencies -->ueu(ba04862f7e69a1a6db85791bba0b869805e93afc}(sha(ba04862f7e69a1a6db85791bba0b869805e93afcnode_idEC_kwDOAHoJt9oAKGJhMDQ4NjJmN2U2OWExYTZkYjg1NzkxYmJhMGI4Njk4MDVlOTNhZmMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jX  Fabian StäberjX  fabian@fstab.dejX  2023-07-29T21:19:44Zumessage%Extrace common exporter functionalitytree}(jX  (abceda39d175b4206c66a098872769c1368ee1f3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/abceda39d175b4206c66a098872769c1368ee1f3ujX  hhttps://api.github.com/repos/prometheus/client_java/git/commits/ba04862f7e69a1a6db85791bba0b869805e93afc
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujX  dhttps://api.github.com/repos/prometheus/client_java/commits/ba04862f7e69a1a6db85791bba0b869805e93afchtml_urlYhttps://github.com/prometheus/client_java/commit/ba04862f7e69a1a6db85791bba0b869805e93afccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/ba04862f7e69a1a6db85791bba0b869805e93afc/commentsjX  }(loginfstabidJ' jX  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jX  "https://api.github.com/users/fstabjX  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujX  }(jX  fstabjX  J' jX  MDQ6VXNlcjMzMDUzNQ==jX  2https://avatars.githubusercontent.com/u/330535?v=4jX  h3jX  "https://api.github.com/users/fstabjX  https://github.com/fstabjX  ,https://api.github.com/users/fstab/followersjX  9https://api.github.com/users/fstab/following{/other_user}j Y  2https://api.github.com/users/fstab/gists{/gist_id}jY  9https://api.github.com/users/fstab/starred{/owner}{/repo}jY  0https://api.github.com/users/fstab/subscriptionsjY  'https://api.github.com/users/fstab/orgsjY  (https://api.github.com/users/fstab/reposj
Y  3https://api.github.com/users/fstab/events{/privacy}jY  2https://api.github.com/users/fstab/received_eventsjY  UserjY  uparents]}(jX  (644da5a0b6e121cf83b8654e86616c138caefabajX  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabajX  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalML	additionsML	deletionsK ufiles](}(jX  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcfilename*prometheus-metrics-exporter-common/pom.xmlstatusaddedj*Y  K5j+Y  K changesK5blob_urlhttps://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=ba04862f7e69a1a6db85791bba0b869805e93afcpatchXk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jX  (3854871dc04af2dc0ec88d1be9e816f25b1c7dacj0Y  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javaj2Y  addedj*Y  Kj+Y  K j4Y  Kj5Y  https://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj7Y  https://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj9Y  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=ba04862f7e69a1a6db85791bba0b869805e93afcj;Y  @@ -0,0 +1,8 @@
+package io.prometheus.metrics.exporter.common;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    @Override
+    void close();
+}u}(jX  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj0Y  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javaj2Y  addedj*Y  KGj+Y  K j4Y  KGj5Y  https://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj7Y  https://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj9Y  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=ba04862f7e69a1a6db85791bba0b869805e93afcj;Y  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(jX  (4e843df5ad2f4a6191407b04f928bf0d7b247c95j0Y  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javaj2Y  addedj*Y  Kj+Y  K j4Y  Kj5Y  https://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj7Y  https://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj9Y  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=ba04862f7e69a1a6db85791bba0b869805e93afcj;Y  Xa  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setStatus(int)}
+     */
+    void setStatus(int statusCode);
+
+    /**
+     * See {@code jakarta.servlet.ServletResponse.getOutputStream()}
+     */
+    OutputStream getOutputStream() throws IOException;
+}u}(jX  (cdee93fe12486809cd73f1ddf8c7b5e075b93a9bj0Y  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javaj2Y  addedj*Y  Kj+Y  K j4Y  Kj5Y  https://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj7Y  https://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj9Y  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=ba04862f7e69a1a6db85791bba0b869805e93afcj;Y  X  @@ -0,0 +1,165 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Enumeration;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private final LocalByteArray threadLocalResponseBuffer = new LocalByteArray();
+
+    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
+        @Override
+        protected ByteArrayOutputStream initialValue() {
+            return new ByteArrayOutputStream(1 << 20); // 1 MB
+        }
+    }
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = threadLocalResponseBuffer.get();
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                response.setStatus(200);
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.getOutputStream())) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                long contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (!request.getMethod().equals("HEAD")) {
+                    try (OutputStream outputStream = response.getOutputStream()) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } finally {
+            exchange.close();
+            threadLocalResponseBuffer.get().reset();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam != null) {
+            switch (debugParam) {
+                case "openmetrics":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), snapshots);
+                    return true;
+                case "text":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), snapshots);
+                    return true;
+                case "prometheus-protobuf":
+                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    response.getOutputStream().write(debugString.getBytes(StandardCharsets.UTF_8));
+                    return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(jX  (318e865f55bdd893d762a5f4e759a502e8bbc983j0Y  4prometheus-metrics-exporter-common/version-rules.xmlj2Y  addedj*Y  Kj+Y  K j4Y  Kj5Y  https://github.com/prometheus/client_java/blob/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fversion-rules.xmlj7Y  https://github.com/prometheus/client_java/raw/ba04862f7e69a1a6db85791bba0b869805e93afc/prometheus-metrics-exporter-common%2Fversion-rules.xmlj9Y  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=ba04862f7e69a1a6db85791bba0b869805e93afcj;Y  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>ueu      (b82edcd6cf8048207a45523a5d07429f0308ee63}(sha(b82edcd6cf8048207a45523a5d07429f0308ee63node_idEC_kwDOAHoJt9oAKGI4MmVkY2Q2Y2Y4MDQ4MjA3YTQ1NTIzYTVkMDc0MjlmMDMwOGVlNjMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:33:30Zu	committer}(joY  Fabian StäberjqY  fabian@fstab.dejsY  2023-08-26T21:33:30ZumessageFix mermaid flowcharttree}(jgY  (672541da086ecb3e22cba0516fe062aed57e3c0curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/672541da086ecb3e22cba0516fe062aed57e3c0cujY  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b82edcd6cf8048207a45523a5d07429f0308ee63
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujY  dhttps://api.github.com/repos/prometheus/client_java/commits/b82edcd6cf8048207a45523a5d07429f0308ee63html_urlYhttps://github.com/prometheus/client_java/commit/b82edcd6cf8048207a45523a5d07429f0308ee63comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b82edcd6cf8048207a45523a5d07429f0308ee63/commentsjmY  }(loginfstabidJ' jiY  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jY  "https://api.github.com/users/fstabjY  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujuY  }(jY  fstabjY  J' jiY  MDQ6VXNlcjMzMDUzNQ==jY  2https://avatars.githubusercontent.com/u/330535?v=4jY  h3jY  "https://api.github.com/users/fstabjY  https://github.com/fstabjY  ,https://api.github.com/users/fstab/followersjY  9https://api.github.com/users/fstab/following{/other_user}jY  2https://api.github.com/users/fstab/gists{/gist_id}jY  9https://api.github.com/users/fstab/starred{/owner}{/repo}jY  0https://api.github.com/users/fstab/subscriptionsjY  'https://api.github.com/users/fstab/orgsjY  (https://api.github.com/users/fstab/reposjY  3https://api.github.com/users/fstab/events{/privacy}jY  2https://api.github.com/users/fstab/received_eventsjY  UserjY  uparents]}(jgY  (e2b404b325e02687e147103df65e20ffccd46601jY  dhttps://api.github.com/repos/prometheus/client_java/commits/e2b404b325e02687e147103df65e20ffccd46601jY  Yhttps://github.com/prometheus/client_java/commit/e2b404b325e02687e147103df65e20ffccd46601uastats}(totalK	additionsK	deletionsKufiles]}(jgY  (dcec4b25e96d6a8c28561a30b2095bb07d22a3acfilename(examples/example-opentelemetry/README.mdstatusmodifiedjY  KjY  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/b82edcd6cf8048207a45523a5d07429f0308ee63/examples%2Fexample-opentelemetry%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/b82edcd6cf8048207a45523a5d07429f0308ee63/examples%2Fexample-opentelemetry%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=b82edcd6cf8048207a45523a5d07429f0308ee63patchX  @@ -19,8 +19,8 @@ docker-compose up
 This will set up the following scenario
 
 ```mermaid
-flowchart LR;
-   example app -- OTLP --> OpenTelemetry collector -- Prometheus remote write --> Prometheus Server;
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
 ```
 
 The OpenTelemetry collector is configured to log incoming metrics to the console.uau(3a024be96d3b07625b020ed950404da436fdf847}(sha(3a024be96d3b07625b020ed950404da436fdf847node_idEC_kwDOAHoJt9oAKDNhMDI0YmU5NmQzYjA3NjI1YjAyMGVkOTUwNDA0ZGE0MzZmZGY4NDccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:05:12Zu	committer}(jY  Fabian StäberjY  fabian@fstab.dejY  2023-07-17T10:05:12ZumessageKUpdate parent pom metadata

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jY  (9ff66c7e9e042a73c6de39079950ba3a70a6e19durlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9ff66c7e9e042a73c6de39079950ba3a70a6e19dujY  hhttps://api.github.com/repos/prometheus/client_java/git/commits/3a024be96d3b07625b020ed950404da436fdf847
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujY  dhttps://api.github.com/repos/prometheus/client_java/commits/3a024be96d3b07625b020ed950404da436fdf847html_urlYhttps://github.com/prometheus/client_java/commit/3a024be96d3b07625b020ed950404da436fdf847comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/3a024be96d3b07625b020ed950404da436fdf847/commentsjY  }(loginfstabidJ' jY  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jY  "https://api.github.com/users/fstabj Z  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujY  }(jZ  fstabjZ  J' jY  MDQ6VXNlcjMzMDUzNQ==j	Z  2https://avatars.githubusercontent.com/u/330535?v=4jZ  h3jY  "https://api.github.com/users/fstabj Z  https://github.com/fstabjZ  ,https://api.github.com/users/fstab/followersjZ  9https://api.github.com/users/fstab/following{/other_user}jZ  2https://api.github.com/users/fstab/gists{/gist_id}jZ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jZ  0https://api.github.com/users/fstab/subscriptionsjZ  'https://api.github.com/users/fstab/orgsjZ  (https://api.github.com/users/fstab/reposjZ  3https://api.github.com/users/fstab/events{/privacy}jZ  2https://api.github.com/users/fstab/received_eventsj Z  Userj"Z  uparents]}(jY  (6f19357786a4d2451864b873bcd7f623590e5fe5jY  dhttps://api.github.com/repos/prometheus/client_java/commits/6f19357786a4d2451864b873bcd7f623590e5fe5j Z  Yhttps://github.com/prometheus/client_java/commit/6f19357786a4d2451864b873bcd7f623590e5fe5uastats}(totalK	additionsK	deletionsKufiles]}(jY  (816fd0df190d2d65bdd7c84ebaf4555e0695751dfilenamepom.xmlstatusmodifiedj<Z  Kj=Z  KchangesKblob_url_https://github.com/prometheus/client_java/blob/3a024be96d3b07625b020ed950404da436fdf847/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/3a024be96d3b07625b020ed950404da436fdf847/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=3a024be96d3b07625b020ed950404da436fdf847patchX  @@ -7,10 +7,10 @@
     <artifactId>client_java</artifactId>
     <version>1.0.0-alpha-1-SNAPSHOT</version>
 
-    <name>Prometheus Java Suite</name>
+    <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
     <description>
-        The Prometheus Java Suite: Client Metrics, Exposition, and Examples
+        The Prometheus Java Metrics Library
     </description>
 
     <licenses>
@@ -34,6 +34,16 @@
             <name>Matt T. Proud</name>
             <email>matt.proud@gmail.com</email>
         </developer>
+        <developer>
+            <id>brian-brazil</id>
+            <name>Brian Brazil</name>
+            <email>brian.brazil@boxever.com</email>
+        </developer>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
     </developers>
 
     <modules>uau(7bb727ce4cd20e1b08cb30e0b97b54334aac49df}(sha(7bb727ce4cd20e1b08cb30e0b97b54334aac49dfnode_idEC_kwDOAHoJt9oAKDdiYjcyN2NlNGNkMjBlMWIwOGNiMzBlMGI5N2I1NDMzNGFhYzQ5ZGYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T22:16:12Zu	committer}(jYZ  Fabian Stäberj[Z  fabian@fstab.dej]Z  2023-08-26T22:16:12Zumessage&Add Gauge support to the OTel exportertree}(jQZ  (61fc7f3c375f134602ff7b5b706cc0f394027ff0urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/61fc7f3c375f134602ff7b5b706cc0f394027ff0ujiZ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7bb727ce4cd20e1b08cb30e0b97b54334aac49df
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujiZ  dhttps://api.github.com/repos/prometheus/client_java/commits/7bb727ce4cd20e1b08cb30e0b97b54334aac49dfhtml_urlYhttps://github.com/prometheus/client_java/commit/7bb727ce4cd20e1b08cb30e0b97b54334aac49dfcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7bb727ce4cd20e1b08cb30e0b97b54334aac49df/commentsjWZ  }(loginfstabidJ' jSZ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jiZ  "https://api.github.com/users/fstabjuZ  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj_Z  }(jzZ  fstabj|Z  J' jSZ  MDQ6VXNlcjMzMDUzNQ==j~Z  2https://avatars.githubusercontent.com/u/330535?v=4jZ  h3jiZ  "https://api.github.com/users/fstabjuZ  https://github.com/fstabjZ  ,https://api.github.com/users/fstab/followersjZ  9https://api.github.com/users/fstab/following{/other_user}jZ  2https://api.github.com/users/fstab/gists{/gist_id}jZ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jZ  0https://api.github.com/users/fstab/subscriptionsjZ  'https://api.github.com/users/fstab/orgsjZ  (https://api.github.com/users/fstab/reposjZ  3https://api.github.com/users/fstab/events{/privacy}jZ  2https://api.github.com/users/fstab/received_eventsjZ  UserjZ  uparents]}(jQZ  (aa4d66886520565c5a22bc96e3c24a3028f910f1jiZ  dhttps://api.github.com/repos/prometheus/client_java/commits/aa4d66886520565c5a22bc96e3c24a3028f910f1juZ  Yhttps://github.com/prometheus/client_java/commit/aa4d66886520565c5a22bc96e3c24a3028f910f1uastats}(totalK	additionsK 	deletionsKufiles]}(jQZ  (23686bf6a1e86ba1776417fbd64f72388f9c4bc5filenameprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javastatusmodifiedjZ  K jZ  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/7bb727ce4cd20e1b08cb30e0b97b54334aac49df/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaraw_urlhttps://github.com/prometheus/client_java/raw/7bb727ce4cd20e1b08cb30e0b97b54334aac49df/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=7bb727ce4cd20e1b08cb30e0b97b54334aac49dfpatchX  @@ -1,12 +1,9 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
-import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
 
 import java.util.Collection;
 import java.util.List;uau(98967b8367216f4107ad5621f260ed895c930262}(sha(98967b8367216f4107ad5621f260ed895c930262node_idEC_kwDOAHoJt9oAKDk4OTY3YjgzNjcyMTZmNDEwN2FkNTYyMWYyNjBlZDg5NWM5MzAyNjIcommit}(author}(nameCianShevemail*47430248+CianShev@users.noreply.github.comdate2023-07-06T09:43:40Zu	committer}(jZ  Fabian StäberjZ  fabian@fstab.dejZ  2023-07-06T11:18:53ZumessageUpdate README.md

Fixed small spelling error in README.md

Signed-off-by: CianShev <47430248+CianShev@users.noreply.github.com>tree}(jZ  (6bcb8205c9e60f551039f8bb7c5729a829c68efeurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/6bcb8205c9e60f551039f8bb7c5729a829c68efeujZ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/98967b8367216f4107ad5621f260ed895c930262
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujZ  dhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262html_urlYhttps://github.com/prometheus/client_java/commit/98967b8367216f4107ad5621f260ed895c930262comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262/commentsjZ  }(loginCianShevidJhjZ  MDQ6VXNlcjQ3NDMwMjQ4
avatar_url4https://avatars.githubusercontent.com/u/47430248?v=4gravatar_idh3jZ  %https://api.github.com/users/CianShevjZ  https://github.com/CianShev
followers_url/https://api.github.com/users/CianShev/followers
following_url<https://api.github.com/users/CianShev/following{/other_user}	gists_url5https://api.github.com/users/CianShev/gists{/gist_id}starred_url<https://api.github.com/users/CianShev/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/CianShev/subscriptionsorganizations_url*https://api.github.com/users/CianShev/orgs	repos_url+https://api.github.com/users/CianShev/repos
events_url6https://api.github.com/users/CianShev/events{/privacy}received_events_url5https://api.github.com/users/CianShev/received_eventstypeUser
site_adminujZ  }(jZ  fstabjZ  J' jZ  MDQ6VXNlcjMzMDUzNQ==jZ  2https://avatars.githubusercontent.com/u/330535?v=4jZ  h3jZ  "https://api.github.com/users/fstabjZ  https://github.com/fstabjZ  ,https://api.github.com/users/fstab/followersjZ  9https://api.github.com/users/fstab/following{/other_user}jZ  2https://api.github.com/users/fstab/gists{/gist_id}jZ  9https://api.github.com/users/fstab/starred{/owner}{/repo}j [  0https://api.github.com/users/fstab/subscriptionsj[  'https://api.github.com/users/fstab/orgsj[  (https://api.github.com/users/fstab/reposj[  3https://api.github.com/users/fstab/events{/privacy}j[  2https://api.github.com/users/fstab/received_eventsj
[  Userj[  uparents]}(jZ  (db2304d042a8f9373504b167efcfbbea13a9e1cdjZ  dhttps://api.github.com/repos/prometheus/client_java/commits/db2304d042a8f9373504b167efcfbbea13a9e1cdjZ  Yhttps://github.com/prometheus/client_java/commit/db2304d042a8f9373504b167efcfbbea13a9e1cduastats}(totalK	additionsK	deletionsKufiles]}(jZ  (b8655dea765c3d36977d5ef2cbf51d7334d2a2d2filename	README.mdstatusmodifiedj&[  Kj'[  KchangesKblob_urlahttps://github.com/prometheus/client_java/blob/98967b8367216f4107ad5621f260ed895c930262/README.mdraw_url`https://github.com/prometheus/client_java/raw/98967b8367216f4107ad5621f260ed895c930262/README.mdcontents_urlshttps://api.github.com/repos/prometheus/client_java/contents/README.md?ref=98967b8367216f4107ad5621f260ed895c930262patchX  @@ -84,7 +84,7 @@ the environment variable `PROMETHEUS_DISABLE_CREATED_SERIES=true`.
 
 ## Building
 
-Building the repository needs Java 11 (The project the project still supports Java 6 and Java versions > 11 dropped support for Java 6 output). We recommend to use an [up-to-data Java 8 installation](https://adoptium.net/en-GB/marketplace/?version=8). The project provides the maven wrapper and therefore no local maven installqation is needed. To build the repository just call `./mvnw verify`.
+Building the repository needs Java 11 (The project the project still supports Java 6 and Java versions > 11 dropped support for Java 6 output). We recommend to use an [up-to-data Java 8 installation](https://adoptium.net/en-GB/marketplace/?version=8). The project provides the maven wrapper and therefore no local maven installation is needed. To build the repository just call `./mvnw verify`.
 
 ## Instrumenting
 uau(61548310ecf100254dea23427e0eb911e8148a17}(sha(61548310ecf100254dea23427e0eb911e8148a17node_idEC_kwDOAHoJt9oAKDYxNTQ4MzEwZWNmMTAwMjU0ZGVhMjM0MjdlMGViOTExZTgxNDhhMTccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-22T17:34:04Zu	committer}(jC[  Fabian StäberjE[  fabian@fstab.dejG[  2023-08-22T17:34:04ZumessageClean up shaded dependenciestree}(j;[  (9dc2213147c146f5b43fcaf73e1e367d18e9231furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9dc2213147c146f5b43fcaf73e1e367d18e9231fujS[  hhttps://api.github.com/repos/prometheus/client_java/git/commits/61548310ecf100254dea23427e0eb911e8148a17
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujS[  dhttps://api.github.com/repos/prometheus/client_java/commits/61548310ecf100254dea23427e0eb911e8148a17html_urlYhttps://github.com/prometheus/client_java/commit/61548310ecf100254dea23427e0eb911e8148a17comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/61548310ecf100254dea23427e0eb911e8148a17/commentsjA[  }(loginfstabidJ' j=[  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jS[  "https://api.github.com/users/fstabj_[  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujI[  }(jd[  fstabjf[  J' j=[  MDQ6VXNlcjMzMDUzNQ==jh[  2https://avatars.githubusercontent.com/u/330535?v=4jj[  h3jS[  "https://api.github.com/users/fstabj_[  https://github.com/fstabjm[  ,https://api.github.com/users/fstab/followersjo[  9https://api.github.com/users/fstab/following{/other_user}jq[  2https://api.github.com/users/fstab/gists{/gist_id}js[  9https://api.github.com/users/fstab/starred{/owner}{/repo}ju[  0https://api.github.com/users/fstab/subscriptionsjw[  'https://api.github.com/users/fstab/orgsjy[  (https://api.github.com/users/fstab/reposj{[  3https://api.github.com/users/fstab/events{/privacy}j}[  2https://api.github.com/users/fstab/received_eventsj[  Userj[  uparents]}(j;[  (5f64d23ea9a883cdbcee1ffa881d394639bd50e1jS[  dhttps://api.github.com/repos/prometheus/client_java/commits/5f64d23ea9a883cdbcee1ffa881d394639bd50e1j_[  Yhttps://github.com/prometheus/client_java/commit/5f64d23ea9a883cdbcee1ffa881d394639bd50e1uastats}(totalMg	additionsM		deletionsMufiles](}(j;[  (59f18133e00289827a2d8bd5c0e8b0c2a15a3178filename1examples/example-opentelemetry/pom-standalone.xmlstatusaddedj[  KPj[  K changesKPblob_urlhttps://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fpom-standalone.xmlraw_urlhttps://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fpom-standalone.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fpom-standalone.xml?ref=61548310ecf100254dea23427e0eb911e8148a17patchX  @@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>io.prometheus</groupId>
+    <artifactId>example-opentelemetry</artifactId>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <properties>
+        <maven.compiler.target>11</maven.compiler.target>
+        <maven.compiler.source>11</maven.compiler.source>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>1.29.0</version>
+            <scope>provided</scope>
+        </dependency>
+        -->
+    </dependencies>
+
+    <build>
+        <finalName>prometheus-opentelemetry-example-app</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j;[  (074b33fbecce0e6e892917379f5b830f2cb768f8j[  &examples/example-opentelemetry/pom.xmlj[  modifiedj[  Kj[  K j[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -42,6 +42,14 @@
             <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>1.29.0</version>
+            <scope>provided</scope>
+        </dependency>
+        -->
     </dependencies>
 
     <build>u}(j;[  (1b3154ec55ea13f720a3e3f617f5cfd06f58b0daj[  cexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj[  modifiedj[  K=j[  Kj[  K>j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj[  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -5,11 +5,26 @@
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.Unit;
 
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * Simple example of an application exposing metrics pushing metrics via OTLP.
  */
 public class Main {
-    public static void main(String[] args) throws InterruptedException {
+
+    public static void main(String[] args) throws Exception {
+
+        //Map<String, String> resourceAttributes = getResourceAttributes();
+        //System.out.println(resourceAttributes);
+
         Counter counter = Counter.newBuilder()
                 .withName("uptime_seconds_total")
                 .withHelp("total number of seconds since this application was started")
@@ -24,4 +39,49 @@ public static void main(String[] args) throws InterruptedException {
             counter.inc();
         }
     }
+
+    public static Map<String, String> getResourceAttributes() throws Exception {
+        URL url1 = new File("/home/fabian/.m2/repository/io/opentelemetry/opentelemetry-api/1.29.0/opentelemetry-api-1.29.0.jar").toURI().toURL();
+        URL url2 = new File("/home/fabian/.m2/repository/io/opentelemetry/opentelemetry-context/1.29.0/opentelemetry-context-1.29.0.jar").toURI().toURL();
+
+        URLClassLoader cl = new URLClassLoader(new URL[]{url1, url2});
+        Class<?> globalOpenTelemetryClass = cl.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+        Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+        if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+            // GlobalOpenTelemetry is injected by the OTel Java aqent
+            Object applicationMeterProvider = globalOpenTelemetry.getClass().getMethod("getMeterProvider").invoke(globalOpenTelemetry);
+            Field agentMeterProviderField = applicationMeterProvider.getClass().getDeclaredField("agentMeterProvider");
+            agentMeterProviderField.setAccessible(true);
+            Object agentMeterProvider = agentMeterProviderField.get(applicationMeterProvider);
+            Field delegateField = agentMeterProvider.getClass().getDeclaredField("delegate");
+            delegateField.setAccessible(true);
+            Object sdkMeterProvider = delegateField.get(agentMeterProvider);
+
+            // System.out.println(meterProvider.getClass());
+            Field sharedStateField = sdkMeterProvider.getClass().getDeclaredField("sharedState");
+            sharedStateField.setAccessible(true);
+            Object sharedState = sharedStateField.get(sdkMeterProvider);
+
+            Method getResourceMethod = sharedState.getClass().getMethod("getResource");
+            getResourceMethod.setAccessible(true);
+            Object resource = getResourceMethod.invoke(sharedState);
+            Method getAttributesMethod = resource.getClass().getMethod("getAttributes");
+            getAttributesMethod.setAccessible(true);
+            Object attributes = getAttributesMethod.invoke(resource);
+            Method asMapMethod = attributes.getClass().getMethod("asMap");
+            asMapMethod.setAccessible(true);
+            Map<?, ?> attributeMap = (Map<?, ?>) asMapMethod.invoke(attributes);
+
+            Map<String, String> result = new HashMap<>();
+            for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                if (entry.getKey() != null && entry.getValue() != null) {
+                    result.put(entry.getKey().toString(), entry.getValue().toString());
+                }
+            }
+            return result;
+        } else {
+            System.out.println("no java agent found");
+            return Collections.emptyMap();
+        }
+    }
 }u}(j;[  (ba5d97577739137181a6d15e70170bba6923ecc0j[  pom.xmlj[  modifiedj[  Kj[  Kj[  Kj[  _https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/pom.xmlj[  ^https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/pom.xmlj[  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -59,6 +56,7 @@
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
         <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(j;[  (9d6da09da95afaf8a83f89de729fa7593b8880acj[  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;u}(j;[  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j[  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(j;[  (8212b1807e75ca3bcb8d95e0b4cd084e44c820b1j[  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import org.junit.Test;u}(j;[  (6b5266962f80db0e582089efb438621100a5ce92j[  1prometheus-metrics-exporter-opentelemetry/pom.xmlj[  modifiedj[  K=j[  Kj[  KBj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  XP  @@ -44,6 +44,12 @@
             <artifactId>prometheus-metrics-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
         <dependency>
             <groupId>io.opentelemetry</groupId>
             <artifactId>opentelemetry-api</artifactId>
@@ -64,6 +70,7 @@
             <artifactId>opentelemetry-exporter-otlp</artifactId>
             <version>${otel.version}</version>
         </dependency>
+        -->
 
         <!-- test dependencies -->
         <dependency>
@@ -78,10 +85,45 @@
         <resources>
             <resource>
                 <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
                 <filtering>true</filtering>
             </resource>
         </resources>
         <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
@@ -93,35 +135,49 @@
                             <goal>shade</goal>
                         </goals>
                         <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
                             <relocations>
                                 <relocation>
                                     <pattern>io.opentelemetry</pattern>
-                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
                                 </relocation>
                                 <relocation>
                                     <pattern>okhttp3</pattern>
-                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.okhttp3</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
                                 </relocation>
                                 <relocation>
                                     <pattern>kotlin</pattern>
-                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.kotlin</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
                                 </relocation>
                                 <relocation>
                                     <pattern>org</pattern>
-                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.org</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
                                 </relocation>
                                 <relocation>
                                     <pattern>okio</pattern>
-                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.okio</shadedPattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
                                 </relocation>
                             </relocations>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                             </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
+            -->
         </plugins>
     </build>
 </project>u}(j;[  (324ace16dd5f46e4601bb0d160b54ee26c8a9b59j[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X	  @@ -1,23 +1,33 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
-import io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
-import io.opentelemetry.sdk.metrics.export.MetricExporter;
-import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 
 import java.time.Duration;
+import java.util.Map;
 
 public class OpenTelemetryExporter {
 
     public void start(PrometheusRegistry registry) {
-        PrometheusResourceAttributes resourceAttributes = new PrometheusResourceAttributes();
+        PrometheusInstrumentationScope instrumentationScope = new PrometheusInstrumentationScope();
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScope.getInstrumentationScopeInfo().getName());
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        Resource resource = resourceBuilder.build();
+        System.out.println("Found the following resource attributes: " + resource);
         MetricExporter exporter = OtlpHttpMetricExporter.builder()
                 .setEndpoint("http://localhost:4318/v1/metrics")
                 .build();
         PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
                 .setInterval(Duration.ofSeconds(5)) // TODO: this is only for debugging, way too busy for production.
                 .build();
-        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, resourceAttributes.getInstrumentationScopeInfo(), resourceAttributes.getResource());
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScope.getInstrumentationScopeInfo(), resource);
         reader.register(prometheusMetricProducer);
     }
 }u}(j;[  (044e1478b632da7308d1db321ae6a2eff9ae59e7j[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj[  renamedj[  Kj[  Kj[  K"j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,42 +1,29 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
-import io.opentelemetry.api.GlobalOpenTelemetry;
-import io.opentelemetry.api.OpenTelemetry;
-import io.opentelemetry.api.metrics.MeterProvider;
-import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
-import io.opentelemetry.sdk.metrics.SdkMeterProvider;
-import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
-import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 
-import java.lang.reflect.Field;
 import java.util.Properties;
 
-class PrometheusResourceAttributes {
+class PrometheusInstrumentationScope {
 
     private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
     private static final String instrumentationScopeNameKey = "instrumentationScope.name";
     private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
 
-    private final Resource resource;
     private final InstrumentationScopeInfo instrumentationScopeInfo;
 
-    public PrometheusResourceAttributes() {
+    public PrometheusInstrumentationScope() {
         this.instrumentationScopeInfo = loadInstrumentationScopeInfo();
-        this.resource = loadExistingResource(GlobalOpenTelemetry.get());
     }
 
     public InstrumentationScopeInfo getInstrumentationScopeInfo() {
         return instrumentationScopeInfo;
     }
 
-    public Resource getResource() {
-        return resource;
-    }
-
     private static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
         try {
             Properties properties = new Properties();
-            properties.load(PrometheusResourceAttributes.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
             String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
             if (instrumentationScopeName == null) {
                 throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
@@ -52,17 +39,4 @@ private static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
             throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
         }
     }
-
-    private static Resource loadExistingResource(OpenTelemetry openTelemetry) {
-        try {
-            MeterProvider meterProvider = openTelemetry.getMeterProvider();
-            if (meterProvider instanceof SdkMeterProvider) {
-                Field sharedStateField = SdkMeterProvider.class.getDeclaredField("sharedState");
-                sharedStateField.setAccessible(true);
-                MeterProviderSharedState sharedState = (MeterProviderSharedState) sharedStateField.get(meterProvider);
-                return sharedState.getResource();
-            }
-        } catch (Exception ignored) {}
-        return Resource.empty();
-    }
 }previous_filenameprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusResourceAttributes.javau}(j;[  (5efb87bb790a1afe87758f64120082dc587f771fj[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X~  @@ -1,9 +1,9 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
-import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
-import io.opentelemetry.sdk.metrics.data.MetricData;
-import io.opentelemetry.sdk.metrics.internal.export.MetricProducer;
-import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
 import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j;[  (c824c90e46baa3a563e5db9d607675ad27a4f11fj[  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj[  addedj[  Kkj[  K j[  Kkj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -0,0 +1,107 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.HashMap;
+import java.util.Map;
+
+import static java.nio.file.Files.*;
+
+public class ResourceAttributes {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static Map<String, String> get(String instrumentationScopeName) {
+        Map<String, String> result;
+        try {
+            result = getAttributesFromOtelAgent(instrumentationScopeName);
+            if (result != null) {
+                return result;
+            }
+        } catch (Exception ignored) {
+        }
+        Map<String, String> defaultAttributes = new HashMap<>();
+        defaultAttributes.put("key", "value");
+        return defaultAttributes;
+    }
+
+    private static Map<String, String> getAttributesFromOtelAgent(String instrumentationScopeName) throws Exception {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                URLClassLoader classLoader = new URLClassLoader(otelJars);
+                Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                    // GlobalOpenTelemetry is injected by the OTel Java aqent
+                    Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                    Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                    Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                    Object sharedState = getField("sharedState", sdkMeterProvider);
+                    Object resource = callMethod("getResource", sharedState);
+                    Object attributes = callMethod("getAttributes", resource);
+                    Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                    Map<String, String> result = new HashMap<>();
+                    for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                        if (entry.getKey() != null && entry.getValue() != null) {
+                            result.put(entry.getKey().toString(), entry.getValue().toString());
+                        }
+                    }
+                    return result;
+                } else {
+                    System.out.println("No OTel Java agent attached."); // temporary, will be removedq
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+            ignored.printStackTrace();
+        }
+        return null;
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(j;[  (56620dc848660697f8106453eeb5cceba68881c0j[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X,  @@ -1,8 +1,8 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.opentelemetry.api.common.Attributes;
-import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
-import io.opentelemetry.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
 
 import java.util.List;
 u}(j;[  (4bd8e6d3d052427975e0080866d276fe563f4d3fj[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  Xk  @@ -1,8 +1,8 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
-import io.opentelemetry.sdk.metrics.data.MetricData;
-import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 
 public class MetricDataFactory {u}(j;[  (583a42f43358b949850577228b7aeb50c6c1fe4bj[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,9 +1,9 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
-import io.opentelemetry.sdk.metrics.data.DoublePointData;
-import io.opentelemetry.sdk.metrics.data.MetricDataType;
-import io.opentelemetry.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 
 import java.util.Collection;u}(j;[  (eb270b4098c544ec32ea53c348849a0e9957b131j[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj[  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X$  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.opentelemetry.api.common.Attributes;
-import io.opentelemetry.api.common.AttributesBuilder;
-import io.opentelemetry.sdk.metrics.data.Data;
-import io.opentelemetry.sdk.metrics.data.DoubleExemplarData;
-import io.opentelemetry.sdk.metrics.data.MetricDataType;
-import io.opentelemetry.sdk.metrics.data.PointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
 u}(j;[  (094cc067f16427accf86fb13f4be032b45b1a4bdj[  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javao      j[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
-import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
-import io.opentelemetry.sdk.metrics.data.DoublePointData;
-import io.opentelemetry.sdk.metrics.data.MetricData;
-import io.opentelemetry.sdk.metrics.data.MetricDataType;
-import io.opentelemetry.sdk.metrics.data.SumData;
-import io.opentelemetry.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;u}(j;[  (f5d86ba1f71fd7393035dff48f730aca3caea09ej[  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj[  renamedj[  K j[  K j[  K j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=61548310ecf100254dea23427e0eb911e8148a17j[  \prometheus-metrics-exporter-opentelemetry/src/main/resources/instrumentationScope.propertiesu}(j;[  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j[  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej[  addedj[  Kj[  K j[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=61548310ecf100254dea23427e0eb911e8148a17j[  @@ -0,0 +1 @@
+*.jaru}(j;[  (24a9f8dffef1509961ecdc2e2deee91f7072c264j[  :prometheus-metrics-exposition-formats/generate-protobuf.shj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=61548310ecf100254dea23427e0eb911e8148a17j[  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j;[  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j[  -prometheus-metrics-exposition-formats/pom.xmlj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(j;[  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j[  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj[  modifiedj[  Mj[  Mzj[  Mj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj[  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=61548310ecf100254dea23427e0eb911e8148a17u}(j;[  (eea5f929a0b4ea14792d7806f6306662879017f8j[  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j;[  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j[  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j;[  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j[  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj[  modifiedj[  K	j[  K j[  K	j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(j;[  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j[  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj[  modifiedj[  Kj[  Kj[  Kj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(j;[  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj[  .prometheus-metrics-shaded-dependencies/pom.xmlj[  addedj[  K(j[  K j[  K(j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(j;[  (54a1cbdbe81fc3a5dc4ca3c2cde99e53be2436c4j[  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj[  addedj[  K~j[  K j[  K~j[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  Xt  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven//org.jctools/**</exclude>
+                                        <exclude>META-INF/maven//org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/services/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j;[  (7b0019461389b754822ed106979b1e5c461f8032j[  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj[  addedj[  K	j[  K j[  K	j[  X   https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj[  X  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj[  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(j;[  (24c22c2346480a29c6459d4fae36987830fca6cfj[  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj[  addedj[  KYj[  K j[  KYj[  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj[  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj[  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=61548310ecf100254dea23427e0eb911e8148a17j[  X+  @@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j;[  (3f63392a763257f697e79251d10d442a341fa7eaj[  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj[  addedj[  K	j[  K j[  K	j[  X  https://github.com/prometheus/client_java/blob/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj[  X  https://github.com/prometheus/client_java/raw/61548310ecf100254dea23427e0eb911e8148a17/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj[  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=61548310ecf100254dea23427e0eb911e8148a17j[  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}ueu(0a66b758b088ea9b8cc7cfd731ee6a36733f4924}(sha(0a66b758b088ea9b8cc7cfd731ee6a36733f4924node_idEC_kwDOAHoJt9oAKDBhNjZiNzU4YjA4OGVhOWI4Y2M3Y2ZkNzMxZWU2YTM2NzMzZjQ5MjQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T15:12:02Zu	committer}(j\  Fabian Stäberj\  fabian@fstab.dej\  2023-07-27T15:12:02Zumessage=[maven-release-plugin] prepare for next development iterationtree}(j\  (d24e3f4e8b93de22941610c85f8b076fa61578a2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d24e3f4e8b93de22941610c85f8b076fa61578a2uj\  hhttps://api.github.com/repos/prometheus/client_java/git/commits/0a66b758b088ea9b8cc7cfd731ee6a36733f4924
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj\  dhttps://api.github.com/repos/prometheus/client_java/commits/0a66b758b088ea9b8cc7cfd731ee6a36733f4924html_urlYhttps://github.com/prometheus/client_java/commit/0a66b758b088ea9b8cc7cfd731ee6a36733f4924comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/commentsj\  }(loginfstabidJ' j\  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j\  "https://api.github.com/users/fstabj\  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj\  }(j\  fstabj\  J' j\  MDQ6VXNlcjMzMDUzNQ==j\  2https://avatars.githubusercontent.com/u/330535?v=4j\  h3j\  "https://api.github.com/users/fstabj\  https://github.com/fstabj\  ,https://api.github.com/users/fstab/followersj\  9https://api.github.com/users/fstab/following{/other_user}j\  2https://api.github.com/users/fstab/gists{/gist_id}j\  9https://api.github.com/users/fstab/starred{/owner}{/repo}j\  0https://api.github.com/users/fstab/subscriptionsj\  'https://api.github.com/users/fstab/orgsj\  (https://api.github.com/users/fstab/reposj\  3https://api.github.com/users/fstab/events{/privacy}j\  2https://api.github.com/users/fstab/received_eventsj\  Userj\  uparents]}(j\  (e43f92a3c6895c1b2cf44aedcef881126689db85j\  dhttps://api.github.com/repos/prometheus/client_java/commits/e43f92a3c6895c1b2cf44aedcef881126689db85j\  Yhttps://github.com/prometheus/client_java/commit/e43f92a3c6895c1b2cf44aedcef881126689db85uastats}(totalKh	additionsK4	deletionsK4ufiles](}(j\  (71f4f67e4ddbb546134ecdfbfbbc69fbe10994bdfilenamebenchmarks/pom.xmlstatusmodifiedj]  Kj]  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j\  (04082ab7c83fa8aa488e16aebcaa9a2454ea8a64j]  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(j\  (b08140a35ce9dcb27d8ef84b09482dc481bb1d5bj]  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(j\  (0441d046796647048f5812a30a4b58ff0e81d09bj]  0examples/example-exemplars-tail-sampling/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(j\  (724968f00d0721364e4c58874329ed20dcc93e57j]  'examples/example-tomcat-servlet/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-tomcat-servlet%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fexample-tomcat-servlet%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-tomcat-servlet</artifactId>u}(j\  (77c0acfb930559f75776c64bc3c9bcd14edf498cj]  examples/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  jhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fpom.xmlj]  ihttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/examples%2Fpom.xmlj]  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j\  (b837d25398033d64672590926feb957bedd0d7ecj]  #integration_tests/it_common/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_common%2Fpom.xmlj]  ~https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_common%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j\  (d4e59503c9d1b1bd122becb638a0d4f172c4edd2j]  1integration_tests/it_exemplars_otel_agent/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j\  (1bb9cf17a971e8fadfd8c03d4dbb059c95715204j]  /integration_tests/it_exemplars_otel_sdk/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j\  (315fe7aa64f5673426b082aa0f0a1a3de0b730c9j]  *integration_tests/it_java_versions/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_java_versions%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_java_versions%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j\  (924ab8d79650ad6de493997d7458b2f74cba1c70j]  #integration_tests/it_log4j2/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_log4j2%2Fpom.xmlj]  ~https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_log4j2%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j\  (9fc32206741284f4a5b050f5939a86d35b919881j]  (integration_tests/it_pushgateway/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_pushgateway%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_pushgateway%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j\  (8520458cf07dc6cc0361cfe0ccb1698abf06d181j]  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j\  (58ce74c9f07746c50d6a75e37f4d5d57445cce8dj]  integration_tests/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  shttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fpom.xmlj]  rhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/integration_tests%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j\  (31e76c0ce6f38b17d2213f8597f97b261597e2eaj]  pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  _https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/pom.xmlj]  ^https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/pom.xmlj]  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>v1.0.0-alpha-2</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(j\  (2d4b142f8743e519c3acc483ee7921f73f44fe1cj]  !prometheus-metrics-config/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  {https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-config%2Fpom.xmlj]  zhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-config%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j\  (019c8e62a220c7bae34f4007a1f207349519f7a9j]  prometheus-metrics-core/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  yhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-core%2Fpom.xmlj]  xhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-core%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j\  (3a3e82890b50bfa6f6ef403a8f421cd24b07c16dj]  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j\  (7b50b05eeece1d4b4453a587bb66648b42382481j]  -prometheus-metrics-exposition-formats/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-exposition-formats%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-exposition-formats%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j\  (d427bf8ffb9f9cba0bb14892858f9bea22813fcej]   prometheus-metrics-model/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  zhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-model%2Fpom.xmlj]  yhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-model%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j\  (6cbda22902a9726e69d8609be72f74c5dcac7027j]  !prometheus-metrics-tracer/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  {https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fpom.xmlj]  zhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j\  (571d73ba34d746d8535ddfb42cf3f7c55c2868f0j]  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j\  (bea2bd0d2cdefa8d1b26bcf1be3930679a280e10j]  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j\  (c285dc3404ca3176f7a3d66f556ce80b20b5f8fbj]  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j\  (6d60235c724f2cdfd2da93aa3c6d70a787e14f54j]  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j\  (d4d55bbc97a2d0678e28079a0e37417fba429396j]  simpleclient/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  nhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient%2Fpom.xmlj]  mhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j\  (f43a7943d35f966dfc1092e0372ee8b3e8508dd3j]  simpleclient_bom/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  rhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_bom%2Fpom.xmlj]  qhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_bom%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j\  (df6d786b526633004a9c4d1e5b0110287a437d3fj]  simpleclient_caffeine/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  whttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_caffeine%2Fpom.xmlj]  vhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_caffeine%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j\  (213785cb6a70ef7b2fc2d564067229e1f0cfdb1fj]  simpleclient_common/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  uhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_common%2Fpom.xmlj]  thttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_common%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j\  (eb95bc7b6652b58c299f1db0931cea98a39d14dfj]  simpleclient_dropwizard/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  yhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_dropwizard%2Fpom.xmlj]  xhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_dropwizard%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j\  (70c20acf1bbaa2acb76bd01aeab6af52453bc23ej]  $simpleclient_graphite_bridge/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  ~https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_graphite_bridge%2Fpom.xmlj]  }https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_graphite_bridge%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j\  (91d48540373931ac6d03f05207a50694737d07c5j]  simpleclient_guava/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  thttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_guava%2Fpom.xmlj]  shttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_guava%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j\  (2b39eda2608893af3c426a34cd09a0b8f07a3a9aj]  simpleclient_hibernate/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  xhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_hibernate%2Fpom.xmlj]  whttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_hibernate%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j\  (b078a86ae6e18c00682ef804a39f710cc3e63525j]  simpleclient_hotspot/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  vhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_hotspot%2Fpom.xmlj]  uhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_hotspot%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j\  (112b99bccca3a96c3e10159e0738f011f1fe88d8j]  simpleclient_httpserver/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  yhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_httpserver%2Fpom.xmlj]  xhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_httpserver%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j\  (a2380c4c4993e1173924ff7d5d3ee6d0752051a9j]  simpleclient_jetty/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  thttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_jetty%2Fpom.xmlj]  shttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_jetty%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j\  (7e2b1400b37704650bb157041709041bd499889fj]  simpleclient_jetty_jdk8/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  yhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_jetty_jdk8%2Fpom.xmlj]  xhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_jetty_jdk8%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j\  (a51fd5c38f863318a8a757e2d8c1031bc0c7cfd2j]  simpleclient_log4j/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  thttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_log4j%2Fpom.xmlj]  shttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_log4j%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j\  (4fd9630f8085568c082f288ec9dc50a73fa40a96j]  simpleclient_log4j2/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  uhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_log4j2%2Fpom.xmlj]  thttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_log4j2%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u#	     }(j\  (7ffb3d797f7036d8b7507a9c2c3b9f36110440fbj]  simpleclient_logback/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  vhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_logback%2Fpom.xmlj]  uhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_logback%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j\  (dfe24b0f66f3ee0ed427f25abb6859a50b20b0baj]   simpleclient_pushgateway/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  zhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_pushgateway%2Fpom.xmlj]  yhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_pushgateway%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j\  (2e0f5512442b50d19dae431465536f600706eef4j]  simpleclient_servlet/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  vhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet%2Fpom.xmlj]  uhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j\  (9f158dc3869812352dc393c4b241800f0e3ec2bfj]  #simpleclient_servlet_common/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  }https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet_common%2Fpom.xmlj]  |https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet_common%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j\  (6c1957a19c1a8892f10252742bde9cb6933ea0d1j]  $simpleclient_servlet_jakarta/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  ~https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet_jakarta%2Fpom.xmlj]  }https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_servlet_jakarta%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j\  (a08e967dc3fb07b9acefd4701a94040d2496385fj]  simpleclient_spring_web/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  yhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_spring_web%2Fpom.xmlj]  xhttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_spring_web%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j\  (0e8eff3535357650eba0ba5020b9dc105e1b68b5j]  simpleclient_tracer/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  uhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fpom.xmlj]  thttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j\  (1dff24da5c8f77c9c37b71ab9dc1db85e15caa0aj]  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j\  (be1b894e861ef70956934cc23043c9c82993bf74j]  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j\  (8574abbffd42750ad43f731997132ca3727c22c8j]  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj]  https://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-2</version>
+    <version>1.0.0-alpha-3-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j\  (0c7da690363956f890f9783edfb0389d6aabaa3ej]  simpleclient_vertx/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  thttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_vertx%2Fpom.xmlj]  shttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_vertx%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j\  (0bf3a105202d41d44a4cb1373040f79ece9fe989j]  simpleclient_vertx4/pom.xmlj	]  modifiedj]  Kj]  Kj]  Kj]  uhttps://github.com/prometheus/client_java/blob/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_vertx4%2Fpom.xmlj]  thttps://github.com/prometheus/client_java/raw/0a66b758b088ea9b8cc7cfd731ee6a36733f4924/simpleclient_vertx4%2Fpom.xmlj]  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=0a66b758b088ea9b8cc7cfd731ee6a36733f4924j]  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2</version>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(7a35c12ee30d8722cfeb524c115239bbbec2600b}(sha(7a35c12ee30d8722cfeb524c115239bbbec2600bnode_idEC_kwDOAHoJt9oAKDdhMzVjMTJlZTMwZDg3MjJjZmViNTI0YzExNTIzOWJiYmVjMjYwMGIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:16:09Zu	committer}(j^  Fabian Stäberj^  fabian@fstab.dej^  2023-07-17T10:16:09Zumessage5[maven-release-plugin] prepare release v1.0.0-alpha-1tree}(j^  (66fcae9564facf7003fd013b9754282e21e362f9urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/66fcae9564facf7003fd013b9754282e21e362f9uj^  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7a35c12ee30d8722cfeb524c115239bbbec2600b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj^  dhttps://api.github.com/repos/prometheus/client_java/commits/7a35c12ee30d8722cfeb524c115239bbbec2600bhtml_urlYhttps://github.com/prometheus/client_java/commit/7a35c12ee30d8722cfeb524c115239bbbec2600bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7a35c12ee30d8722cfeb524c115239bbbec2600b/commentsj^  }(loginfstabidJ' j^  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j^  "https://api.github.com/users/fstabj^  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj^  }(j^  fstabj^  J' j^  MDQ6VXNlcjMzMDUzNQ==j^  2https://avatars.githubusercontent.com/u/330535?v=4j^  h3j^  "https://api.github.com/users/fstabj^  https://github.com/fstabj^  ,https://api.github.com/users/fstab/followersj^  9https://api.github.com/users/fstab/following{/other_user}j^  2https://api.github.com/users/fstab/gists{/gist_id}j^  9https://api.github.com/users/fstab/starred{/owner}{/repo}j^  0https://api.github.com/users/fstab/subscriptionsj^  'https://api.github.com/users/fstab/orgsj^  (https://api.github.com/users/fstab/reposj^  3https://api.github.com/users/fstab/events{/privacy}j^  2https://api.github.com/users/fstab/received_eventsj^  Userj^  uparents]}(j^  (32028c51520e28cd03077ef94445716e1c22ec9ej^  dhttps://api.github.com/repos/prometheus/client_java/commits/32028c51520e28cd03077ef94445716e1c22ec9ej^  Yhttps://github.com/prometheus/client_java/commit/32028c51520e28cd03077ef94445716e1c22ec9euastats}(totalKv	additionsK8	deletionsK>ufiles](}(j^  (8c3fe0d433e43a8ee869b9d6fb490d727ce5d326filenamebenchmarks/pom.xmlstatusmodifiedj_  Kj_  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j^  (180db27c8beb75c55e1ad27357ea14636d103bb0j_  examples/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  jhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/examples%2Fpom.xmlj_  ihttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/examples%2Fpom.xmlj_  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j^  (00e9c7303620aa434cfd3c21a97bd264a524ded1j_  'examples/tomcat-servlet-example/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/examples%2Ftomcat-servlet-example%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/examples%2Ftomcat-servlet-example%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(j^  (467ae1dc0526f17004539e3e414a3fcc3371c330j_  #integration_tests/it_common/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_common%2Fpom.xmlj_  ~https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_common%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j^  (bdb7a36349a3a9403d9fd225a5dca6e47824aee6j_  1integration_tests/it_exemplars_otel_agent/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j^  (23a3b2458e6b097acbff64a00488ce81617534cdj_  /integration_tests/it_exemplars_otel_sdk/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j^  (101fb04b4f8ac90a3a2f97f6e9864af048df5355j_  *integration_tests/it_java_versions/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_java_versions%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_java_versions%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j^  (79019eb3ee8c365ee28eefc05bacdd964934afaej_  #integration_tests/it_log4j2/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_log4j2%2Fpom.xmlj_  ~https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_log4j2%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j^  (4c8190bf867a5b19065632c89ec2860939e5f34dj_  (integration_tests/it_pushgateway/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_pushgateway%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_pushgateway%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j^  (dce018335dd45dd2e31e72aafb5603069a50dc1ej_  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j^  (dd8a9666abb8d37acd349dbebc2c6d4fbd0fb020j_  integration_tests/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  shttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fpom.xmlj_  rhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/integration_tests%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j^  (fd0842a2b928f2aa37bb4866cd15588b958463b5j_  pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  _https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/pom.xmlj_  ^https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/pom.xmlj_  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>v1.0.0-alpha-1</tag>
     </scm>
 
     <developers>u}(j^  (5b6a16a1802f0ff8c90a433c6be69f7e17e11e5ej_  !prometheus-metrics-config/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  {https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-config%2Fpom.xmlj_  zhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-config%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j^  (0c64d204426a6070fe6136887d6fe93b25aab78fj_  prometheus-metrics-core/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  yhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-core%2Fpom.xmlj_  xhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-core%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j^  (e7829efad62c1cab88d5eb67b69b7a79a926100ej_  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j^  (364c081fac426c63a8cffb2c7420d78a776cce56j_  -prometheus-metrics-exposition-formats/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-exposition-formats%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-exposition-formats%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X!  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j^  (8815b15d2fe9752c0273af42507c118312a05f24j_   prometheus-metrics-model/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  zhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-model%2Fpom.xmlj_  yhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-model%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j^  (0c11768347ac58814bb550c48ad50bda939f6226j_  !prometheus-metrics-tracer/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  {https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fpom.xmlj_  zhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j^  (40e4e6dd6e4a4657e4169edeaaeb2a62387d1cb2j_  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j^  (9a4cfda2e19fb4e342b45c7972046cd09c2beb42j_  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j^  (d7163b2d9951a06d15f584c534d61b9e414cfcd6j_  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j^  (ad3900400eee996fab4b372362ea7ca7b8328b7cj_  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j^  (63730a23c4096a528db9bfb718318c1db6351828j_  protobuf-shaded/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  qhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/protobuf-shaded%2Fpom.xmlj_  phttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/protobuf-shaded%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(j^  (a94a98560359e7587c1ddb6ffd82f98f0d67c71cj_  simpleclient/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  nhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient%2Fpom.xmlj_  mhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j^  (47fff77bd4eb3648b69db213d755e3c3266700d0j_  simpleclient_bom/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  rhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_bom%2Fpom.xmlj_  qhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_bom%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j^  (c020a91e4b01cbef3ce7194dcb9fb13c31586f96j_  simpleclient_caffeine/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  whttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_caffeine%2Fpom.xmlj_  vhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_caffeine%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j^  (2dbe544515e9662086977112d331b98172460bacj_  simpleclient_common/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  uhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_common%2Fpom.xmlj_  thttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_common%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j^  (3be5f95827586539e282f2b6f8495d533ab6d06ej_  simpleclient_dropwizard/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  yhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_dropwizard%2Fpom.xmlj_  xhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_dropwizard%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j^  (30f5436f13d500c236fedcbdf5431305d41d7873j_  $simpleclient_graphite_bridge/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  ~https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_graphite_bridge%2Fpom.xmlj_  }https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_graphite_bridge%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j^  (53f8ebcdfd16fb461e5ca7965a09bc5d762ef675j_  simpleclient_guava/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  thttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_guava%2Fpom.xmlj_  shttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_guava%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j^  (acc2f9638a1917550ca157ca5b35cd5fcfd65d11j_  simpleclient_hibernate/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  xhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_hibernate%2Fpom.xmlj_  whttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_hibernate%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j^  (2c01371a30e9a325492521c0e30b7c53077846f1j_  simpleclient_hotspot/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  vhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_hotspot%2Fpom.xmlj_  uhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_hotspot%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j^  (a336c0995776a227a83ef953e10ee7929cf792aaj_  simpleclient_httpserver/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  yhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_httpserver%2Fpom.xmlj_  xhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_httpserver%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j^  (57563ce625f4d84f17241bde1627e87b5bed8ab0j_  simpleclient_jetty/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  thttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_jetty%2Fpom.xmlj_  shttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_jetty%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j^  (0b6d8b4ba0a540e74c02b80bcf5ddead0e432324j_  simpleclient_jetty_jdk8/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  yhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_jetty_jdk8%2Fpom.xmlj_  xhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_jetty_jdk8%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j^  (6f9b8f65572fb49fdde098f06c6706b8f9bc13ddj_  simpleclient_log4j/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  thttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_log4j%2Fpom.xmlj_  shttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_log4j%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j^  (ad85625aa843f97e3e2334b677ed99c01603e124j_  simpleclient_log4j2/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  uhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_log4j2%2Fpom.xmlj_  thttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_log4j2%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j^  (e78ef0b106a19912201ea06c1dda79450ee40748j_  simpleclient_logback/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  vhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_logback%2Fpom.xmlj_  uhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_logback%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j^  (df6f86248d8896d3874bfb07da087826df9a0e77j_   simpleclient_pushgateway/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  zhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_pushgateway%2Fpom.xmlj_  yhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_pushgateway%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j^  (ddedfc18de610e39a9a3ce45467f1a057870e8f4j_  simpleclient_servlet/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  vhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet%2Fpom.xmlj_  uhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j^  (5e71a629d32a125ecff3ebd46f5747afe8c6c5d2j_  #simpleclient_servlet_common/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  }https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet_common%2Fpom.xmlj_  |https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet_common%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j^  (94b821104c33682d5229f397324f0bab21dd0d24j_  $simpleclient_servlet_jakarta/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  ~https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet_jakarta%2Fpom.xmlj_  }https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_servlet_jakarta%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j^  (4ccbcee9a02a44b8a8d6de45a4e7644e79b4ba3fj_  simpleclient_spring_web/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  yhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_spring_web%2Fpom.xmlj_  xhttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_spring_web%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j^  (8efaae5108c151dfd1dcbd3c3bb5961d76dec4f6j_  simpleclient_tracer/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  uhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fpom.xmlj_  thttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j^  (fcdd572fcdafd05a57480a754b16b0727e6dd784j_  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j^  (56be6b1a244a2b4d1e6e60a07efe5fceacd5a829j_  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j^  (19c8edc4d016d831fc80dd3f46b0dcab30dab25dj_  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  https://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj_  https://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j^  (cf0649de1aad505b197841d2a8c782fe136fcf59j_  simpleclient_vertx/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  thttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_vertx%2Fpom.xmlj_  shttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_vertx%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j^  (155425d2fcf0dfd7c630c5ba17e0b1ef020b1d28j_  simpleclient_vertx4/pom.xmlj_  modifiedj_  Kj_  Kj_  Kj_  uhttps://github.com/prometheus/client_java/blob/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_vertx4%2Fpom.xmlj_  thttps://github.com/prometheus/client_java/raw/7a35c12ee30d8722cfeb524c115239bbbec2600b/simpleclient_vertx4%2Fpom.xmlj_  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=7a35c12ee30d8722cfeb524c115239bbbec2600bj_  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(3825c64d1fa15490ba14176a244b8cd0f62b9c42}(sha(3825c64d1fa15490ba14176a244b8cd0f62b9c42node_idEC_kwDOAHoJt9oAKDM4MjVjNjRkMWZhMTU0OTBiYTE0MTc2YTI0NGI4Y2QwZjYyYjljNDIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-28T20:38:22Zu	committer}(j`  Fabian Stäberj`  fabian@fstab.dej`  2023-06-28T20:38:22Zumessage"long running native histogram testtree}(j`  (fe051c5aceeedaea38a39825f7370a08ec3765f4urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/fe051c5aceeedaea38a39825f7370a08ec3765f4uj`  hhttps://api.github.com/repos/prometheus/client_java/git/commits/3825c64d1fa15490ba14176a244b8cd0f62b9c42
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj`  dhttps://api.github.com/repos/prometheus/client_java/commits/3825c64d1fa15490ba14176a244b8cd0f62b9c42html_urlYhttps://github.com/prometheus/client_java/commit/3825c64d1fa15490ba14176a244b8cd0f62b9c42comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/3825c64d1fa15490ba14176a244b8cd0f62b9c42/commentsj`  }(loginfstabidJ' j`  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j`  "https://api.github.com/users/fstabj`  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj`  }(j`  fstabj`  J' j`  MDQ6VXNlcjMzMDUzNQ==j`  2https://avatars.githubusercontent.com/u/330535?v=4j`  h3j`  "https://api.github.com/users/fstabj`  https://github.com/fstabj`  ,https://api.github.com/users/fstab/followersj`  9https://api.github.com/users/fstab/following{/other_user}j`  2https://api.github.com/users/fstab/gists{/gist_id}j`  9https://api.github.com/users/fstab/starred{/owner}{/repo}j`  0https://api.github.com/users/fstab/subscriptionsj`  'https://api.github.com/users/fstab/orgsj`  (https://api.github.com/users/fstab/reposj`  3https://api.github.com/users/fstab/events{/privacy}j`  2https://api.github.com/users/fstab/received_eventsj`  Userj`  uparents]}(j`  (1f4d136113d71069c53c811b928dc1a09865b44aj`  dhttps://api.github.com/repos/prometheus/client_java/commits/1f4d136113d71069c53c811b928dc1a09865b44aj`  Yhttps://github.com/prometheus/client_java/commit/1f4d136113d71069c53c811b928dc1a09865b44auastats}(totalKn	additionsKm	deletionsKufiles](}(j`  (4de25d84de1305d3d58af8452161c3b518a39b49filenametmp_example/pom.xmlstatusmodifiedj`  Kj`  KchangesKblob_urlmhttps://github.com/prometheus/client_java/blob/3825c64d1fa15490ba14176a244b8cd0f62b9c42/tmp_example%2Fpom.xmlraw_urllhttps://github.com/prometheus/client_java/raw/3825c64d1fa15490ba14176a244b8cd0f62b9c42/tmp_example%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=3825c64d1fa15490ba14176a244b8cd0f62b9c42patchX  @@ -92,7 +92,8 @@
                         <configuration>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>com.example.ManualNativeHistogramBenchmark</mainClass>
+                                    <!-- <mainClass>com.example.ManualNativeHistogramBenchmark</mainClass> -->
+                                    <mainClass>com.example.LongRunningNativeHistogramLoadTest</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>u}(j`  (d1b1fac119574a7fae349f8cbac5148bcb32f2e0ja  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javaja  addedj`  Kkj`  K ja  Kkja  https://github.com/prometheus/client_java/blob/3825c64d1fa15490ba14176a244b8cd0f62b9c42/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javaja  https://github.com/prometheus/client_java/raw/3825c64d1fa15490ba14176a244b8cd0f62b9c42/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javaj
a  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=3825c64d1fa15490ba14176a244b8cd0f62b9c42ja  X  @@ -0,0 +1,107 @@
+package com.example;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class LongRunningNativeHistogramLoadTest {
+
+    private final int N_THREADS = 8;
+    private final double[][] randoms = new double[N_THREADS][10 * 1024 * 1024];
+    private Histogram prometheusHistogram;
+
+    public static void main(String[] args) throws InterruptedException {
+        new LongRunningNativeHistogramLoadTest().run();
+    }
+
+    public void run() throws InterruptedException {
+        initRandomNumbers();
+        initPrometheusHistogram();
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(prometheusHistogram);
+        ExecutorService producers = Executors.newFixedThreadPool(N_THREADS);
+        ScheduledExecutorService scraper = Executors.newSingleThreadScheduledExecutor();
+
+        PrometheusProtobufWriter protoWriter = new PrometheusProtobufWriter();
+        OpenMetricsTextFormatWriter textWriter = new OpenMetricsTextFormatWriter(false);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        scraper.scheduleAtFixedRate(() -> {
+            try {
+                long start = System.nanoTime();
+                MetricSnapshots snapshots = registry.scrape();
+                Metrics.MetricFamily protobufData = protoWriter.convert(snapshots.get(0));
+                System.out.println("# ---------------------------------");
+                System.out.println("# " + dateFormat.format(Calendar.getInstance().getTime()));
+                System.out.println("# ---------------------------------");
+                textWriter.write(System.out, snapshots);
+                System.out.println(TextFormat.printer().shortDebugString(protobufData));
+                HistogramSnapshot.HistogramData data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
+                System.out.println("Schema: " + data.getNativeSchema());
+                System.out.println("Number of buckets: " + data.getNativeBucketsForPositiveValues().size());
+                long duration = System.nanoTime() - start;
+                System.out.println("[" + Thread.currentThread().getName() + "] scraping took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+                System.out.println();
+            } catch (Exception e) {
+                e.printStackTrace();
+                System.exit(-2);
+            }
+        }, 1, 2, TimeUnit.MINUTES);
+
+        // warmup
+        CountDownLatch cdl = new CountDownLatch(N_THREADS);
+        for (int thread = 0; thread < N_THREADS; thread++) {
+            producers.submit(cdl::countDown);
+        }
+        cdl.await();
+
+        for (int thread = 0; thread < N_THREADS; thread++) {
+            int finalThread = thread;
+            producers.submit(() -> {
+                double[] random = randoms[finalThread];
+                while (true) {
+                    long start = System.nanoTime();
+                    for (int i = 0; i < random.length; i++) {
+                        prometheusHistogram.observe(i);
+                    }
+                    long duration = System.nanoTime() - start;
+                    System.out.println("[" + Thread.currentThread().getName() + "] observing took " + String.format("%.6f", ((double) duration) / (double) TimeUnit.SECONDS.toNanos(1)) + " s");
+                }
+            });
+        }
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder()
+                .withName("test")
+                .withNativeResetDuration(60, TimeUnit.MINUTES)
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < N_THREADS; i++) {
+            for (int j = 0; j < randoms[i].length; j++) {
+                double observation = 0;
+                while (observation < 0.13 || observation > 2.4) { // simulate observations around 180ms
+                    observation = rand.nextGaussian() + 0.18;
+                }
+                randoms[i][j] = observation;
+            }
+        }
+        System.out.println("random init done");
+    }
+}ueuj     (899fe45b0c0b1435c012df04ac531ad943100d57}(sha(899fe45b0c0b1435c012df04ac531ad943100d57node_idEC_kwDOAHoJt9oAKDg5OWZlNDViMGMwYjE0MzVjMDEyZGYwNGFjNTMxYWQ5NDMxMDBkNTccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:57:47Zu	committer}(j a  Fabian Stäberj"a  fabian@fstab.dej$a  2023-08-26T21:57:47ZumessageRename examplestree}(ja  (4c0f3c32d5328c0fca1e5ed411a16db0a4fb71b6urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/4c0f3c32d5328c0fca1e5ed411a16db0a4fb71b6uj0a  hhttps://api.github.com/repos/prometheus/client_java/git/commits/899fe45b0c0b1435c012df04ac531ad943100d57
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj0a  dhttps://api.github.com/repos/prometheus/client_java/commits/899fe45b0c0b1435c012df04ac531ad943100d57html_urlYhttps://github.com/prometheus/client_java/commit/899fe45b0c0b1435c012df04ac531ad943100d57comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/899fe45b0c0b1435c012df04ac531ad943100d57/commentsja  }(loginfstabidJ' ja  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j0a  "https://api.github.com/users/fstabj<a  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj&a  }(jAa  fstabjCa  J' ja  MDQ6VXNlcjMzMDUzNQ==jEa  2https://avatars.githubusercontent.com/u/330535?v=4jGa  h3j0a  "https://api.github.com/users/fstabj<a  https://github.com/fstabjJa  ,https://api.github.com/users/fstab/followersjLa  9https://api.github.com/users/fstab/following{/other_user}jNa  2https://api.github.com/users/fstab/gists{/gist_id}jPa  9https://api.github.com/users/fstab/starred{/owner}{/repo}jRa  0https://api.github.com/users/fstab/subscriptionsjTa  'https://api.github.com/users/fstab/orgsjVa  (https://api.github.com/users/fstab/reposjXa  3https://api.github.com/users/fstab/events{/privacy}jZa  2https://api.github.com/users/fstab/received_eventsj\a  Userj^a  uparents]}(ja  (00887ef68770bb6ffe4886a4efc0e8230e4767f4j0a  dhttps://api.github.com/repos/prometheus/client_java/commits/00887ef68770bb6ffe4886a4efc0e8230e4767f4j<a  Yhttps://github.com/prometheus/client_java/commit/00887ef68770bb6ffe4886a4efc0e8230e4767f4uastats}(totalK/	additionsK	deletionsKufiles](}(ja  (ed293444607ffb9985c6670a77cc6042b9f84eddfilename<examples/example-exemplars-tail-sampling/docker-compose.yamlstatusmodifiedjxa  Kjya  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlraw_urlhttps://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=899fe45b0c0b1435c012df04ac531ad943100d57patchXD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(ja  (81c6d573c5f3130cacfdc28c011a18a260bcd288j~a  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlja  modifiedjxa  Kjya  K ja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(ja  (e91ade6aceaf818d176460321559b0b310dcab3dj~a  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlja  modifiedjxa  Kjya  K ja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(ja  (8bdf213ec9a35830a610393c3496be82b3232d26j~a  .examples/example-exporter-httpserver/README.mdja  renamedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2FREADME.mdja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2FREADME.mdja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(ja  (a425c326850318d40de104ce142b72d365af6c29j~a  ,examples/example-exporter-httpserver/pom.xmlja  renamedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2Fpom.xmlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2Fpom.xmlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -58,7 +59,7 @@
                         <configuration>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
                                 </transformer>
                             </transformers>
                         </configuration>ja  #examples/example-httpserver/pom.xmlu}(ja  (0563d583a93f32d63b484dd0d677f75db81927caj~a  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaja  renamedjxa  K jya  K ja  K ja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(ja  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j~a  1examples/example-exporter-opentelemetry/README.mdja  modifiedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2FREADME.mdja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2FREADME.mdja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X  @@ -10,9 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-Assuming `./target/prometheus-opentelemetry-example-app.jar` is present, run the demo with:
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
 
 ```bash
+cd ./examples/example-exporter-opentelemetry/
 docker-compose up
 ```
 u}(ja  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j~a  ;examples/example-exporter-opentelemetry/docker-compose.yamlja  modifiedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X?  @@ -6,12 +6,12 @@ services:
     ports:
       - "5005:5005"
     volumes:
-      - ./target/prometheus-opentelemetry-example-app.jar:/prometheus-opentelemetry-example-app.jar
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
     command:
       - java
       - -jar
       #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
-      - /prometheus-opentelemetry-example-app.jar
+      - /example-exporter-opentelemetry.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(ja  (842faa1a34c19b3c29f56a5a83792306681906b6j~a  /examples/example-exporter-opentelemetry/pom.xmlja  modifiedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X  @@ -45,7 +45,7 @@
     </dependencies>
 
     <build>
-        <finalName>prometheus-opentelemetry-example-app</finalName>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(ja  (8d50c0c80603d5469a7144bac6387c8bff45e75bj~a  2examples/example-exporter-servlet-tomcat/README.mdja  renamedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.ja  )examples/example-tomcat-servlet/README.mdu}(ja  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j~a  0examples/example-exporter-servlet-tomcat/pom.xmlja  renamedjxa  Kjya  Kja  Kja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>ja  'examples/example-tomcat-servlet/pom.xmlu}(ja  (7a95e36da299e8ce780ea5f0d2f2751765754afcj~a  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaja  renamedjxa  K jya  K ja  K ja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(ja  (571e55a2b5d259f0401a881e9631fa0acce8e791j~a  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaja  renamedjxa  K jya  K ja  K ja  https://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaja  https://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaja  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(ja  (6535b05e1474660627803d1962e85282e910cf9dj~a  examples/pom.xmlja  modifiedjxa  Kjya  Kja  Kja  jhttps://github.com/prometheus/client_java/blob/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fpom.xmlja  ihttps://github.com/prometheus/client_java/raw/899fe45b0c0b1435c012df04ac531ad943100d57/examples%2Fpom.xmlja  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=899fe45b0c0b1435c012df04ac531ad943100d57ja  X  @@ -33,9 +33,9 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
         <module>example-exporter-opentelemetry</module>
     </modules>
 ueu(512fb4f2ad9674137c9258509de5fe29dc0085af}(sha(512fb4f2ad9674137c9258509de5fe29dc0085afnode_idEC_kwDOAHoJt9oAKDUxMmZiNGYyYWQ5Njc0MTM3YzkyNTg1MDlkZTVmZTI5ZGMwMDg1YWYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jb  Fabian Stäberjb  fabian@fstab.dejb  2023-08-06T17:45:16ZumessageAdd HTTPServer exportertree}(ja  (5ba537ed88f3c1fc4fc371df79c118c342909a92urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/5ba537ed88f3c1fc4fc371df79c118c342909a92ujb  hhttps://api.github.com/repos/prometheus/client_java/git/commits/512fb4f2ad9674137c9258509de5fe29dc0085af
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujb  dhttps://api.github.com/repos/prometheus/client_java/commits/512fb4f2ad9674137c9258509de5fe29dc0085afhtml_urlYhttps://github.com/prometheus/client_java/commit/512fb4f2ad9674137c9258509de5fe29dc0085afcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/512fb4f2ad9674137c9258509de5fe29dc0085af/commentsj b  }(loginfstabidJ' ja  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jb  "https://api.github.com/users/fstabjb  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujb  }(j#b  fstabj%b  J' ja  MDQ6VXNlcjMzMDUzNQ==j'b  2https://avatars.githubusercontent.com/u/330535?v=4j)b  h3jb  "https://api.github.com/users/fstabjb  https://github.com/fstabj,b  ,https://api.github.com/users/fstab/followersj.b  9https://api.github.com/users/fstab/following{/other_user}j0b  2https://api.github.com/users/fstab/gists{/gist_id}j2b  9https://api.github.com/users/fstab/starred{/owner}{/repo}j4b  0https://api.github.com/users/fstab/subscriptionsj6b  'https://api.github.com/users/fstab/orgsj8b  (https://api.github.com/users/fstab/reposj:b  3https://api.github.com/users/fstab/events{/privacy}j<b  2https://api.github.com/users/fstab/received_eventsj>b  Userj@b  uparents]}(ja  (644da5a0b6e121cf83b8654e86616c138caefabajb  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabajb  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalM		additionsM		deletionsK@ufiles](}(ja  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedjZb  K%j[b  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=512fb4f2ad9674137c9258509de5fe29dc0085afpatchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(ja  (fd1f204d1d1ed425f184838aea568a893c9ae334j`b  #examples/example-httpserver/pom.xmljbb  addedjZb  KFj[b  K jdb  KFjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2Fpom.xmljgb  ~https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(ja  (ca5b8ef247c64d730329be29c4a14995be834d89j`b  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javajbb  addedjZb  K!j[b  K jdb  K!jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajib  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X5  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .build();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(ja  (571e55a2b5d259f0401a881e9631fa0acce8e791j`b  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajbb  modifiedjZb  Kj[b  Kjdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajib  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(ja  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cj`b  examples/pom.xmljbb  modifiedjZb  Kj[b  K jdb  Kjeb  jhttps://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fpom.xmljgb  ihttps://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/examples%2Fpom.xmljib  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(ja  (aa81b08e8189c21bee10839e7605abd4b2c49b12j`b  #integration-tests/it-common/pom.xmljbb  addedjZb  K8j[b  K jdb  K8jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fpom.xmljgb  ~https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(ja  (d60e5397941da631e78c1289365208a3becd4641j`b  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javajbb  addedjZb  K$j[b  K jdb  K$jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javajib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(ja  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j`b  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javajbb  addedjZb  Kej[b  K jdb  Kejeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javajib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(ja  (4eafa72596ce3619761aa5c3681eeabb90322228j`b  Iintegration-tests/it-common/src/test/resources/project_version.propertiesjbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesjgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesjib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(ja  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj`b  -integration-tests/it-common/version-rules.xmljbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fversion-rules.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-common%2Fversion-rules.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(ja  (8767c971d0f813a8af5a6dee7d7276f15ae79be6j`b  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmljbb  addedjZb  KIj[b  K jdb  KIjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(ja  (6111b6c28ef5b8586d91365f50d7c6d1c4b08a7fj`b  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javajbb  addedjZb  Kbj[b  K jdb  Kbjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajib  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .build();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(ja  (a470df5c021d465c51388b5a740ba88a49d40858j`b  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmljbb  addedjZb  KSj[b  K jdb  KSjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(ja  (efa119c4e2292afc04d79a6f1b049bca20e923bej`b  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javajbb  addedjZb  Kqj[b  K jdb  Kqjeb  X  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajgb  X
  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajib  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(ja  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j`b  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmljbb  addedjZb  KNj[b  K jdb  KNjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(ja  (21956ae78f5aca3a25abb6b5bb32a80999930390j`b  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javajbb  addedjZb  Kqj[b  K jdb  Kqjeb  X  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajgb  X  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajib  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u9     }(ja  (8d7404585288239abecdd5265b2984d493cb0628j`b  6integration-tests/it-exporter/it-exporter-test/pom.xmljbb  addedjZb  KBj[b  K jdb  KBjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(ja  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj`b  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javajbb  addedjZb  MVj[b  K jdb  MVjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(ja  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j`b  %integration-tests/it-exporter/pom.xmljbb  addedjZb  K1j[b  K jdb  K1jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fit-exporter%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u}(ja  (cce89906f28eebfb57aa16a5ab222f52117f4794j`b  integration-tests/pom.xmljbb  addedjZb  K@j[b  K jdb  K@jeb  shttps://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fpom.xmljgb  rhttps://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/integration-tests%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(ja  (fc8359e560a3e05c90838b2ece08e0853d823358j`b  pom.xmljbb  modifiedjZb  Kj[b  K jdb  Kjeb  _https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/pom.xmljgb  ^https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/pom.xmljib  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(ja  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcj`b  *prometheus-metrics-exporter-common/pom.xmljbb  addedjZb  K5j[b  K jdb  K5jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(ja  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4j`b  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javajbb  addedjZb  K
j[b  K jdb  K
jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(ja  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj`b  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javajbb  addedjZb  KGj[b  K jdb  KGjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(ja  (4e3db6955fe7fbf010877f9faef50315ac489eedj`b  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javajbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(ja  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fj`b  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javajbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(ja  (318e865f55bdd893d762a5f4e759a502e8bbc983j`b  4prometheus-metrics-exporter-common/version-rules.xmljbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fversion-rules.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-common%2Fversion-rules.xmljib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(ja  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160j`b  .prometheus-metrics-exporter-httpserver/pom.xmljbb  addedjZb  K+j[b  K jdb  K+jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(ja  (e8a54e0cf687d16358a139f83d42f5960106395aj`b  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javajbb  addedjZb  KCj[b  K jdb  KCjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(ja  (c46cdd30a901490f29cc6889fbf157a5eecbd1b9j`b  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xx"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .build();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server.
+     * @deprecated renamed to close(), so that the HTTPServer can be used in try-with-resources.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build the HTTPServer
+         */
+        public HTTPServer build() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(ja  (03b647d99ed2bc1d67a3c66a11c33d900b53d501j`b  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javajbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(ja  (4f1b4f63a7e59feb619963afc5d901560bc83e08j`b  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javajbb  addedjZb  Kwj[b  K jdb  Kwjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}uA      }(ja  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bj`b  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javajbb  addedjZb  K-j[b  K jdb  K-jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(ja  (378ac6ddc334fbe20d07b3510cf6434894770c6bj`b  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javajbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(ja  (318e865f55bdd893d762a5f4e759a502e8bbc983j`b  8prometheus-metrics-exporter-httpserver/version-rules.xmljbb  addedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(ja  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79j`b  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljbb  modifiedjZb  Kj[b  Kjdb  K	jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(ja  (656d661ebddd423ba12fc58b1dbd136062e5a282j`b  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javajbb  addedjZb  K^j[b  K jdb  K^jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(ja  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ej`b  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javajbb  modifiedjZb  Kj[b  K4jdb  K8jeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajib  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(ja  (3db354c56f52afb4c46e0a080ef010b492c401d6j`b  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javajbb  modifiedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(ja  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfej`b  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajbb  modifiedjZb  Kj[b  Kjdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(ja  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72j`b  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajbb  modifiedjZb  Kj[b  Kjdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(ja  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfj`b  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajbb  modifiedjZb  Kj[b  K jdb  Kjeb  https://github.com/prometheus/client_java/blob/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajgb  https://github.com/prometheus/client_java/raw/512fb4f2ad9674137c9258509de5fe29dc0085af/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajib  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=512fb4f2ad9674137c9258509de5fe29dc0085afjkb  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(9f0755cfa5f07e66bf9677a661af9878da3dd12b}(sha(9f0755cfa5f07e66bf9677a661af9878da3dd12bnode_idEC_kwDOAHoJt9oAKDlmMDc1NWNmYTVmMDdlNjZiZjk2NzdhNjYxYWY5ODc4ZGEzZGQxMmIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-25T14:26:16Zu	committer}(jc  Fabian Stäberjc  fabian@fstab.dejc  2023-07-25T14:26:16Zumessage*Allow dots in metric names and label namestree}(jc  (7b07fc5f6cad32b3807f0aca38fc4609f22f6648urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/7b07fc5f6cad32b3807f0aca38fc4609f22f6648ujc  hhttps://api.github.com/repos/prometheus/client_java/git/commits/9f0755cfa5f07e66bf9677a661af9878da3dd12b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujc  dhttps://api.github.com/repos/prometheus/client_java/commits/9f0755cfa5f07e66bf9677a661af9878da3dd12bhtml_urlYhttps://github.com/prometheus/client_java/commit/9f0755cfa5f07e66bf9677a661af9878da3dd12bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/9f0755cfa5f07e66bf9677a661af9878da3dd12b/commentsjc  }(loginfstabidJ' jc  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jc  "https://api.github.com/users/fstabjc  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujc  }(jc  fstabjc  J' jc  MDQ6VXNlcjMzMDUzNQ==jc  2https://avatars.githubusercontent.com/u/330535?v=4jc  h3jc  "https://api.github.com/users/fstabjc  https://github.com/fstabjc  ,https://api.github.com/users/fstab/followersjc  9https://api.github.com/users/fstab/following{/other_user}jc  2https://api.github.com/users/fstab/gists{/gist_id}jc  9https://api.github.com/users/fstab/starred{/owner}{/repo}jc  0https://api.github.com/users/fstab/subscriptionsjc  'https://api.github.com/users/fstab/orgsjc  (https://api.github.com/users/fstab/reposjc  3https://api.github.com/users/fstab/events{/privacy}jc  2https://api.github.com/users/fstab/received_eventsjc  Userjc  uparents]}(jc  (cad4fcab806d4abd0ad1a7e9715e8983af58df01jc  dhttps://api.github.com/repos/prometheus/client_java/commits/cad4fcab806d4abd0ad1a7e9715e8983af58df01jc  Yhttps://github.com/prometheus/client_java/commit/cad4fcab806d4abd0ad1a7e9715e8983af58df01uastats}(totalMS	additionsMz	deletionsKufiles](}(jc  (95660a463e944851a5d6c7c83caa98e475ec2b84filename^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javastatusmodifiedjd  Kjd  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bpatchX  @@ -58,7 +58,7 @@ public MetricsProperties getDefaultMetricProperties() {
      * May return {@code null} if no metric-specific properties are configured for a metric name.
      */
     public MetricsProperties getMetricProperties(String metricName) {
-        return metricProperties.get(metricName);
+        return metricProperties.get(metricName.replace(".", "_"));
     }
 
     public ExemplarsProperties getExemplarProperties() {u}(jc  (58ddc2669a05f79f8a9d19dbfb3374280a720f28jd  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X;  @@ -51,7 +51,7 @@ private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Obj
         for (String propertyName : propertyNames) {
             Matcher matcher = pattern.matcher(propertyName);
             if (matcher.find()) {
-                String metricName = matcher.group(1);
+                String metricName = matcher.group(1).replace(".", "_");
                 if (!result.containsKey(metricName)) {
                     result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
                 }u}(jc  (c155f5704781a847f72ca53a711f453db2958f94jd  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.Arrays;
@@ -51,7 +52,7 @@ protected Builder(List<String> illegalLabelNames, PrometheusProperties propertie
         }
 
         public B withName(String name) {
-            if (!MetricMetadata.isValidMetricName(name)) {
+            if (!PrometheusNaming.isValidMetricName(name)) {
                 throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
             }
             this.name = name;
@@ -70,7 +71,7 @@ public B withHelp(String help) {
 
         public B withLabelNames(String... labelNames) {
             for (String labelName : labelNames) {
-                if (!Labels.isValidLabelName(labelName)) {
+                if (!PrometheusNaming.isValidLabelName(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name");
                 }
                 if (illegalLabelNames.contains(labelName)) {u}(jc  (d000b4902923d1a0084e2ba22ad5a08cb1042780jd  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -12,7 +12,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * StateSet metric. Example:u}(jc  (2af392097245eeec40fd622cb75b8403c561dab3jd  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X8	  @@ -1,23 +1,22 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-import io.prometheus.metrics.tracer.common.SpanContext;
-import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -1045,19 +1044,8 @@ public void testIllegalLabelNamePrefix() {
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void testIllegalLabelNameDot() {
-        // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid.
-        // The reason is that you cannot use illegal label names in the Prometheus query language.
-        Histogram.newBuilder()
-                .withName("test")
-                .withLabelNames("http.status");
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    @Ignore
     public void testIllegalName() {
-        Histogram.newBuilder()
-                .withName("server.durations");
+        Histogram.newBuilder().withName("my_namespace/server.durations");
     }
 
     @Test(expected = IllegalArgumentException.class)u}(jc  (902aad6894e7eed48aa416cd297e8230142f9bd3jd  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X.  @@ -29,7 +29,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
@@ -213,7 +213,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(prometheusName(data.getLabels().getName(j)));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");u}(jc  (a5e4a8b06cc41a4afe517d2036411200fdd80d5cjd  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  Xl  @@ -24,7 +24,7 @@
 import java.io.OutputStream;
 
 import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus protobuf format as defined in
@@ -336,7 +336,7 @@ private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot
     private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(prometheusName(labels.getName(i)))
                     .setValue(labels.getValue(i))
                     .build());
         }
@@ -345,7 +345,7 @@ private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
     private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(prometheusName(labels.getName(i)))
                     .setValue(labels.getValue(i))
                     .build());
         }u}(jc  (533af9eb88bf70c35ed76b66cb57809e69ab3687jd  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X/  @@ -26,7 +26,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
@@ -253,7 +253,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(prometheusName(data.getLabels().getName(j)));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");u}(jc  (99a46884fb32320eb3d41bc17bb133e38fb27560jd  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -6,6 +6,8 @@
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 public class TextFormatUtil {
 
     static void writeLong(OutputStreamWriter writer, long value) throws IOException {
@@ -61,7 +63,7 @@ static void writeLabels(OutputStreamWriter writer, Labels labels, String additio
             if (i > 0) {
                 writer.write(",");
             }
-            writer.write(labels.getName(i));
+            writer.write(prometheusName(labels.getName(i)));
             writer.write("=\"");
             writeEscapedLabelValue(writer, labels.getValue(i));
             writer.write("\"");u}(jc  (ed8714e738bd5e9e0f6f95fea711daee8c3da6d5jd  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -1,12 +1,11 @@
 package io.prometheus.metrics.model.registry;
 
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 
-import java.util.List;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * To be registered with the Prometheus collector registry.
  * See <i>Overall Structure</i> on
@@ -27,7 +26,7 @@ public interface Collector {
      */
     default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (includedNames.test(MetricMetadata.prometheusName(result.getMetadata().getName()))) {
+        if (includedNames.test(prometheusName(result.getMetadata().getName()))) {
             return result;
         } else {
             return null;u}(jc  (e6d526daea0ffc727cabc6c0027e368653df9f6ajd  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  XT  @@ -7,7 +7,7 @@
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Like {@link Collector}, but collecting multiple Snapshots at once.u}(jc  (851d721b77fffd07934d8906e55ff8e903027109jd  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X3  @@ -9,7 +9,7 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Predicate;
 
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 public class PrometheusRegistry {
 
@@ -21,8 +21,10 @@ public class PrometheusRegistry {
 
     public void register(Collector collector) {
         String name = collector.getName();
-        if (!prometheusNames.add(prometheusName(name))) {
-            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        if (name != null) {
+            if (!prometheusNames.add(prometheusName(name))) {
+                throw new IllegalStateException("Can't register " + prometheusName(name) + " because a metric with that name is already registered.");
+            }
         }
         collectors.add(collector);
     }
@@ -51,10 +53,19 @@ public void unregister(MultiCollector collector) {
     public MetricSnapshots scrape() {
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            result.addMetricSnapshot(collector.collect());
+            MetricSnapshot snapshot = collector.collect();
+            if (snapshot != null) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(prometheusName(snapshot.getMetadata().getName()) + ": duplicate metric name.");
+                }
+                result.addMetricSnapshot(snapshot);
+            }
         }
         for (MultiCollector collector : multiCollectors) {
             for (MetricSnapshot snapshot : collector.collect()) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(prometheusName(snapshot.getMetadata().getName()) + ": duplicate metric name.");
+                }
                 result.addMetricSnapshot(snapshot);
             }
         }u}(jc  (07456bbd72d5fa0e545a039b7d75547fab9da2d5jd  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javajd  modifiedjd  Kjd  Kj!d  K/j"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -5,16 +5,16 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.regex.Pattern;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.isValidLabelName;
+
 /**
  * Immutable set of name/value pairs, sorted by name.
  */
 public class Labels implements Comparable<Labels>, Iterable<Label> {
 
     public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
-    private static final Pattern LABEL_NAME_RE = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
 
     private final String[] names; // sorted
     private final String[] values;
@@ -35,9 +35,9 @@ public boolean isEmpty() {
      * or you can use the {@link Labels#newBuilder()}.
      *
      * @param keyValuePairs as in {@code {name1, value1, name2, value2}}. Length must be even.
-     *                      {@link #isValidLabelName(String)} must be true for each name.
-     *                      Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid
-     *                      label names. Label names must be unique (no duplicate label names).
+     *                      {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *                      Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *                      to valid label names. Label names must be unique (no duplicate label names).
      */
     public static Labels of(String... keyValuePairs) {
         if (keyValuePairs.length % 2 != 0) {
@@ -52,18 +52,19 @@ public static Labels of(String... keyValuePairs) {
             names[i] = keyValuePairs[2 * i];
             values[i] = keyValuePairs[2 * i + 1];
         }
-        return Labels.of(names, values);
+        sortAndValidate(names, values);
+        return new Labels(names, values);
     }
 
     /**
      * Create a new Labels instance.
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.size() must be equal to values.size().
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.size()} must be equal to {@code values.size()}.
      */
     public static Labels of(List<String> names, List<String> values) {
         if (names.size() != values.size()) {
@@ -83,10 +84,10 @@ public static Labels of(List<String> names, List<String> values) {
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.length must be equal to values.length.
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.length} must be equal to {@code values.length}.
      */
     public static Labels of(String[] names, String[] values) {
         if (names.length != values.length) {
@@ -123,14 +124,15 @@ private static void validateNames(String[] names) {
             if (!isValidLabelName(names[i])) {
                 throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
             }
+            // names are sorted, so duplicates are next to each other
             if (i > 0 && names[i - 1].equals(names[i])) {
                 throw new IllegalArgumentException(names[i] + ": duplicate label name");
             }
         }
     }
 
     private static void sort(String[] names, String[] values) {
-        // bubblesort :)
+        // bubblesort
         int n = names.length;
         for (int i = 0; i < n - 1; i++) {
             for (int j = 0; j < n - i - 1; j++) {
@@ -150,21 +152,6 @@ private static void swap(int i, int j, String[] names, String[] values) {
         values[i] = tmp;
     }
 
-    public static boolean isValidLabelName(String name) {
-        return LABEL_NAME_RE.matcher(name).matches() && !name.startsWith("__");
-    }
-
-    /**
-     * Convert arbitrary label names to valid Prometheus label names.
-     */
-    public static String sanitizeLabelName(String labelName) {
-        String result = MetricMetadata.sanitizeMetricName(labelName);
-        while (result.startsWith("__")) {
-            result = result.substring(1);
-        }
-        return result;
-    }
-
     @Override
     public Iterator<Label> iterator() {
         return asList().iterator();u}(jc  (23a5eaa6b091cb49b211bd2f53680406fad75dfajd  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javajd  modifiedjd  K	jd  K}j!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  Xc   @@ -1,36 +1,19 @@
 package io.prometheus.metrics.model.snapshots;
 
-import java.util.regex.Pattern;
-
 /**
  * Immutable container for metric metadata: name, help, unit.
  */
 public final class MetricMetadata {
-    // We allow dots in metric names. Dots will automatically be replaced with underscores in
-    // Prometheus exposition formats. However, if metrics from this library are exposed in OpenTelemetry
-    // format the dots are retained.
-    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
-    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
-    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
-    // * Micrometer: jvm_buffer_count
-    // * OpenTelemetry: process_runtime_jvm_buffer_count
-    // We do not treat _count and _sum as reserved suffixes here. On the downside there is a risk of name conflict
-    // if someone creates a gauge named "my_data_count" and a histogram or summary named "my_data", because
-    // the histogram or summary will implicitly have a time series named "my_data_count".
-    private static final String[] RESERVED_SUFFIXES = {
-            "_total", "_created", "_bucket", "_info",
-            ".total", ".created", ".bucket", ".info"
-    };
 
     /**
      * Name without suffix.
      * <p>
      * For example, the name for a counter "http_requests_total" is "http_requests".
-     * The name of an info called "target_info" is "target".
+     * The name of an info called "jvm_info" is "jvm".
      * <p>
      * We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
      * exposition formats. However, if metrics from this library are exposed in OpenTelemetry
-     * format the dots are retained.
+     * format dots are retained.
      * <p>
      * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
      */
@@ -53,28 +36,10 @@ public MetricMetadata(String name, String help) {
     }
 
     /**
-     * Naming conventions:
-     * <ul>
-     *     <li>The name MUST NOT include the {@code _total} suffix for counter metrics or the
-     *         {@code _info} suffix for info metrics.
-     *         If in doubt, use {@link #sanitizeMetricName(String)} to remove the suffix.</li>
-     *     <li>If name is {@code null}, a {@link NullPointerException} is thrown.</li>
-     *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
-     *         an {@link IllegalArgumentException} is thrown.
-     *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
-     *     <li>We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
-     *         exposition formats. However, if metrics from this library are exposed in OpenTelemetry
-     *         format the dots are retained.
-     *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
-     *         <pre>
-     *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
-     *         </pre>
-     *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
-     *     <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES} {@code _total}, {@code _created},
-     *         {@code _bucket}, or {@code _info}.
-     * </ul>
-     *
-     * @param name must follow the naming conventions described above.
+     * Constructor.
+     * @param name must not be {@code null}. {@link PrometheusNaming#isValidMetricName(String) isValidMetricName(name)}
+     *             must be {@code true}. Use {@link PrometheusNaming#sanitizeMetricName(String)} to convert arbitrary
+     *             strings into valid names.
      * @param help optional. May be {@code null}.
      * @param unit optional. May be {@code null}.
      */
@@ -112,91 +77,10 @@ private void validate() {
         if (name == null) {
             throw new IllegalArgumentException("Missing required field: name is null");
         }
-        String error = validateMetricName(name);
+        String error = PrometheusNaming.validateMetricName(name);
         if (error != null) {
-            throw new IllegalArgumentException("'" + name + "': Illegal metric name. " + error);
-        }
-    }
-
-    /**
-     * Test if a metric name is valid. Rules:
-     * <ul>
-     * <li>The name must match {@link #METRIC_NAME_RE}.</li>
-     * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
-     * </ul>
-     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
-     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but the {@code prometheus-metrics-model}
-     * does not enforce Unit suffixes).
-     * <p>
-     * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
-     * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
-     * values: {@code processing_time_seconds_total} for the counter value, and the optional
-     * {@code processing_time_seconds_created} timestamp.
-     * <p>
-     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
-     */
-    public static boolean isValidMetricName(String name) {
-        return validateMetricName(name) == null;
-    }
-
-    private static String validateMetricName(String name) {
-        for (String reservedSuffix : RESERVED_SUFFIXES) {
-            if (name.endsWith(reservedSuffix)) {
-                return "The metric name must not include the '" + reservedSuffix + "' suffix.";
-            }
-        }
-        if (!METRIC_NAME_RE.matcher(name).matches()) {
-            return "The metric name contains unsupported characters";
+            throw new IllegalArgumentException("'" + name + "': Illegal metric name. " + error
+                    + " Call " + PrometheusNaming.class.getSimpleName() + ".sanitizeMetricName(name) to avoid this error.");
         }
-        return null;
-    }
-
-    /**
-     * Convert arbitrary metric names to valid Prometheus metric names.
-     */
-    public static String sanitizeMetricName(String metricName) {
-        if (metricName.isEmpty()) {
-            throw new IllegalArgumentException("Cannot convert an empty string into a valid metric name.");
-        }
-        int length = metricName.length();
-        char[] sanitized = new char[length];
-        for (int i = 0; i < length; i++) {
-            char ch = metricName.charAt(i);
-            if (ch == ':' ||
-                    ch == '.' ||
-                    (ch >= 'a' && ch <= 'z') ||
-                    (ch >= 'A' && ch <= 'Z') ||
-                    (i > 0 && ch >= '0' && ch <= '9')) {
-                sanitized[i] = ch;
-            } else {
-                sanitized[i] = '_';
-            }
-        }
-        String sanitizedString = new String(sanitized);
-        boolean modified = true;
-        while (modified) {
-            modified = false;
-            for (String reservedSuffix : RESERVED_SUFFIXES) {
-                if (sanitizedString.equals(reservedSuffix)) {
-                    // This is for the corner case when you call sanitizeMetricName("_total").
-                    // In that case the result will be "total".
-                    return reservedSuffix.substring(1);
-                }
-                if (sanitizedString.endsWith(reservedSuffix)) {
-                    sanitizedString = sanitizedString.substring(0, sanitizedString.length() - reservedSuffix.length());
-                    modified = true;
-                }
-            }
-        }
-        return sanitizedString;
-    }
-
-    /**
-     * Get the metric name that is used in Prometheus exposition format.
-     * @param name must be a valid metric name, i.e. {@link #isValidMetricName(String) isValidMetricName(name)} must be true.
-     * @return the name with dots replaced by underscores.
-     */
-    public static String prometheusName(String name) {
-        return name.replace(".", "_");
     }
 }u}(jc  (a4931a95654d14833cac3ae54caa06296aadc7a9jd  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -20,10 +20,13 @@ protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
     }
 
     protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
-        this.metadata = metadata;
+        if (metadata == null) {
+            throw new NullPointerException("metadata");
+        }
         if (data == null) {
-            throw new NullPointerException();
+            throw new NullPointerException("data");
         }
+        this.metadata = metadata;
         List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
         dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);u}(jc  (9c4fc53fcae60257d0e744ad0f3b28fce7e80aabjd  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javaY      jd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X\  @@ -7,7 +7,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
-import static io.prometheus.metrics.model.snapshots.MetricMetadata.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 import static java.util.Collections.unmodifiableList;
 import static java.util.Comparator.comparing;
 u}(jc  (1823c1014085ecac815bd2c7162f26cca1988a95jd  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/PrometheusNaming.javajd  addedjd  Kjd  K j!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  XN  @@ -0,0 +1,176 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.regex.Pattern;
+
+/**
+ * Utility for Prometheus Metric and Label naming.
+ * <p>
+ * Note that this library allows dots in metric and label names. Dots will automatically be replaced with underscores
+ * in Prometheus exposition formats. However, if metrics are exposed in OpenTelemetry format the dots are retained.
+ */
+public class PrometheusNaming {
+
+    /**
+     * Legal characters for metric names, including dot.
+     */
+    private static final Pattern METRIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
+
+    /**
+     * Legal characters for label names, including dot.
+     */
+    private static final Pattern LABEL_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.][a-zA-Z0-9_.]*$");
+
+    /**
+     * According to OpenMetrics {@code _count} and {@code _sum} (and {@code _gcount}, {@code _gsum}) should also be
+     * reserved metric name suffixes. However, popular instrumentation libraries have Gauges with names
+     * ending in {@code _count}.
+     * Examples:
+     * <ul>
+     * <li>Micrometer: {@code jvm_buffer_count}</li>
+     * <li>OpenTelemetry: {@code process_runtime_jvm_buffer_count}</li>
+     * </ul>
+     * We do not treat {@code _count} and {@code _sum} as reserved suffixes here for compatibility with these libraries.
+     * However, there is a risk of name conflict if someone creates a gauge named {@code my_data_count} and a
+     * histogram or summary named {@code my_data}, because the histogram or summary will implicitly have a sample
+     * named {@code my_data_count}.
+     */
+    private static final String[] RESERVED_METRIC_NAME_SUFFIXES = {
+            "_total", "_created", "_bucket", "_info",
+            ".total", ".created", ".bucket", ".info"
+    };
+
+    /**
+     * Test if a metric name is valid. Rules:
+     * <ul>
+     * <li>The name must match {@link #METRIC_NAME_PATTERN}.</li>
+     * <li>The name MUST NOT end with one of the {@link #RESERVED_METRIC_NAME_SUFFIXES}.</li>
+     * </ul>
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
+     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but the {@code prometheus-metrics-model}
+     * does not enforce Unit suffixes).
+     * <p>
+     * Example: If you create a Counter for a processing time with Unit {@link Unit#SECONDS SECONDS},
+     * the name should be {@code processing_time_seconds}. When exposed in OpenMetrics Text format,
+     * this will be represented as two values: {@code processing_time_seconds_total} for the counter value,
+     * and the optional {@code processing_time_seconds_created} timestamp.
+     * <p>
+     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
+     */
+    public static boolean isValidMetricName(String name) {
+        return validateMetricName(name) == null;
+    }
+
+    /**
+     * Same as {@link #isValidMetricName(String)}, but produces an error message.
+     * <p>
+     * The name is valid if the error message is {@code null}.
+     */
+    static String validateMetricName(String name) {
+        for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+            if (name.endsWith(reservedSuffix)) {
+                return "The metric name must not include the '" + reservedSuffix + "' suffix.";
+            }
+        }
+        if (!METRIC_NAME_PATTERN.matcher(name).matches()) {
+            return "The metric name contains unsupported characters";
+        }
+        return null;
+    }
+
+    public static boolean isValidLabelName(String name) {
+        return LABEL_NAME_PATTERN.matcher(name).matches() && !prometheusName(name).startsWith("__");
+    }
+
+    /**
+     * Get the metric or label name that is used in Prometheus exposition format.
+     *
+     * @param name must be a valid metric or label name,
+     *             i.e. {@link #isValidMetricName(String) isValidMetricName(name)}
+     *             or {@link #isValidLabelName(String) isValidLabelName(name)}  must be true.
+     * @return the name with dots replaced by underscores.
+     */
+    public static String prometheusName(String name) {
+        return name.replace(".", "_");
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidMetricName(String) isValidMetricName(name)} is true.
+     */
+    public static String sanitizeMetricName(String metricName) {
+        if (metricName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid metric name.");
+        }
+        String sanitizedName = replaceIllegalCharsInMetricName(metricName);
+        boolean modified = true;
+        while (modified) {
+            modified = false;
+            for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+                if (sanitizedName.equals(reservedSuffix)) {
+                    // This is for the corner case when you call sanitizeMetricName("_total").
+                    // In that case the result will be "total".
+                    return reservedSuffix.substring(1);
+                }
+                if (sanitizedName.endsWith(reservedSuffix)) {
+                    sanitizedName = sanitizedName.substring(0, sanitizedName.length() - reservedSuffix.length());
+                    modified = true;
+                }
+            }
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidLabelName(String) isValidLabelName(name)} is true.
+     */
+    public static String sanitizeLabelName(String labelName) {
+        if (labelName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid label name.");
+        }
+        String sanitizedName = replaceIllegalCharsInLabelName(labelName);
+        while (prometheusName(sanitizedName).startsWith("__")) {
+            sanitizedName = sanitizedName.substring(1);
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Returns a string that matches {@link #METRIC_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInMetricName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == ':' ||
+                    ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+
+    /**
+     * Returns a string that matches {@link #LABEL_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInLabelName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+}u}(jc  (e924d7372f52d246ff02a649101afa2a029611ebjd  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/PrometheusRegistryTest.javajd  addedjd  KRjd  K j!d  KRj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X
  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PrometheusRegistryTest {
+
+    Collector noName = new Collector() {
+        @Override
+        public MetricSnapshot collect() {
+            return GaugeSnapshot.newBuilder()
+                    .withName("no_name_gauge")
+                    .build();
+        }
+
+        @Override
+        public String getName() {
+            return null;
+        }
+    };
+
+    Collector counterA1 = () -> CounterSnapshot.newBuilder()
+            .withName("counter_a")
+            .build();
+
+    Collector counterA2 = () -> CounterSnapshot.newBuilder()
+            .withName("counter.a")
+            .build();
+
+    Collector counterB = () -> CounterSnapshot.newBuilder()
+            .withName("counter_b")
+            .build();
+
+    Collector gaugeA = () -> GaugeSnapshot.newBuilder()
+            .withName("gauge_a")
+            .build();
+
+    @Test
+    public void registerNoName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        // If the collector does not have a name at registration time, there is no conflict during registration.
+        registry.register(noName);
+        registry.register(noName);
+        // However, at scrape time the collector has to provide a metric name, and then we'll get a duplicat name error.
+        try {
+            registry.scrape();
+        } catch (IllegalStateException e) {
+            Assert.assertTrue(e.getMessage().contains("duplicate") && e.getMessage().contains("no_name_gauge"));
+            return;
+        }
+        Assert.fail("Expected duplicate name exception");
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void registerDuplicateName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterA2);
+    }
+
+    @Test
+    public void registerOk() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterB);
+        registry.register(gaugeA);
+        MetricSnapshots snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+
+        registry.unregister(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(2, snapshots.size());
+
+        registry.register(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+    }
+}u}(jc  (091cc6d237c79b39ea006bb2faf59d79854267c0jd  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javajd  modifiedjd  Kjd  Kj!d  K	j"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -5,6 +5,7 @@
 import org.junit.Ignore;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
 import static org.junit.Assert.assertNotEquals;
 
 public class LabelsTest {
@@ -61,20 +62,14 @@ public void testCompareEquals() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalLabelName() {
-        Labels.of("http.status_code", "200");
+        Labels.of("my_service/status", "200");
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testReservedLabelName() {
         Labels.of("__name__", "requests_total");
     }
 
-    @Test
-    @Ignore
-    public void testSanitizeLabelName() {
-        Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
-    }
-
     @Test(expected = IllegalArgumentException.class)
     public void testDuplicateLabelName() {
         Labels.of("name1", "value1", "name2", "value2", "name1", "value3");u}(jc  (2765541cdeb9d97880f73cb62bbe78e40d8bf692jd  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javajd  modifiedjd  Kjd  Kj!d  Kj"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X
  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
 public class MetricMetadataTest {
 
     @Test(expected = IllegalArgumentException.class)
@@ -19,40 +19,39 @@ public void testNullName() {
     }
 
     @Test(expected = IllegalArgumentException.class)
-    @Ignore
     public void testIllegalName() {
-        new MetricMetadata("http.server.duration");
+        new MetricMetadata("my_namespace/http_server_duration"); // let's see when we decide to allow slashes :)
     }
 
     @Test
-    @Ignore
     public void testSanitizationIllegalCharacters() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
-        Assert.assertEquals("http_server_duration", metadata.getName());
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_namespace/http.server.duration"), "help string", Unit.SECONDS);
+        Assert.assertEquals("my_namespace_http.server.duration", metadata.getName());
+        Assert.assertEquals("my_namespace_http_server_duration", prometheusName(metadata.getName()));
         Assert.assertEquals("help string", metadata.getHelp());
         Assert.assertEquals("seconds", metadata.getUnit().toString());
     }
 
     @Test
     public void testSanitizationCounter() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("my_events_total"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_events_total"));
         Assert.assertEquals("my_events", metadata.getName());
     }
 
     @Test
     public void testSanitizationInfo() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("target_info"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("target_info"));
         Assert.assertEquals("target", metadata.getName());
     }
 
     @Test
     public void testSanitizationWeirdCornerCase() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("_total_created"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("_total_created"));
         Assert.assertEquals("total", metadata.getName());
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testSanitizeEmptyString() {
-        MetricMetadata.sanitizeMetricName("");
+        sanitizeMetricName("");
     }
 }u}(jc  (d9ba9339d77c244a3837b1c8b50806899b02ce38jd  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/PrometheusNamingTest.javajd  addedjd  K"jd  K j!d  K"j"d  https://github.com/prometheus/client_java/blob/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javaj$d  https://github.com/prometheus/client_java/raw/9f0755cfa5f07e66bf9677a661af9878da3dd12b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javaj&d  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.java?ref=9f0755cfa5f07e66bf9677a661af9878da3dd12bj(d  X  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
+public class PrometheusNamingTest {
+
+    @Test
+    public void testSanitizeMetricName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeMetricName("0abc.def")));
+        Assert.assertEquals("___ab_:c0", prometheusName(sanitizeMetricName("___ab.:c0")));
+        Assert.assertEquals("my_prefix_my_metric", sanitizeMetricName("my_prefix/my_metric"));
+        Assert.assertEquals("my_counter", prometheusName(sanitizeMetricName("my_counter_total")));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm_info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("a.b", sanitizeMetricName("a.b"));
+    }
+
+    @Test
+    public void testSanitizeLabelName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeLabelName("0abc.def")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("__abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("___abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_.abc")));
+        Assert.assertEquals("abc.def", sanitizeLabelName("abc.def"));
+        Assert.assertEquals("abc.def2", sanitizeLabelName("abc.def2"));
+    }
+}ueu(b94922fad2a31d4fa2b04cccdf1666b7e5c2731f}(sha(b94922fad2a31d4fa2b04cccdf1666b7e5c2731fnode_idEC_kwDOAHoJt9oAKGI5NDkyMmZhZDJhMzFkNGZhMmIwNGNjY2RmMTY2NmI3ZTVjMjczMWYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T21:35:26Zu	committer}(jd  Fabian Stäberjd  fabian@fstab.dejd  2023-08-29T21:35:26Zumessage[Exclude shaded dependencies from the build

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jd  (eaad5bfa18e125541203e49b4a644acc8af5f396urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/eaad5bfa18e125541203e49b4a644acc8af5f396ujd  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujd  dhttps://api.github.com/repos/prometheus/client_java/commits/b94922fad2a31d4fa2b04cccdf1666b7e5c2731fhtml_urlYhttps://github.com/prometheus/client_java/commit/b94922fad2a31d4fa2b04cccdf1666b7e5c2731fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/commentsjd  }(loginfstabidJ' jd  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jd  "https://api.github.com/users/fstabjd  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujd  }(jd  fstabjd  J' jd  MDQ6VXNlcjMzMDUzNQ==jd  2https://avatars.githubusercontent.com/u/330535?v=4jd  h3jd  "https://api.github.com/users/fstabjd  https://github.com/fstabjd  ,https://api.github.com/users/fstab/followersj e  9https://api.github.com/users/fstab/following{/other_user}je  2https://api.github.com/users/fstab/gists{/gist_id}je  9https://api.github.com/users/fstab/starred{/owner}{/repo}je  0https://api.github.com/users/fstab/subscriptionsje  'https://api.github.com/users/fstab/orgsj
e  (https://api.github.com/users/fstab/reposje  3https://api.github.com/users/fstab/events{/privacy}je  2https://api.github.com/users/fstab/received_eventsje  Userje  uparents]}(jd  (950cedb9c5d67de39347c96e92971cd424f3832bjd  dhttps://api.github.com/repos/prometheus/client_java/commits/950cedb9c5d67de39347c96e92971cd424f3832bjd  Yhttps://github.com/prometheus/client_java/commit/950cedb9c5d67de39347c96e92971cd424f3832buastats}(totalK	additionsK	deletionsKufiles](}(jd  (cb9c242e7c4cab8d98757c3a7ddf5508c2765ea3filenamepom.xmlstatusmodifiedj,e  Kj-e  KchangesKblob_url_https://github.com/prometheus/client_java/blob/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=b94922fad2a31d4fa2b04cccdf1666b7e5c2731fpatchX  @@ -56,7 +56,7 @@
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
         <module>prometheus-metrics-exporter-opentelemetry</module>
-        <module>prometheus-metrics-shaded-dependencies</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(jd  (033bd8c99438a9242304b90c8daefdc2acf7b958j2e  1prometheus-metrics-exporter-opentelemetry/pom.xmlj4e  modifiedj,e  Kj-e  Kj6e  Kj7e  https://github.com/prometheus/client_java/blob/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj9e  https://github.com/prometheus/client_java/raw/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj;e  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=b94922fad2a31d4fa2b04cccdf1666b7e5c2731fj=e  X?  @@ -46,7 +46,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
-            <version>${project.version}</version>
+            <version>1.0.0-alpha-3</version>
         </dependency>
         <!--
         <dependency>u}(jd  (f48a21064433a0e62e718217d99f05369177cba4j2e  -prometheus-metrics-exposition-formats/pom.xmlj4e  modifiedj,e  Kj-e  Kj6e  Kj7e  https://github.com/prometheus/client_java/blob/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/prometheus-metrics-exposition-formats%2Fpom.xmlj9e  https://github.com/prometheus/client_java/raw/b94922fad2a31d4fa2b04cccdf1666b7e5c2731f/prometheus-metrics-exposition-formats%2Fpom.xmlj;e  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=b94922fad2a31d4fa2b04cccdf1666b7e5c2731fj=e  X<  @@ -46,7 +46,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
-            <version>${project.version}</version>
+            <version>1.0.0-alpha-3</version>
         </dependency>
 
         <!-- test dependencies -->ueu(5dcb807a7673ec160109405778ee2cbb5989076c}(sha(5dcb807a7673ec160109405778ee2cbb5989076cnode_idEC_kwDOAHoJt9oAKDVkY2I4MDdhNzY3M2VjMTYwMTA5NDA1Nzc4ZWUyY2JiNTk4OTA3NmMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-27T15:28:10Zu	committer}(jYe  Fabian Stäberj[e  fabian@fstab.dej]e  2023-08-29T20:18:31ZumessageYRemove obsolete step from CircleCI build

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jQe  (1028f879b355626c1eceac89eb6d888d45620c61urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1028f879b355626c1eceac89eb6d888d45620c61ujie  hhttps://api.github.com/repos/prometheus/client_java/git/commits/5dcb807a7673ec160109405778ee2cbb5989076c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujie  dhttps://api.github.com/repos/prometheus/client_java/commits/5dcb807a7673ec160109405778ee2cbb5989076chtml_urlYhttps://github.com/prometheus/client_java/commit/5dcb807a7673ec160109405778ee2cbb5989076ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/5dcb807a7673ec160109405778ee2cbb5989076c/commentsjWe  }(loginfstabidJ' jSe  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jie  "https://api.github.com/users/fstabjue  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj_e  }(jze  fstabj|e  J' jSe  MDQ6VXNlcjMzMDUzNQ==j~e  2https://avatars.githubusercontent.com/u/330535?v=4je  h3jie  "https://api.github.com/users/fstabjue  https://github.com/fstabje  ,https://api.github.com/users/fstab/followersje  9https://api.github.com/users/fstab/following{/other_user}je  2https://api.github.com/users/fstab/gists{/gist_id}je  9https://api.github.com/users/fstab/starred{/owner}{/repo}je  0https://api.github.com/users/fstab/subscriptionsje  'https://api.github.com/users/fstab/orgsje  (https://api.github.com/users/fstab/reposje  3https://api.github.com/users/fstab/events{/privacy}je  2https://api.github.com/users/fstab/received_eventsje  Userje  uparents]}(jQe  (11054b2ccea8a499fd6f03625ab29b615c1dcc36jie  dhttps://api.github.com/repos/prometheus/client_java/commits/11054b2ccea8a499fd6f03625ab29b615c1dcc36jue  Yhttps://github.com/prometheus/client_java/commit/11054b2ccea8a499fd6f03625ab29b615c1dcc36uastats}(totalK	additionsK	deletionsKufiles]}(jQe  (58c65b38b7c25bcf282dac90641e8d99a2700dc9filename.circleci/config.ymlstatusmodifiedje  Kje  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/5dcb807a7673ec160109405778ee2cbb5989076c/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/5dcb807a7673ec160109405778ee2cbb5989076c/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=5dcb807a7673ec160109405778ee2cbb5989076cpatchXR  @@ -16,7 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      - run: cd protobuf-shaded && ../mvnw install && cd ..
+      # - run: cd protobuf-shaded && ../mvnw install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:uau(2845c2d1042a5c4e418ce3f2b45d139739422c64}(sha(2845c2d1042a5c4e418ce3f2b45d139739422c64node_idEC_kwDOAHoJt9oAKDI4NDVjMmQxMDQyYTVjNGU0MThjZTNmMmI0NWQxMzk3Mzk0MjJjNjQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-13T20:18:08Zu	committer}(je  Fabian Stäberje  fabian@fstab.deje  2023-07-13T20:18:08Zumessage Make TimeWindowQuantiles generictree}(je  (3aa9f19470086c3c5bce107f74b97ce28eb0954burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/3aa9f19470086c3c5bce107f74b97ce28eb0954buje  hhttps://api.github.com/repos/prometheus/client_java/git/commits/2845c2d1042a5c4e418ce3f2b45d139739422c64
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuje  dhttps://api.github.com/repos/prometheus/client_java/commits/2845c2d1042a5c4e418ce3f2b45d139739422c64html_urlYhttps://github.com/prometheus/client_java/commit/2845c2d1042a5c4e418ce3f2b45d139739422c64comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/2845c2d1042a5c4e418ce3f2b45d139739422c64/commentsje  }(loginfstabidJ' je  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3je  "https://api.github.com/users/fstabje  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuje  }(je  fstabje  J' je  MDQ6VXNlcjMzMDUzNQ==je  2https://avatars.githubusercontent.com/u/330535?v=4je  h3je  "https://api.github.com/users/fstabje  https://github.com/fstabje  ,https://api.github.com/users/fstab/followersje  9https://api.github.com/users/fstab/following{/other_user}je  2https://api.github.com/users/fstab/gists{/gist_id}je  9https://api.github.com/users/fstab/starred{/owner}{/repo}j f  0https://api.github.com/users/fstab/subscriptionsjf  'https://api.github.com/users/fstab/orgsjf  (https://api.github.com/users/fstab/reposjf  3https://api.github.com/users/fstab/events{/privacy}jf  2https://api.github.com/users/fstab/received_eventsj
f  Userjf  uparents]}(je  (02ccb6f0e9b916ae198ea0f7d576e44416497bbcje  dhttps://api.github.com/repos/prometheus/client_java/commits/02ccb6f0e9b916ae198ea0f7d576e44416497bbcje  Yhttps://github.com/prometheus/client_java/commit/02ccb6f0e9b916ae198ea0f7d576e44416497bbcuastats}(totalK	additionsKa	deletionsKJufiles](}(je  (5059f03d03ee968a260adc39ef3a739fc882258cfilename[prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsProperties.javastatusmodifiedj&f  Kj'f  K
changesKblob_urlhttps://github.com/prometheus/client_java/blob/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.java?ref=2845c2d1042a5c4e418ce3f2b45d139739422c64patchX;  @@ -237,23 +237,18 @@ public List<Double> getSummaryQuantiles() {
 
     /**
      * See {@code Summary.Builder.withQuantile()}
+     * <p>
+     * Returns {@code null} only if {@link #getSummaryQuantiles()} is also {@code null}.
+     * Returns an empty list if {@link #getSummaryQuantiles()} are specified without specifying errors.
+     * If the list is not empty, it has the same size as {@link #getSummaryQuantiles()}.
      */
     public List<Double> getSummaryQuantileErrors() {
-        if (summaryQuantileErrors != null) {
-            return summaryQuantileErrors;
-        } else {
-            List<Double> result = new ArrayList<>(summaryQuantiles.size());
-            for (int i = 0; i < result.size(); i++) {
-                if (summaryQuantiles.get(i) <= 0.01 || summaryQuantiles.get(i) >= 0.99) {
-                    result.set(i, 0.001);
-                } else if (summaryQuantiles.get(i) <= 0.02 || summaryQuantiles.get(i) >= 0.98) {
-                    result.set(i, 0.005);
-                } else {
-                    result.set(i, 0.01);
-                }
+        if (summaryQuantiles != null) {
+            if (summaryQuantileErrors == null) {
+                return Collections.emptyList();
             }
-            return result;
         }
+        return summaryQuantileErrors;
     }
 
     /**u}(je  (0a0d30160a07627a8c10bca935bbde0b489675adj,f  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.javaj.f  addedj&f  K6j'f  K j0f  K6j1f  https://github.com/prometheus/client_java/blob/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javaj3f  https://github.com/prometheus/client_java/raw/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javaj5f  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.java?ref=2845c2d1042a5c4e418ce3f2b45d139739422c64j7f  X  @@ -0,0 +1,54 @@
+package io.prometheus.metrics.core.metrics;
+
+import java.lang.reflect.Array;
+import java.util.concurrent.TimeUnit;
+import java.util.function.ObjDoubleConsumer;
+import java.util.function.Supplier;
+
+/**
+ * Wrapper around {@link CKMSQuantiles}.
+ * <p>
+ * Maintains a ring buffer of CKMSQuantiles to provide quantiles over a sliding windows of time.
+ */
+class SlidingWindow<T> {
+
+    private final Supplier<T> constructor;
+    private final ObjDoubleConsumer<T> observeFunction;
+    private final T[] ringBuffer;
+    private int currentBucket;
+    private long lastRotateTimestampMillis;
+    private final long durationBetweenRotatesMillis;
+
+    public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<T> observeFunction, long maxAgeSeconds, int ageBuckets) {
+        this.constructor = constructor;
+        this.observeFunction = observeFunction;
+        this.ringBuffer = (T[]) Array.newInstance(clazz, ageBuckets);
+        for (int i = 0; i < ringBuffer.length; i++) {
+            this.ringBuffer[i] = constructor.get();
+        }
+        this.currentBucket = 0;
+        this.lastRotateTimestampMillis = System.currentTimeMillis();
+        this.durationBetweenRotatesMillis = TimeUnit.SECONDS.toMillis(maxAgeSeconds) / ageBuckets;
+    }
+
+    public synchronized T current() {
+        return rotate();
+    }
+
+    public synchronized void observe(double value) {
+        observeFunction.accept(rotate(), value);
+    }
+
+    private T rotate() {
+        long timeSinceLastRotateMillis = System.currentTimeMillis() - lastRotateTimestampMillis;
+        while (timeSinceLastRotateMillis > durationBetweenRotatesMillis) {
+            ringBuffer[currentBucket] = constructor.get();
+            if (++currentBucket >= ringBuffer.length) {
+                currentBucket = 0;
+            }
+            timeSinceLastRotateMillis -= durationBetweenRotatesMillis;
+            lastRotateTimestampMillis += durationBetweenRotatesMillis;
+        }
+        return ringBuffer[currentBucket];
+    }
+}u}(je  (32a7c655cae5a842e7642a6df1515cb215d5cbb8j,f  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaj.f  modifiedj&f  K#j'f  Kj0f  K)j1f  https://github.com/prometheus/client_java/blob/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj3f  https://github.com/prometheus/client_java/raw/2845c2d1042a5c4e418ce3f2b45d139739422c64/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj5f  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=2845c2d1042a5c4e418ce3f2b45d139739422c64j7f  X  @@ -60,8 +60,12 @@ private List<CKMSQuantiles.Quantile> makeQuantiles(MetricsProperties[] propertie
         List<Double> quantiles = getConfigProperty(properties, MetricsProperties::getSummaryQuantiles);
         List<Double> quantileErrors = getConfigProperty(properties, MetricsProperties::getSummaryQuantileErrors);
         if (quantiles != null) {
-            for (int i=0; i<quantiles.size(); i++) {
-                result.add(new CKMSQuantiles.Quantile(quantiles.get(i), quantileErrors.get(i)));
+            for (int i = 0; i < quantiles.size(); i++) {
+                if (quantileErrors.size() > 0) {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), quantileErrors.get(i)));
+                } else {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), Builder.defaultError(quantiles.get(i))));
+                }
             }
         }
         return result;
@@ -115,15 +119,16 @@ public class DataPoint implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
-        private final TimeWindowQuantiles quantileValues;
+        private final SlidingWindow<CKMSQuantiles> quantileValues;
         private final Buffer buffer = new Buffer();
         private final ExemplarSampler exemplarSampler;
 
         private final long createdTimeMillis = System.currentTimeMillis();
 
         private DataPoint() {
             if (quantiles.size() > 0) {
-                quantileValues = new TimeWindowQuantiles(quantiles.toArray(new CKMSQuantiles.Quantile[]{}), maxAgeSeconds, ageBuckets);
+                CKMSQuantiles.Quantile[] quantilesArray = quantiles.toArray(new CKMSQuantiles.Quantile[0]);
+                quantileValues = new SlidingWindow<>(CKMSQuantiles.class, () -> new CKMSQuantiles(quantilesArray), CKMSQuantiles::insert, maxAgeSeconds, ageBuckets);
             } else {
                 quantileValues = null;
             }
@@ -169,7 +174,7 @@ public void observeWithExemplar(double value, Labels labels) {
         private void doObserve(double amount) {
             sum.add(amount);
             if (quantileValues != null) {
-                quantileValues.insert(amount);
+                quantileValues.observe(amount);
             }
             // count must be incremented last, because in collect() the count
             // indicates the number of completed observations.
@@ -193,7 +198,7 @@ private Quantiles makeQuantiles() {
             Quantile[] quantiles = new Quantile[getQuantiles().size()];
             for (int i = 0; i < getQuantiles().size(); i++) {
                 CKMSQuantiles.Quantile quantile = getQuantiles().get(i);
-                quantiles[i] = new Quantile(quantile.quantile, quantileValues.get(quantile.quantile));
+                quantiles[i] = new Quantile(quantile.quantile, quantileValues.current().get(quantile.quantile));
             }
             return Quantiles.of(quantiles);
         }
@@ -226,6 +231,30 @@ private Builder(PrometheusProperties properties) {
             super(Collections.singletonList("quantile"), properties);
         }
 
+        private static double defaultError(double quantile) {
+            if (quantile <= 0.01 || quantile >= 0.99) {
+                return 0.001;
+            } else if (quantile <= 0.02 || quantile >= 0.98) {
+                return 0.005;
+            } else {
+                return 0.01;
+            }
+        }
+
+        /**
+         * See {@link #withQuantile(double, double)}.
+         * <p>
+         * Default errors are:
+         * <ul>
+         *     <li>error = 0.001 if quantile &lt;= 0.01 or quantile &gt;= 0.99</li>
+         *     <li>error = 0.005 if quantile &lt;= 0.02 or quantile &gt;= 0.98</li>
+         *     <li>error = 0.01 else.
+         * </ul>
+         */
+        public Builder withQuantile(double quantile) {
+            return withQuantile(quantile, defaultError(quantile));
+        }
+
         /**
          * Example: The following will track the 0.95 quantile:
          * <pre>{@codeu}(je  (4bd0be7ee9d7946f2d28469f63b8f46587562725j,f  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TimeWindowQuantiles.javaj.f  removedj&f  K j'f  K7j0f  K7j1f  https://github.com/prometheus/client_java/blob/02ccb6f0e9b916ae198ea0f7d576e44416497bbc/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javaj3f  https://github.com/prometheus/client_java/raw/02ccb6f0e9b916ae198ea0f7d576e44416497bbc/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javaj5f  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.java?ref=02ccb6f0e9b916ae198ea0f7d576e44416497bbcj7f  Xl  @@ -1,55 +0,0 @@
-package io.prometheus.metrics.core.metrics;
-
-import io.prometheus.metrics.core.metrics.CKMSQuantiles.Quantile;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * Wrapper around {@link CKMSQuantiles}.
- * <p>
- * Maintains a ring buffer of CKMSQuantiles to provide quantiles over a sliding windows of time.
- */
-class TimeWindowQuantiles {
-
-  private final Quantile[] quantiles;
-  private final CKMSQuantiles[] ringBuffer;
-  private int currentBucket;
-  private long lastRotateTimestampMillis;
-  private final long durationBetweenRotatesMillis;
-
-  public TimeWindowQuantiles(Quantile[] quantiles, long maxAgeSeconds, int ageBuckets) {
-    this.quantiles = quantiles;
-    this.ringBuffer = new CKMSQuantiles[ageBuckets];
-    for (int i = 0; i < ageBuckets; i++) {
-      this.ringBuffer[i] = new CKMSQuantiles(quantiles);
-    }
-    this.currentBucket = 0;
-    this.lastRotateTimestampMillis = System.currentTimeMillis();
-    this.durationBetweenRotatesMillis = TimeUnit.SECONDS.toMillis(maxAgeSeconds) / ageBuckets;
-  }
-
-  public synchronized double get(double q) {
-    CKMSQuantiles currentBucket = rotate();
-    return currentBucket.get(q);
-  }
-
-  public synchronized void insert(double value) {
-    rotate();
-    for (CKMSQuantiles ckmsQuantiles : ringBuffer) {
-      ckmsQuantiles.insert(value);
-    }
-  }
-
-  private CKMSQuantiles rotate() {
-    long timeSinceLastRotateMillis = System.currentTimeMillis() - lastRotateTimestampMillis;
-    while (timeSinceLastRotateMillis > durationBetweenRotatesMillis) {
-      ringBuffer[currentBucket] = new CKMSQuantiles(quantiles);
-      if (++currentBucket >= ringBuffer.length) {
-        currentBucket = 0;
-      }
-      timeSinceLastRotateMillis -= durationBetweenRotatesMillis;
-      lastRotateTimestampMillis += durationBetweenRotatesMillis;
-    }
-    return ringBuffer[currentBucket];
-  }
-}ueu(7df00fda8a7751874a5754b06901501d035a1dd0}(sha(7df00fda8a7751874a5754b06901501d035a1dd0node_idEC_kwDOAHoJt9oAKDdkZjAwZmRhOGE3NzUxODc0YTU3NTRiMDY5MDE1MDFkMDM1YTFkZDAcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-31T21:12:52Zu	committer}(j[f  Fabian Stäberj]f  fabian@fstab.dej_f  2023-08-31T21:12:52Zumessage!Add JVM Memory Allocation metricstree}(jSf  (cc68086d0ebf94a7407ec155218cc389d1a3a2eburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/cc68086d0ebf94a7407ec155218cc389d1a3a2ebujkf  hhttps://api.github.com/repos/prometheus/client_java/git/commits/7df00fda8a7751874a5754b06901501d035a1dd0
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujkf  dhttps://api.github.com/repos/prometheus/client_java/commits/7df00fda8a7751874a5754b06901501d035a1dd0html_urlYhttps://github.com/prometheus/client_java/commit/7df00fda8a7751874a5754b06901501d035a1dd0comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/7df00fda8a7751874a5754b06901501d035a1dd0/commentsjYf  }(loginfstabidJ' jUf  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jkf  "https://api.github.com/users/fstabjwf  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujaf  }(j|f  fstabj~f  J' jUf  MDQ6VXNlcjMzMDUzNQ==jf  2https://avatars.githubusercontent.com/u/330535?v=4jf  h3jkf  "https://api.github.com/users/fstabjwf  https://github.com/fstabjf  ,https://api.github.com/users/fstab/followersjf  9https://api.github.com/users/fstab/following{/other_user}jf  2https://api.github.com/users/fstab/gists{/gist_id}jf  9https://api.github.com/users/fstab/starred{/owner}{/repo}jf  0https://api.github.com/users/fstab/subscriptionsjf  'https://api.github.com/users/fstab/orgsjf  (https://api.github.com/users/fstab/reposjf  3https://api.github.com/users/fstab/events{/privacy}jf  2https://api.github.com/users/fstab/received_eventsjf  Userjf  uparents]}(jSf  (957cfccf21a74821273a2333e43c822883bacb51jkf  dhttps://api.github.com/repos/prometheus/client_java/commits/957cfccf21a74821273a2333e43c822883bacb51jwf  Yhttps://github.com/prometheus/client_java/commit/957cfccf21a74821273a2333e43c822883bacb51uastats}(totalM	additionsK	deletionsKufiles](}(jSf  (ee41ffb021b478b501b23b4b73928810d248c1ecfilename~prometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMemoryAllocationMetrics.javastatusaddedjf  Kjf  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetrics.javaraw_urlhttps://github.com/prometheus/client_java/raw/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetrics.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetrics.java?ref=7df00fda8a7751874a5754b06901501d035a1dd0patchX  @@ -0,0 +1,170 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import com.sun.management.GcInfo;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import javax.management.Notification;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationListener;
+import javax.management.openmbean.CompositeData;
+import java.lang.management.GarbageCollectorMXBean;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryUsage;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * JVM memory allocation metrics. The {@link JvmMemoryAllocationMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.newBuilder().register();
+ * }</pre>
+ * However, if you want only the {@link JvmMemoryAllocationMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmMemoryAllocationMetrics.newBuilder().register();
+ * }</pre>
+ * Example metrics being exported:
+ * <pre>
+ * # HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously.
+ * # TYPE jvm_memory_pool_allocated_bytes_total counter
+ * jvm_memory_pool_allocated_bytes_total{pool="Code Cache"} 4336448.0
+ * jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space"} 875016.0
+ * jvm_memory_pool_allocated_bytes_total{pool="Metaspace"} 7480456.0
+ * jvm_memory_pool_allocated_bytes_total{pool="PS Eden Space"} 1.79232824E8
+ * jvm_memory_pool_allocated_bytes_total{pool="PS Old Gen"} 1428888.0
+ * jvm_memory_pool_allocated_bytes_total{pool="PS Survivor Space"} 4115280.0
+ * </pre>
+ */
+public class JvmMemoryAllocationMetrics {
+
+    private static final String JVM_MEMORY_POOL_ALLOCATED_BYTES_TOTAL = "jvm_memory_pool_allocated_bytes_total";
+
+    private final PrometheusProperties config;
+    private final List<GarbageCollectorMXBean> garbageCollectorBeans;
+
+    private JvmMemoryAllocationMetrics(List<GarbageCollectorMXBean> garbageCollectorBeans, PrometheusProperties config) {
+        this.garbageCollectorBeans = garbageCollectorBeans;
+        this.config = config;
+    }
+
+    private void register(PrometheusRegistry registry) {
+
+        Counter allocatedCounter = Counter.newBuilder()
+                .withName(JVM_MEMORY_POOL_ALLOCATED_BYTES_TOTAL)
+                .withHelp("Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously.")
+                .withLabelNames("pool")
+                .register(registry);
+
+        AllocationCountingNotificationListener listener = new AllocationCountingNotificationListener(allocatedCounter);
+        for (GarbageCollectorMXBean garbageCollectorMXBean : garbageCollectorBeans) {
+            if (garbageCollectorMXBean instanceof NotificationEmitter) {
+                ((NotificationEmitter) garbageCollectorMXBean).addNotificationListener(listener, null, null);
+            }
+        }
+    }
+
+    static class AllocationCountingNotificationListener implements NotificationListener {
+
+        private final Map<String, Long> lastMemoryUsage = new HashMap<String, Long>();
+        private final Counter counter;
+
+        AllocationCountingNotificationListener(Counter counter) {
+            this.counter = counter;
+        }
+
+        @Override
+        public synchronized void handleNotification(Notification notification, Object handback) {
+            GarbageCollectionNotificationInfo info = GarbageCollectionNotificationInfo.from((CompositeData) notification.getUserData());
+            GcInfo gcInfo = info.getGcInfo();
+            Map<String, MemoryUsage> memoryUsageBeforeGc = gcInfo.getMemoryUsageBeforeGc();
+            Map<String, MemoryUsage> memoryUsageAfterGc = gcInfo.getMemoryUsageAfterGc();
+            for (Map.Entry<String, MemoryUsage> entry : memoryUsageBeforeGc.entrySet()) {
+                String memoryPool = entry.getKey();
+                long before = entry.getValue().getUsed();
+                long after = memoryUsageAfterGc.get(memoryPool).getUsed();
+                handleMemoryPool(memoryPool, before, after);
+            }
+        }
+
+        // Visible for testing
+        void handleMemoryPool(String memoryPool, long before, long after) {
+            /*
+             * Calculate increase in the memory pool by comparing memory used
+             * after last GC, before this GC, and after this GC.
+             * See ascii illustration below.
+             * Make sure to count only increases and ignore decreases.
+             * (Typically a pool will only increase between GCs or during GCs, not both.
+             * E.g. eden pools between GCs. Survivor and old generation pools during GCs.)
+             *
+             *                         |<-- diff1 -->|<-- diff2 -->|
+             * Timeline: |-- last GC --|             |---- GC -----|
+             *                      ___^__        ___^____      ___^___
+             * Mem. usage vars:    / last \      / before \    / after \
+             */
+
+            // Get last memory usage after GC and remember memory used after for next time
+            long last = getAndSet(lastMemoryUsage, memoryPool, after);
+            // Difference since last GC
+            long diff1 = before - last;
+            // Difference during this GC
+            long diff2 = after - before;
+            // Make sure to only count increases
+            if (diff1 < 0) {
+                diff1 = 0;
+            }
+            if (diff2 < 0) {
+                diff2 = 0;
+            }
+            long increase = diff1 + diff2;
+            if (increase > 0) {
+                counter.withLabelValues(memoryPool).inc(increase);
+            }
+        }
+
+        private static long getAndSet(Map<String, Long> map, String key, long value) {
+            Long last = map.put(key, value);
+            return last == null ? 0 : last;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private List<GarbageCollectorMXBean> garbageCollectorBeans;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Package private. For testing only.
+         */
+        Builder withGarbageCollectorBeans(List<GarbageCollectorMXBean> garbageCollectorBeans) {
+            this.garbageCollectorBeans = garbageCollectorBeans;
+            return this;
+        }
+
+        public void register() {
+            register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public void register(PrometheusRegistry registry) {
+            List<GarbageCollectorMXBean> garbageCollectorBeans = this.garbageCollectorBeans;
+            if (garbageCollectorBeans == null) {
+                garbageCollectorBeans = ManagementFactory.getGarbageCollectorMXBeans();
+            }
+            new JvmMemoryAllocationMetrics(garbageCollectorBeans, config).register(registry);
+        }
+    }
+}u}(jSf  (ca579caf6f365f04a94c74f4ba6f515687faf449jf  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javajf  modifiedjf  Kjf  K jf  Kjf  https://github.com/prometheus/client_java/blob/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javajf  https://github.com/prometheus/client_java/raw/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=7df00fda8a7751874a5754b06901501d035a1dd0jf  X  @@ -35,6 +35,7 @@ public void register(PrometheusRegistry registry) {
             JvmClassLoadingMetrics.newBuilder(config).register(registry);
             JvmCompilationMetrics.newBuilder(config).register(registry);
             JvmGarbageCollectorMetrics.newBuilder(config).register(registry);
+            JvmMemoryAllocationMetrics.newBuilder(config).register(registry);
         }
     }
 }u}(jSf  (101c0e2383f61a7d342d502884301f79a252af17jf  prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/ExampleExporterForManualTesting.javajf  modifiedjf  K
jf  Kjf  Kjf  https://github.com/prometheus/client_java/blob/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javajf  https://github.com/prometheus/client_java/raw/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.java?ref=7df00fda8a7751874a5754b06901501d035a1dd0jf  X  @@ -7,15 +7,20 @@
 
 public class ExampleExporterForManualTesting {
 
-  public static void main(String[] args) throws IOException, InterruptedException {
+    public static void main(String[] args) throws IOException, InterruptedException {
 
-    JvmMetrics.newBuilder().register();
+        JvmMetrics.newBuilder().register();
 
-    HTTPServer server = HTTPServer.newBuilder()
-            .withPort(9400)
-            .buildAndStart();
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
 
-    System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
-    Thread.currentThread().join();
-  }
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(100);
+            int[] a = new int[10_000];
+            Runtime.getRuntime().gc(); // Memory allocation metrics only start after GC run.
+        }
+    }
 }u}(jSf  (6e61c04a60cb4071373ab3f8efe26a1957ea6539jf  prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmMemoryAllocationMetricsTest.javajf  addedjf  KAjf  K jf  KAjf  https://github.com/prometheus/client_java/blob/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetricsTest.javajf  https://github.com/prometheus/client_java/raw/7df00fda8a7751874a5754b06901501d035a1dd0/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetricsTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMemoryAllocationMetricsTest.java?ref=7df00fda8a7751874a5754b06901501d035a1dd0jf  Xe  @@ -0,0 +1,65 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.instrumentation.jvm.JvmMemoryAllocationMetrics.AllocationCountingNotificationListener;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class JvmMemoryAllocationMetricsTest {
+
+    @Test
+    public void testListenerLogic() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        Counter counter = Counter.newBuilder().withName("test").withLabelNames("pool").register(registry);
+        AllocationCountingNotificationListener listener = new AllocationCountingNotificationListener(counter);
+
+        // Increase by 123
+        listener.handleMemoryPool("TestPool", 0, 123);
+        assertEquals(123, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // No increase
+        listener.handleMemoryPool("TestPool", 123, 123);
+        assertEquals(123, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // No increase, then decrease to 0
+        listener.handleMemoryPool("TestPool", 123, 0);
+        assertEquals(123, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // No increase, then increase by 7
+        listener.handleMemoryPool("TestPool", 0, 7);
+        assertEquals(130, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // Increase by 10, then decrease to 10
+        listener.handleMemoryPool("TestPool", 17, 10);
+        assertEquals(140, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // Increase by 7, then increase by 3
+        listener.handleMemoryPool("TestPool", 17, 20);
+        assertEquals(150, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+
+        // Decrease to 17, then increase by 3
+        listener.handleMemoryPool("TestPool", 17, 20);
+        assertEquals(153, getCountByPool("test", "TestPool", registry.scrape()), 0.0);
+    }
+
+    private double getCountByPool(String metricName, String poolName, MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals(metricName)) {
+                for (CounterSnapshot.CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
+                    if (data.getLabels().get("pool").equals(poolName)) {
+                        return data.getValue();
+                    }
+                }
+            }
+        }
+        Assert.fail("pool " + poolName + " not found.");
+        return 0.0;
+    }
+
+}ueu     (5a61cade730e1b0e262cb5fd42637dd4fe4e3261}(sha(5a61cade730e1b0e262cb5fd42637dd4fe4e3261node_idEC_kwDOAHoJt9oAKDVhNjFjYWRlNzMwZTFiMGUyNjJjYjVmZDQyNjM3ZGQ0ZmU0ZTMyNjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-10T22:12:52Zu	committer}(jf  Fabian Stäberjf  fabian@fstab.dejf  2023-07-10T22:12:52ZumessageExporter servlettree}(jf  (05a241bde9e3b46e3262da015468e31e7b0f14d0urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/05a241bde9e3b46e3262da015468e31e7b0f14d0ujf  hhttps://api.github.com/repos/prometheus/client_java/git/commits/5a61cade730e1b0e262cb5fd42637dd4fe4e3261
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujf  dhttps://api.github.com/repos/prometheus/client_java/commits/5a61cade730e1b0e262cb5fd42637dd4fe4e3261html_urlYhttps://github.com/prometheus/client_java/commit/5a61cade730e1b0e262cb5fd42637dd4fe4e3261comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/5a61cade730e1b0e262cb5fd42637dd4fe4e3261/commentsjf  }(loginfstabidJ' jf  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jf  "https://api.github.com/users/fstabjg  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujf  }(j	g  fstabjg  J' jf  MDQ6VXNlcjMzMDUzNQ==j
g  2https://avatars.githubusercontent.com/u/330535?v=4jg  h3jf  "https://api.github.com/users/fstabjg  https://github.com/fstabjg  ,https://api.github.com/users/fstab/followersjg  9https://api.github.com/users/fstab/following{/other_user}jg  2https://api.github.com/users/fstab/gists{/gist_id}jg  9https://api.github.com/users/fstab/starred{/owner}{/repo}jg  0https://api.github.com/users/fstab/subscriptionsjg  'https://api.github.com/users/fstab/orgsjg  (https://api.github.com/users/fstab/reposj g  3https://api.github.com/users/fstab/events{/privacy}j"g  2https://api.github.com/users/fstab/received_eventsj$g  Userj&g  uparents]}(jf  (1bf202a664733297e0f20d77baf5e123ffe2676ejf  dhttps://api.github.com/repos/prometheus/client_java/commits/1bf202a664733297e0f20d77baf5e123ffe2676ejg  Yhttps://github.com/prometheus/client_java/commit/1bf202a664733297e0f20d77baf5e123ffe2676euastats}(totalK	additionsK	deletionsK ufiles]}(jf  (858a1b37d71776c535fe1d3ec15dedf3d9e79ca1filenamecprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javastatusmodifiedj@g  KjAg  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/5a61cade730e1b0e262cb5fd42637dd4fe4e3261/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaraw_urlhttps://github.com/prometheus/client_java/raw/5a61cade730e1b0e262cb5fd42637dd4fe4e3261/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=5a61cade730e1b0e262cb5fd42637dd4fe4e3261patchX{  @@ -60,6 +60,9 @@ public MetricSnapshots scrape() {
     }
 
     public MetricSnapshots scrape(Predicate<String> includedNames) {
+        if (includedNames == null) {
+            return scrape();
+        }
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
             String name = collector.getName();uau(399b3dbee1a29b073385a75ace1dd74f17b67c42}(sha(399b3dbee1a29b073385a75ace1dd74f17b67c42node_idEC_kwDOAHoJt9oAKDM5OWIzZGJlZTFhMjliMDczMzg1YTc1YWNlMWRkNzRmMTdiNjdjNDIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:07:55Zu	committer}(j]g  Fabian Stäberj_g  fabian@fstab.dejag  2023-07-17T10:07:55Zumessage=[maven-release-plugin] prepare for next development iterationtree}(jUg  (347449d0aedd487ff008bde85c4fabc9b7b0fb80urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/347449d0aedd487ff008bde85c4fabc9b7b0fb80ujmg  hhttps://api.github.com/repos/prometheus/client_java/git/commits/399b3dbee1a29b073385a75ace1dd74f17b67c42
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujmg  dhttps://api.github.com/repos/prometheus/client_java/commits/399b3dbee1a29b073385a75ace1dd74f17b67c42html_urlYhttps://github.com/prometheus/client_java/commit/399b3dbee1a29b073385a75ace1dd74f17b67c42comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/399b3dbee1a29b073385a75ace1dd74f17b67c42/commentsj[g  }(loginfstabidJ' jWg  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jmg  "https://api.github.com/users/fstabjyg  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujcg  }(j~g  fstabjg  J' jWg  MDQ6VXNlcjMzMDUzNQ==jg  2https://avatars.githubusercontent.com/u/330535?v=4jg  h3jmg  "https://api.github.com/users/fstabjyg  https://github.com/fstabjg  ,https://api.github.com/users/fstab/followersjg  9https://api.github.com/users/fstab/following{/other_user}jg  2https://api.github.com/users/fstab/gists{/gist_id}jg  9https://api.github.com/users/fstab/starred{/owner}{/repo}jg  0https://api.github.com/users/fstab/subscriptionsjg  'https://api.github.com/users/fstab/orgsjg  (https://api.github.com/users/fstab/reposjg  3https://api.github.com/users/fstab/events{/privacy}jg  2https://api.github.com/users/fstab/received_eventsjg  Userjg  uparents]}(jUg  (603009f431fee370bc0f1f44837600c002fbec5cjmg  dhttps://api.github.com/repos/prometheus/client_java/commits/603009f431fee370bc0f1f44837600c002fbec5cjyg  Yhttps://github.com/prometheus/client_java/commit/603009f431fee370bc0f1f44837600c002fbec5cuastats}(totalKd	additionsK2	deletionsK2ufiles](}(jUg  (7d207b99a2f5484a47057fb5b74847c7f840a3e2filenamebenchmarks/pom.xmlstatusmodifiedjg  Kjg  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jUg  (b76818b770e28e8bad259bdce8adfc16fa0cbc2fjg  examples/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  jhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/examples%2Fpom.xmljg  ihttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/examples%2Fpom.xmljg  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jUg  (51c0fa5f00bf773bfd14fe817439ea7ecd84ade9jg  'examples/tomcat-servlet-example/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/examples%2Ftomcat-servlet-example%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/examples%2Ftomcat-servlet-example%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(jUg  (5a200b51d434fd6c0857411134be3f22ef62558fjg  #integration_tests/it_common/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_common%2Fpom.xmljg  ~https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_common%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jUg  (519d5355e268b4a24805febe370286b6e771ddf1jg  1integration_tests/it_exemplars_otel_agent/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jUg  (c2a6763cc2108740fcec7eae7a51a6fefe564c87jg  /integration_tests/it_exemplars_otel_sdk/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jUg  (34df8597cbf4eecefa9954de0d2f7d37fb7527afjg  *integration_tests/it_java_versions/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_java_versions%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_java_versions%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jUg  (d3236f7d3759f98f3416e6385e8a195006c94f48jg  #integration_tests/it_log4j2/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_log4j2%2Fpom.xmljg  ~https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_log4j2%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jUg  (739e8684bb8d9bf6ed9b067c6c454fe8dae10f75jg  (integration_tests/it_pushgateway/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_pushgateway%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_pushgateway%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jUg  (11db7010bd22b49a9537bbf9984402846f659252jg  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jUg  (2ede9491e4602cfcc52358eb29442cfdfc6f8551jg  integration_tests/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  shttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fpom.xmljg  rhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/integration_tests%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jUg  (f7d0c7520ea848702f37d4c8e5af59e4a0890477jg  pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  _https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/pom.xmljg  ^https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/pom.xmljg  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>client_java-1.0.0-alpha-1</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(jUg  (6bb2555837b85b18466eed2d601343b009a6215ajg  !prometheus-metrics-config/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  {https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-config%2Fpom.xmljg  zhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-config%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jUg  (15f75c01e1c45c569307bbab13fbd16151b04570jg  prometheus-metrics-core/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  yhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-core%2Fpom.xmljg  xhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-core%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jUg  (95129ce21c4375573a0c84d408c2c8000a4c0433jg  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jUg  (fafdde58ddd13317f6373177e959d2af55c23f15jg  -prometheus-metrics-exposition-formats/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-exposition-formats%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-exposition-formats%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jUg  (a28d6c18a8c93459c0d97b4daf4b3f59e4eca64cjg   prometheus-metrics-model/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  zhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-model%2Fpom.xmljg  yhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-model%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jUg  (19d0a2f5277a8580f9072329f70798aebfa64bebjg  !prometheus-metrics-tracer/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  {https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fpom.xmljg  zhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jUg  (807b126ddccbc27496ddf27c1920abc122ff9442jg  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jUg  (da05c105697915f641b14b9f02c641197d779786jg  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jUg  (0fdd4cf494cf7a962794627f3e0d42495a39b8fajg  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jUg  (da389af0cf4d0fa24ebca4ae7b8a2cbc09b8c9d5jg  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jUg  (ef4e04e773cd4f7cffd285f019cc1435dfb216d8jg  protobuf-shaded/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  qhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/protobuf-shaded%2Fpom.xmljg  phttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/protobuf-shaded%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(jUg  (1b6c4ae1d0fec50fdd0ff07368f2ffeffc08f1d4jg  simpleclient/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  nhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient%2Fpom.xmljg  mhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jUg  (18e4372ccc7d872d9079adec4f863e69a69cc01cjg  simpleclient_bom/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  rhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_bom%2Fpom.xmljg  qhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_bom%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jUg  (44c9105c6582e4e349383b7bbc32036b0cde1fa2jg  simpleclient_caffeine/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  whttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_caffeine%2Fpom.xmljg  vhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_caffeine%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jUg  (cbed662ec66e985ada43eba01c5c8f4b148296bejg  simpleclient_common/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  uhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_common%2Fpom.xmljg  thttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_common%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jUg  (64f1c46af4191cc89605c6523818b2fe09a41f88jg  simpleclient_dropwizard/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  yhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_dropwizard%2Fpom.xmljg  xhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_dropwizard%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jUg  (f2b27bac68cb715c2be7c8855baa4b08f16d126bjg  $simpleclient_graphite_bridge/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  ~https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_graphite_bridge%2Fpom.xmljg  }https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_graphite_bridge%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jUg  (06d9a07dcfcf0822720f7cf47199b3c03a9fad73jg  simpleclient_guava/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  thttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_guava%2Fpom.xmljg  shttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_guava%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jUg  (933fc4a459b1286442c5a2f9bfc941e6002e0deejg  simpleclient_hibernate/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  xhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_hibernate%2Fpom.xmljg  whttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_hibernate%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jUg  (b7d9af5598a2cc872c81786b559124e4b7d993eejg  simpleclient_hotspot/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  vhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_hotspot%2Fpom.xmljg  uhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_hotspot%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jUg  (ce830ebd744605d7ab9540d3b51f454b794b745fjg  simpleclient_httpserver/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  yhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_httpserver%2Fpom.xmljg  xhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_httpserver%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jUg  (b5bd23c7b6d3a991b43ca3d3d4bae24d9ee9ee3ejg  simpleclient_jetty/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  thttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_jetty%2Fpom.xmljg  shttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_jetty%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jUg  (1628141a75cf48bbbbbf245e87037714e01605b8jg  simpleclient_jetty_jdk8/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  yhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_jetty_jdk8%2Fpom.xmljg  xhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_jetty_jdk8%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jUg  (72f5a210bcf76a222db8c8c3585cda374b74c886jg  simpleclient_log4j/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  thttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_log4j%2Fpom.xmljg  shttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_log4j%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jUg  (4a772b5e2f61d468e4d9da8cf6e0bcd6146df2f9jg  simpleclient_log4j2/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  uhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_log4j2%2Fpom.xmljg  thttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_log4j2%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jUg  (73ef79f4247428aa3ce11f8f1bb71f7001177711jg  simpleclient_logback/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  vhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_logback%2Fpom.xmljg  uhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_logback%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jUg  (334d299aa02f822cf727fae857c0ec005941cee5jg   simpleclient_pushgateway/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  zhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_pushgateway%2Fpom.xmljg  yhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_pushgateway%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jUg  (055caf224b22209a770495299ccbe7d42be061a9jg  simpleclient_servlet/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  vhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet%2Fpom.xmljg  uhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jUg  (02a49fd7d7e6f682ce7758cf0407db6f7dc5c6b4jg  #simpleclient_servlet_common/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  }https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet_common%2Fpom.xmljg  |https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet_common%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jUg  (4a86834915729d3a4ca0c1e0ccda28ea86a4cf77jg  $simpleclient_servlet_jakarta/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  ~https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet_jakarta%2Fpom.xmljg  }https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_servlet_jakarta%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jUg  (9833ddf60557b180641c0f279423481fdc9e768ejg  simpleclient_spring_web/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  yhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_spring_web%2Fpom.xmljg  xhttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_spring_web%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jUg  (0d5b9245d1085bf3b070162abec760022b8b185bjg  simpleclient_tracer/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  uhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fpom.xmljg  thttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jUg  (ff5a09c58a22b80db04cf7ddb58204e07699a9f6jg  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jUg  (f0b4a2114a9d0b7fb7f282145b77094943e0cfbejg  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jUg  (f08539d4b4ba995e8bf91f910ce3f7062bc2fb02jg  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljg  https://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jUg  (ac11b3bea8b38b78ffb7e1af68d4e59e7e119d87jg  simpleclient_vertx/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  thttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_vertx%2Fpom.xmljg  shttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_vertx%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jUg  (153f32248c61a81a25958458f6110a4fa0d23ee2jg  simpleclient_vertx4/pom.xmljg  modifiedjg  Kjg  Kjg  Kjg  uhttps://github.com/prometheus/client_java/blob/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_vertx4%2Fpom.xmljg  thttps://github.com/prometheus/client_java/raw/399b3dbee1a29b073385a75ace1dd74f17b67c42/simpleclient_vertx4%2Fpom.xmljg  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=399b3dbee1a29b073385a75ace1dd74f17b67c42jg  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(f3e8842d21cc48f6a01cad19b630208231c11614}(sha(f3e8842d21cc48f6a01cad19b630208231c11614node_idEC_kwDOAHoJt9oAKGYzZTg4NDJkMjFjYzQ4ZjZhMDFjYWQxOWI2MzAyMDgyMzFjMTE2MTQcommit}(author}(name	wangkaishemailwangkaicloud@163.comdate2023-06-29T02:03:09Zu	committer}(jRi  	wangkaishjTi  wangkaicloud@163.comjVi  2023-06-29T02:15:27Zumessage/Fix "expected label name, got \"BCLOSE\"" errortree}(jJi  (07248af47566a2f566303caaae1b3664ddd6f866urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/07248af47566a2f566303caaae1b3664ddd6f866ujbi  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f3e8842d21cc48f6a01cad19b630208231c11614
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujbi  dhttps://api.github.com/repos/prometheus/client_java/commits/f3e8842d21cc48f6a01cad19b630208231c11614html_urlYhttps://github.com/prometheus/client_java/commit/f3e8842d21cc48f6a01cad19b630208231c11614comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f3e8842d21cc48f6a01cad19b630208231c11614/commentsjPi  }(login	wangkaishidJa jLi  MDQ6VXNlcjE1ODg0NTY1
avatar_url4https://avatars.githubusercontent.com/u/15884565?v=4gravatar_idh3jbi  &https://api.github.com/users/wangkaishjni  https://github.com/wangkaish
followers_url0https://api.github.com/users/wangkaish/followers
following_url=https://api.github.com/users/wangkaish/following{/other_user}	gists_url6https://api.github.com/users/wangkaish/gists{/gist_id}starred_url=https://api.github.com/users/wangkaish/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/wangkaish/subscriptionsorganizations_url+https://api.github.com/users/wangkaish/orgs	repos_url,https://api.github.com/users/wangkaish/repos
events_url7https://api.github.com/users/wangkaish/events{/privacy}received_events_url6https://api.github.com/users/wangkaish/received_eventstypeUser
site_adminujXi  }(jsi  	wangkaishjui  Ja jLi  MDQ6VXNlcjE1ODg0NTY1jwi  4https://avatars.githubusercontent.com/u/15884565?v=4jyi  h3jbi  &https://api.github.com/users/wangkaishjni  https://github.com/wangkaishj|i  0https://api.github.com/users/wangkaish/followersj~i  =https://api.github.com/users/wangkaish/following{/other_user}ji  6https://api.github.com/users/wangkaish/gists{/gist_id}ji  =https://api.github.com/users/wangkaish/starred{/owner}{/repo}ji  4https://api.github.com/users/wangkaish/subscriptionsji  +https://api.github.com/users/wangkaish/orgsji  ,https://api.github.com/users/wangkaish/reposji  7https://api.github.com/users/wangkaish/events{/privacy}ji  6https://api.github.com/users/wangkaish/received_eventsji  Userji  uparents]}(jJi  (db2304d042a8f9373504b167efcfbbea13a9e1cdjbi  dhttps://api.github.com/repos/prometheus/client_java/commits/db2304d042a8f9373504b167efcfbbea13a9e1cdjni  Yhttps://github.com/prometheus/client_java/commit/db2304d042a8f9373504b167efcfbbea13a9e1cduastats}(totalKb	additionsK2	deletionsK0ufiles]}(jJi  (4d09ec4e18b20de062953d162a10412e4a4328a2filenameVsimpleclient_common/src/main/java/io/prometheus/client/exporter/common/TextFormat.javastatusmodifiedji  K2ji  K0changesKbblob_urlhttps://github.com/prometheus/client_java/blob/f3e8842d21cc48f6a01cad19b630208231c11614/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javaraw_urlhttps://github.com/prometheus/client_java/raw/f3e8842d21cc48f6a01cad19b630208231c11614/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.java?ref=f3e8842d21cc48f6a01cad19b630208231c11614patchX"  @@ -1,11 +1,11 @@
 package io.prometheus.client.exporter.common;
 
 import java.io.IOException;
-import java.io.StringWriter;
 import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -22,7 +22,8 @@ public class TextFormat {
    *
    * @since 0.10.0
    */
-  public final static String CONTENT_TYPE_OPENMETRICS_100 = "application/openmetrics-text; version=1.0.0; charset=utf-8";
+  public final static String CONTENT_TYPE_OPENMETRICS_100 =
+          "application/openmetrics-text; version=1.0.0; charset=utf-8";
 
   /**
    * Return the content type that should be used for a given Accept HTTP header.
@@ -48,14 +49,15 @@ public static String chooseContentType(String acceptHeader) {
    *
    * @since 0.10.0
    */
-  public static void writeFormat(String contentType, Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
+  public static void writeFormat(
+          String contentType, Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
     if (CONTENT_TYPE_004.equals(contentType)) {
-        write004(writer, mfs);
-        return;
+      write004(writer, mfs);
+      return;
     }
     if (CONTENT_TYPE_OPENMETRICS_100.equals(contentType)) {
-        writeOpenMetrics100(writer, mfs);
-        return;
+      writeOpenMetrics100(writer, mfs);
+      return;
     }
     throw new IllegalArgumentException("Unknown contentType " + contentType);
   }
@@ -67,7 +69,7 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
     Map<String, Collector.MetricFamilySamples> omFamilies = new TreeMap<String, Collector.MetricFamilySamples>();
     /* See http://prometheus.io/docs/instrumenting/exposition_formats/
      * for the output format specification. */
-    while(mfs.hasMoreElements()) {
+    while (mfs.hasMoreElements()) {
       Collector.MetricFamilySamples metricFamilySamples = mfs.nextElement();
       String name = metricFamilySamples.name;
       writer.write("# HELP ");
@@ -97,33 +99,23 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
       String createdName = name + "_created";
       String gcountName = name + "_gcount";
       String gsumName = name + "_gsum";
-      for (Collector.MetricFamilySamples.Sample sample: metricFamilySamples.samples) {
+      for (Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples) {
         /* OpenMetrics specific sample, put in a gauge at the end. */
         if (sample.name.equals(createdName)
-            || sample.name.equals(gcountName)
-            || sample.name.equals(gsumName)) {
+                || sample.name.equals(gcountName)
+                || sample.name.equals(gsumName)) {
           Collector.MetricFamilySamples omFamily = omFamilies.get(sample.name);
           if (omFamily == null) {
-            omFamily = new Collector.MetricFamilySamples(sample.name, Collector.Type.GAUGE, metricFamilySamples.help, new ArrayList<Collector.MetricFamilySamples.Sample>());
+            omFamily = new Collector.MetricFamilySamples(sample.name,
+                    Collector.Type.GAUGE, metricFamilySamples.help,
+                    new ArrayList<Collector.MetricFamilySamples.Sample>());
             omFamilies.put(sample.name, omFamily);
           }
           omFamily.samples.add(sample);
           continue;
         }
-        writer.write(sample.name);
-        if (sample.labelNames.size() > 0) {
-          writer.write('{');
-          for (int i = 0; i < sample.labelNames.size(); ++i) {
-            writer.write(sample.labelNames.get(i));
-            writer.write("=\"");
-            writeEscapedLabelValue(writer, sample.labelValues.get(i));
-            writer.write("\",");
-          }
-          writer.write('}');
-        }
-        writer.write(' ');
-        writer.write(Collector.doubleToGoString(sample.value));
-        if (sample.timestampMs != null){
+        appendSamples(writer, sample);
+        if (sample.timestampMs != null) {
           writer.write(' ');
           writer.write(sample.timestampMs.toString());
         }
@@ -136,6 +128,30 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
     }
   }
 
+  private static void appendSamples(Writer writer, Collector.MetricFamilySamples.Sample sample) throws IOException {
+    writer.write(sample.name);
+    List<String> labelNames = sample.labelNames;
+    List<String> labelValues = sample.labelValues;
+    int sampleSize = labelNames.size();
+    if (sampleSize > 0) {
+      writer.write('{');
+      writer.write(labelNames.get(0));
+      writer.write("=\"");
+      writeEscapedLabelValue(writer, labelValues.get(0));
+      writer.write("\"");
+      for (int i = 1; i < sampleSize; ++i) {
+        writer.write(",");
+        writer.write(labelNames.get(i));
+        writer.write("=\"");
+        writeEscapedLabelValue(writer, labelValues.get(i));
+        writer.write("\"");
+      }
+      writer.write('}');
+    }
+    writer.write(' ');
+    writer.write(Collector.doubleToGoString(sample.value));
+  }
+
   private static void writeEscapedHelp(Writer writer, String s) throws IOException {
     for (int i = 0; i < s.length(); i++) {
       char c = s.charAt(i);
@@ -197,8 +213,9 @@ private static String typeString(Collector.Type t) {
    *
    * @since 0.10.0
    */
-  public static void writeOpenMetrics100(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
-    while(mfs.hasMoreElements()) {
+  public static void writeOpenMetrics100(
+          Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException {
+    while (mfs.hasMoreElements()) {
       Collector.MetricFamilySamples metricFamilySamples = mfs.nextElement();
       String name = metricFamilySamples.name;
 
@@ -221,31 +238,16 @@ public static void writeOpenMetrics100(Writer writer, Enumeration<Collector.Metr
       writer.write(' ');
       writeEscapedLabelValue(writer, metricFamilySamples.help);
       writer.write('\n');
- 
-      for (Collector.MetricFamilySamples.Sample sample: metricFamilySamples.samples) {
-        writer.write(sample.name);
-        if (sample.labelNames.size() > 0) {
-          writer.write('{');
-          for (int i = 0; i < sample.labelNames.size(); ++i) {
-            if (i > 0) {
-              writer.write(",");
-            }
-            writer.write(sample.labelNames.get(i));
-            writer.write("=\"");
-            writeEscapedLabelValue(writer, sample.labelValues.get(i));
-            writer.write("\"");
-          }
-          writer.write('}');
-        }
-        writer.write(' ');
-        writer.write(Collector.doubleToGoString(sample.value));
-        if (sample.timestampMs != null){
+
+      for (Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples) {
+        appendSamples(writer, sample);
+        if (sample.timestampMs != null) {
           writer.write(' ');
           omWriteTimestamp(writer, sample.timestampMs);
         }
         if (sample.exemplar != null) {
           writer.write(" # {");
-          for (int i=0; i<sample.exemplar.getNumberOfLabels(); i++) {
+          for (int i = 0; i < sample.exemplar.getNumberOfLabels(); i++) {
             if (i > 0) {
               writer.write(",");
             }uau(8c36ed33e01107f49eb24422ce9558287af82887}(sha(8c36ed33e01107f49eb24422ce9558287af82887node_idEC_kwDOAHoJt9oAKDhjMzZlZDMzZTAxMTA3ZjQ5ZWIyNDQyMmNlOTU1ODI4N2FmODI4ODccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-28T21:29:27Zu	committer}(ji  Fabian Stäberji  fabian@fstab.deji  2023-08-28T21:29:27Zumessage:Add support for Info metrics to the OpenTelemetry exportertree}(ji  (6b2b913745ae3f00180147e47f1892a59740fdcdurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/6b2b913745ae3f00180147e47f1892a59740fdcduji  hhttps://api.github.com/repos/prometheus/client_java/git/commits/8c36ed33e01107f49eb24422ce9558287af82887
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuji  dhttps://api.github.com/repos/prometheus/client_java/commits/8c36ed33e01107f49eb24422ce9558287af82887html_urlYhttps://github.com/prometheus/client_java/commit/8c36ed33e01107f49eb24422ce9558287af82887comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/8c36ed33e01107f49eb24422ce9558287af82887/commentsji  }(loginfstabidJ' ji  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ji  "https://api.github.com/users/fstabji  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuji  }(ji  fstabji  J' ji  MDQ6VXNlcjMzMDUzNQ==ji  2https://avatars.githubusercontent.com/u/330535?v=4ji  h3ji  "https://api.github.com/users/fstabji  https://github.com/fstabji  ,https://api.github.com/users/fstab/followersji  9https://api.github.com/users/fstab/following{/other_user}ji  2https://api.github.com/users/fstab/gists{/gist_id}ji  9https://api.github.com/users/fstab/starred{/owner}{/repo}ji  0https://api.github.com/users/fstab/subscriptionsji  'https://api.github.com/users/fstab/orgsji  (https://api.github.com/users/fstab/reposji  3https://api.github.com/users/fstab/events{/privacy}jj  2https://api.github.com/users/fstab/received_eventsjj  Userjj  uparents]}(ji  (4129fe061903eccea4a12bb8f110b73b2dcb5c35ji  dhttps://api.github.com/repos/prometheus/client_java/commits/4129fe061903eccea4a12bb8f110b73b2dcb5c35ji  Yhttps://github.com/prometheus/client_java/commit/4129fe061903eccea4a12bb8f110b73b2dcb5c35uastats}(totalKK	additionsKH	deletionsKufiles](}(ji  (ca723aa6b785e5d406635f280a2269ca685b62acfilenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedjj  Kj j  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/8c36ed33e01107f49eb24422ce9558287af82887/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/8c36ed33e01107f49eb24422ce9558287af82887/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=8c36ed33e01107f49eb24422ce9558287af82887patchXi  @@ -44,7 +44,7 @@ public static void main(String[] args) throws Exception {
                 .register();
 
         Random random = new Random(0);
-        for (int i=0; i<1000; i++) {
+        for (int i = 0; i < 1000; i++) {
             histogram.withLabelValues("200").observe(random.nextGaussian());
         }
 
@@ -58,7 +58,7 @@ public static void main(String[] args) throws Exception {
                 .withClassicBuckets(128, 256, 512, 1024, 2048)
                 .register();
 
-        for (int i=0; i<15; i++) {
+        for (int i = 0; i < 15; i++) {
             classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
         }
 
@@ -70,7 +70,7 @@ public static void main(String[] args) throws Exception {
                 .withQuantile(0.99)
                 .register();
 
-        for (int i=0; i<1000; i++) {
+        for (int i = 0; i < 1000; i++) {
             summary.observe(random.nextGaussian());
         }
 
@@ -79,9 +79,22 @@ public static void main(String[] args) throws Exception {
                 .withHelp("OTel resource")
                 .withLabelNames("service.version")
                 .register();
+        targetInfo.setLabelValues("1.0.0");
 
         targetInfo.setLabelValues("1.0.0");
 
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u      }(ji  (c35b9106faaeebb9d455da1b3aa41089aa3dc590j%j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj'j  modifiedjj  Kj j  K j)j  Kj*j  https://github.com/prometheus/client_java/blob/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj,j  https://github.com/prometheus/client_java/raw/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj.j  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=8c36ed33e01107f49eb24422ce9558287af82887j0j  X  @@ -49,6 +49,8 @@ public Collection<MetricData> collectAllMetrics() {
                 }
             } else if (snapshot instanceof SummarySnapshot) {
                 addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
             }
         }
         return result;u}(ji  (3d3fb5e661c4438796165ad012076665510bb659j%j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj'j  modifiedjj  Kj j  K j)j  Kj*j  https://github.com/prometheus/client_java/blob/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj,j  https://github.com/prometheus/client_java/raw/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj.j  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=8c36ed33e01107f49eb24422ce9558287af82887j0j  X  @@ -2,6 +2,7 @@
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
@@ -43,4 +44,8 @@ public MetricData create(HistogramSnapshot snapshot) {
     public MetricData create(SummarySnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
 }u}(ji  (863b3c8c589ca193f2f47b6d4034994841a2186aj%j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj'j  addedjj  K1j j  K j)j  K1j*j  https://github.com/prometheus/client_java/blob/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj,j  https://github.com/prometheus/client_java/raw/8c36ed33e01107f49eb24422ce9558287af82887/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj.j  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=8c36ed33e01107f49eb24422ce9558287af82887j0j  X<  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.LONG_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}ueu(1ccd6d495fa4ed58e000d11a7e688f15fa880e21}(sha(1ccd6d495fa4ed58e000d11a7e688f15fa880e21node_idEC_kwDOAHoJt9oAKDFjY2Q2ZDQ5NWZhNGVkNThlMDAwZDExYTdlNjg4ZjE1ZmE4ODBlMjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-28T21:09:40Zu	committer}(jTj  Fabian StäberjVj  fabian@fstab.dejXj  2023-08-28T21:09:40ZumessageRefactor Info metric APItree}(jLj  (ce3d13c7adf92c508fd38f7d0f87751a166c9843urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ce3d13c7adf92c508fd38f7d0f87751a166c9843ujdj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1ccd6d495fa4ed58e000d11a7e688f15fa880e21
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujdj  dhttps://api.github.com/repos/prometheus/client_java/commits/1ccd6d495fa4ed58e000d11a7e688f15fa880e21html_urlYhttps://github.com/prometheus/client_java/commit/1ccd6d495fa4ed58e000d11a7e688f15fa880e21comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/commentsjRj  }(loginfstabidJ' jNj  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jdj  "https://api.github.com/users/fstabjpj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujZj  }(juj  fstabjwj  J' jNj  MDQ6VXNlcjMzMDUzNQ==jyj  2https://avatars.githubusercontent.com/u/330535?v=4j{j  h3jdj  "https://api.github.com/users/fstabjpj  https://github.com/fstabj~j  ,https://api.github.com/users/fstab/followersjj  9https://api.github.com/users/fstab/following{/other_user}jj  2https://api.github.com/users/fstab/gists{/gist_id}jj  9https://api.github.com/users/fstab/starred{/owner}{/repo}jj  0https://api.github.com/users/fstab/subscriptionsjj  'https://api.github.com/users/fstab/orgsjj  (https://api.github.com/users/fstab/reposjj  3https://api.github.com/users/fstab/events{/privacy}jj  2https://api.github.com/users/fstab/received_eventsjj  Userjj  uparents]}(jLj  (bff53f292dbc9fa4182ca0979196700286856e12jdj  dhttps://api.github.com/repos/prometheus/client_java/commits/bff53f292dbc9fa4182ca0979196700286856e12jpj  Yhttps://github.com/prometheus/client_java/commit/bff53f292dbc9fa4182ca0979196700286856e12uastats}(totalKΌ	additionsK	deletionsKufiles](}(jLj  (99caa40e226549916cfd82402be864cf9c141876filenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedjj  K	jj  K changesK	blob_urlhttps://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21patchX  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
 import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
 import io.prometheus.metrics.core.metrics.Summary;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
@@ -73,6 +74,14 @@ public static void main(String[] args) throws Exception {
             summary.observe(random.nextGaussian());
         }
 
+        Info targetInfo = Info.newBuilder()
+                .withName("target")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+
+        targetInfo.setLabelValues("1.0.0");
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u}(jLj  (9cd27a42c58845389736906bc49d2160af05792fjj  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javajj  modifiedjj  Kjj  Kjj  Kjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jLj  (b46c112af431ec1a41165983f476978e4d0a654ejj  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javajj  modifiedjj  Kjj  Kjj  Kjj  X  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajj  X
  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jLj  (9a44b01535c57c14d4ace04dd1c4e716316c7c32jj  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javajj  modifiedjj  Kjj  Kjj  Kjj  X  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajj  X  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(jLj  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99jj  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajj  modifiedjj  K&jj  Kjj  K4jj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(jLj  (d324a2700c70b915e444403f75a9c17c96e70bbfjj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javajj  modifiedjj  Kjj  Kjj  Kjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(jLj  (a1c1769d98559841ca83eb49e1ca2977e32e6114jj  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajj  modifiedjj  Kjj  K jj  Kjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(jLj  (035f2133482078e18c05d544d2633b8ade9d8bebjj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajj  modifiedjj  Kjj  K jj  Kjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(jLj  (c6d5b7719d02f25c2a8635bcc774374e4f552b97jj  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajj  modifiedjj  KQjj  Kjj  KRjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(jLj  (ea96f4286bf36b64370927613d8e4fdec5254341jj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajj  modifiedjj  Kjj  Kjj  Kjj  https://github.com/prometheus/client_java/blob/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajj  https://github.com/prometheus/client_java/raw/1ccd6d495fa4ed58e000d11a7e688f15fa880e21/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=1ccd6d495fa4ed58e000d11a7e688f15fa880e21jj  X
  @@ -1,18 +1,17 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
-import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -33,6 +32,9 @@ public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScop
     @Override
     public Collection<MetricData> collectAllMetrics() {
         MetricSnapshots snapshots = registry.scrape(); // TODO: Filter
+
+        //resource.merge()
+
         List<MetricData> result = new ArrayList<>(snapshots.size());
         MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
         for (MetricSnapshot snapshot : snapshots) {
@@ -51,6 +53,17 @@ public Collection<MetricData> collectAllMetrics() {
         return result;
     }
 
+    /*
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                targetInfo.getData().
+            }
+        }
+    }
+     */
+
     private void addUnlessNull(List<MetricData> result, MetricData data) {
         if (data != null) {
             result.add(data);ueu(57fb821839a6af468baef4942c461d75dffebc2f}(sha(57fb821839a6af468baef4942c461d75dffebc2fnode_idEC_kwDOAHoJt9oAKDU3ZmI4MjE4MzlhNmFmNDY4YmFlZjQ5NDJjNDYxZDc1ZGZmZWJjMmYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T19:05:10Zu	committer}(jk  Fabian Stäberjk  fabian@fstab.dejk  2023-08-29T19:05:10Zumessage=Add support for Unknown metrics to the OpenTelemetry exportertree}(j	k  (60f4fe6491dc7a5d02a3a298bd324f232af2db9furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/60f4fe6491dc7a5d02a3a298bd324f232af2db9fuj!k  hhttps://api.github.com/repos/prometheus/client_java/git/commits/57fb821839a6af468baef4942c461d75dffebc2f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj!k  dhttps://api.github.com/repos/prometheus/client_java/commits/57fb821839a6af468baef4942c461d75dffebc2fhtml_urlYhttps://github.com/prometheus/client_java/commit/57fb821839a6af468baef4942c461d75dffebc2fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/57fb821839a6af468baef4942c461d75dffebc2f/commentsjk  }(loginfstabidJ' jk  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j!k  "https://api.github.com/users/fstabj-k  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujk  }(j2k  fstabj4k  J' jk  MDQ6VXNlcjMzMDUzNQ==j6k  2https://avatars.githubusercontent.com/u/330535?v=4j8k  h3j!k  "https://api.github.com/users/fstabj-k  https://github.com/fstabj;k  ,https://api.github.com/users/fstab/followersj=k  9https://api.github.com/users/fstab/following{/other_user}j?k  2https://api.github.com/users/fstab/gists{/gist_id}jAk  9https://api.github.com/users/fstab/starred{/owner}{/repo}jCk  0https://api.github.com/users/fstab/subscriptionsjEk  'https://api.github.com/users/fstab/orgsjGk  (https://api.github.com/users/fstab/reposjIk  3https://api.github.com/users/fstab/events{/privacy}jKk  2https://api.github.com/users/fstab/received_eventsjMk  UserjOk  uparents]}(j	k  (b26b2514ad84e7683ec30077d2239f161f288b35j!k  dhttps://api.github.com/repos/prometheus/client_java/commits/b26b2514ad84e7683ec30077d2239f161f288b35j-k  Yhttps://github.com/prometheus/client_java/commit/b26b2514ad84e7683ec30077d2239f161f288b35uastats}(totalK=	additionsK<	deletionsKufiles](}(j	k  (adde09b848ce7d6bc5d2539581bcd764f69bd272filenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedjik  Kjjk  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/57fb821839a6af468baef4942c461d75dffebc2f/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/57fb821839a6af468baef4942c461d75dffebc2f/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=57fb821839a6af468baef4942c461d75dffebc2fpatchX  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.examples.opentelemetry;
 
+import com.sun.org.apache.bcel.internal.classfile.Unknown;
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
 import io.prometheus.metrics.core.metrics.Histogram;
@@ -8,8 +9,13 @@
 import io.prometheus.metrics.core.metrics.Summary;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.proto.metrics.v1.internal.Sum;
 
 import java.util.Random;
@@ -106,6 +112,14 @@ public static void main(String[] args) throws Exception {
         stateSet.withLabelValues("dev").setFalse("feature1");
         stateSet.withLabelValues("dev").setTrue("feature2");
 
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u}(j	k  (111e288b6fbb92f184c092cefd60615e80d45aa0jok  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajqk  modifiedjik  Kjjk  K jsk  Kjtk  https://github.com/prometheus/client_java/blob/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajvk  https://github.com/prometheus/client_java/raw/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajxk  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=57fb821839a6af468baef4942c461d75dffebc2fjzk  X$  @@ -11,6 +11,7 @@
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
@@ -54,6 +55,8 @@ public Collection<MetricData> collectAllMetrics() {
                 addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
             } else if (snapshot instanceof StateSetSnapshot) {
                 addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
             }
         }
         return result;u}(j	k  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3djok  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajqk  modifiedjik  Kjjk  Kjsk  Kjtk  https://github.com/prometheus/client_java/blob/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajvk  https://github.com/prometheus/client_java/raw/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajxk  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=57fb821839a6af468baef4942c461d75dffebc2fjzk  X  @@ -1,14 +1,15 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 
 public class MetricDataFactory {
 
@@ -53,4 +54,8 @@ public MetricData create(InfoSnapshot snapshot) {
     public MetricData create(StateSetSnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
 }u}(j	k  (930715492a4380a13a088d728e21b7460031bb2cjok  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javajqk  addedjik  K%jjk  K jsk  K%jtk  https://github.com/prometheus/client_java/blob/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajvk  https://github.com/prometheus/client_java/raw/57fb821839a6af468baef4942c461d75dffebc2f/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajxk  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=57fb821839a6af468baef4942c461d75dffebc2fjzk  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}ueu(c904d9bd3049389bd49b7630b74fb5d5834272bb}(sha(c904d9bd3049389bd49b7630b74fb5d5834272bbnode_idEC_kwDOAHoJt9oAKGM5MDRkOWJkMzA0OTM4OWJkNDliNzYzMGI3NGZiNWQ1ODM0MjcyYmIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-22T21:06:19Zu	committer}(jk  Fabian Stäberjk  fabian@fstab.dejk  2023-08-22T21:06:19ZumessageRemove old protobuf-shadedtree}(jk  (97f96d6305b54abd40606072bff6c46b0625db65urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/97f96d6305b54abd40606072bff6c46b0625db65ujk  hhttps://api.github.com/repos/prometheus/client_java/git/commits/c904d9bd3049389bd49b7630b74fb5d5834272bb
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujk  dhttps://api.github.com/repos/prometheus/client_java/commits/c904d9bd3049389bd49b7630b74fb5d5834272bbhtml_urlYhttps://github.com/prometheus/client_java/commit/c904d9bd3049389bd49b7630b74fb5d5834272bbcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/c904d9bd3049389bd49b7630b74fb5d5834272bb/commentsjk  }(loginfstabidJ' jk  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jk  "https://api.github.com/users/fstabjk  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujk  }(jk  fstabjk  J' jk  MDQ6VXNlcjMzMDUzNQ==jk  2https://avatars.githubusercontent.com/u/330535?v=4jk  h3jk  "https://api.github.com/users/fstabjk  https://github.com/fstabjk  ,https://api.github.com/users/fstab/followersjk  9https://api.github.com/users/fstab/following{/other_user}jk  2https://api.github.com/users/fstab/gists{/gist_id}jk  9https://api.github.com/users/fstab/starred{/owner}{/repo}jk  0https://api.github.com/users/fstab/subscriptionsjk  'https://api.github.com/users/fstab/orgsjk  (https://api.github.com/users/fstab/reposjk  3https://api.github.com/users/fstab/events{/privacy}jk  2https://api.github.com/users/fstab/received_eventsjk  Userjk  uparents]}(jk  (ff25014b2a6a875723c6f640b73591daedadb9bajk  dhttps://api.github.com/repos/prometheus/client_java/commits/ff25014b2a6a875723c6f640b73591daedadb9bajk  Yhttps://github.com/prometheus/client_java/commit/ff25014b2a6a875723c6f640b73591daedadb9bauastats}(totalK	additionsK 	deletionsKufiles](}(jk  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cfilenameprotobuf-shaded/.gitignorestatusremovedjk  K jk  KchangesKblob_urlthttps://github.com/prometheus/client_java/blob/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2F.gitignoreraw_urlshttps://github.com/prometheus/client_java/raw/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2F.gitignorecontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=ff25014b2a6a875723c6f640b73591daedadb9bapatch@@ -1 +0,0 @@
-src/main/javau}(jk  (5db4149b724982e6ff8f55ae96f4f8a07804d590jk  protobuf-shaded/README.mdjk  removedjk  K jk  Kj l  Kjl  shttps://github.com/prometheus/client_java/blob/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2FREADME.mdjl  rhttps://github.com/prometheus/client_java/raw/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2FREADME.mdjl  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=ff25014b2a6a875723c6f640b73591daedadb9bajl  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(jk  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34jk  protobuf-shaded/pom.xmljk  removedjk  K jk  Kj l  Kjl  qhttps://github.com/prometheus/client_java/blob/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2Fpom.xmljl  phttps://github.com/prometheus/client_java/raw/ff25014b2a6a875723c6f640b73591daedadb9ba/protobuf-shaded%2Fpom.xmljl  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=ff25014b2a6a875723c6f640b73591daedadb9bajl  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(99adbce95541940b7ba06b1744367e34a533ee56}(sha(99adbce95541940b7ba06b1744367e34a533ee56node_idEC_kwDOAHoJt9oAKDk5YWRiY2U5NTU0MTk0MGI3YmEwNmIxNzQ0MzY3ZTM0YTUzM2VlNTYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T21:26:24Zu	committer}(j#l  Fabian Stäberj%l  fabian@fstab.dej'l  2023-08-26T21:26:24ZumessageOTel exampletree}(jl  (c8a293e429e2507f81c8297e69b5aed20c506f6durlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c8a293e429e2507f81c8297e69b5aed20c506f6duj3l  hhttps://api.github.com/repos/prometheus/client_java/git/commits/99adbce95541940b7ba06b1744367e34a533ee56
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj3l  dhttps://api.github.com/repos/prometheus/client_java/commits/99adbce95541940b7ba06b1744367e34a533ee56html_urlYhttps://github.com/prometheus/client_java/commit/99adbce95541940b7ba06b1744367e34a533ee56comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/99adbce95541940b7ba06b1744367e34a533ee56/commentsj!l  }(loginfstabidJ' jl  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j3l  "https://api.github.com/users/fstabj?l  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj)l  }(jDl  fstabjFl  J' jl  MDQ6VXNlcjMzMDUzNQ==jHl  2https://avatars.githubusercontent.com/u/330535?v=4jJl  h3j3l  "https://api.github.com/users/fstabj?l  https://github.com/fstabjMl  ,https://api.github.com/users/fstab/followersjOl  9https://api.github.com/users/fstab/following{/other_user}jQl  2https://api.github.com/users/fstab/gists{/gist_id}jSl  9https://api.github.com/users/fstab/starred{/owner}{/repo}jUl  0https://api.github.com/users/fstab/subscriptionsjWl  'https://api.github.com/users/fstab/orgsjYl  (https://api.github.com/users/fstab/reposj[l  3https://api.github.com/users/fstab/events{/privacy}j]l  2https://api.github.com/users/fstab/received_eventsj_l  Userjal  uparents]}(jl  (b64019875d7bb2cfd4a8aff451c58268abec1beej3l  dhttps://api.github.com/repos/prometheus/client_java/commits/b64019875d7bb2cfd4a8aff451c58268abec1beej?l  Yhttps://github.com/prometheus/client_java/commit/b64019875d7bb2cfd4a8aff451c58268abec1beeuastats}(totalK	additionsK:	deletionsKufiles](}(jl  (9497bfff9f88c2f61ace33a67f3266f27951ca50filename(examples/example-opentelemetry/README.mdstatusmodifiedj{l  K
j|l  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2FREADME.md?ref=99adbce95541940b7ba06b1744367e34a533ee56patchX  @@ -1,4 +1,4 @@
-# Built-in HTTPServer for Exposing Metrics
+# OpenTelemetry Exporter Example
 
 ## Build
 
@@ -10,28 +10,18 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+Assuming `./target/prometheus-opentelemetry-example-app.jar` is present, run the demo with:
 
+```bash
+docker-compose up
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
-```
-
-## Manually testing the Metrics Endpoint
 
-Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+This will set up the following scenario
 
+```mermaid
+flowchart LR
+   example app -- OTLP --> OpenTelemetry collector -- Prometheus remote write --> Prometheus Server
 ```
-# HELP uptime_seconds_total total number of seconds since this application was started
-# TYPE uptime_seconds_total counter
-uptime_seconds_total 301.0
-```
-
-The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
-
-* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
-* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
-* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
 
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).uS     }(jl  (923840e0c85a643976792d88e8dff7c10d446ceejl  9examples/example-opentelemetry/config/otelcol-config.yamljl  modifiedj{l  Kj|l  Kjl  Kjl  https://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamljl  https://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yamljl  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=99adbce95541940b7ba06b1744367e34a533ee56jl  X{  @@ -9,7 +9,7 @@ processors:
 
 exporters:
   prometheusremotewrite:
-    endpoint: "http://localhost:9090/api/v1/push"
+    endpoint: http://localhost:9090/api/v1/write
   logging:
     verbosity: detailed
 
@@ -18,4 +18,4 @@ service:
     metrics:
       receivers: [otlp]
       processors: [batch]
-      exporters: [logging]
+      exporters: [logging, prometheusremotewrite]u}(jl  (d627d3b540120cb9dfdceaecc5dacafa9c682cc3jl  2examples/example-opentelemetry/docker-compose.yamljl  modifiedj{l  Kj|l  K jl  Kjl  https://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fdocker-compose.yamljl  https://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fdocker-compose.yamljl  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fdocker-compose.yaml?ref=99adbce95541940b7ba06b1744367e34a533ee56jl  X  @@ -3,11 +3,14 @@ services:
   prometheus-opentelemetry-example-app:
     image: openjdk:11-jre
     network_mode: host
+    ports:
+      - "5005:5005"
     volumes:
       - ./target/prometheus-opentelemetry-example-app.jar:/prometheus-opentelemetry-example-app.jar
     command:
       - java
       - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
       - /prometheus-opentelemetry-example-app.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
@@ -29,4 +32,5 @@ services:
     command:
       - --enable-feature=exemplar-storage
       - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
       - --config.file=/prometheus.yamlu}(jl  (59f18133e00289827a2d8bd5c0e8b0c2a15a3178jl  1examples/example-opentelemetry/pom-standalone.xmljl  removedj{l  K j|l  KPjl  KPjl  https://github.com/prometheus/client_java/blob/b64019875d7bb2cfd4a8aff451c58268abec1bee/examples%2Fexample-opentelemetry%2Fpom-standalone.xmljl  https://github.com/prometheus/client_java/raw/b64019875d7bb2cfd4a8aff451c58268abec1bee/examples%2Fexample-opentelemetry%2Fpom-standalone.xmljl  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fpom-standalone.xml?ref=b64019875d7bb2cfd4a8aff451c58268abec1beejl  X  @@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>io.prometheus</groupId>
-    <artifactId>example-opentelemetry</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
-
-    <name>Example - OpenTelemetry Metrics Exporter</name>
-    <description>
-        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
-    </description>
-
-    <properties>
-        <maven.compiler.target>11</maven.compiler.target>
-        <maven.compiler.source>11</maven.compiler.source>
-    </properties>
-
-    <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
-
-    <developers>
-        <developer>
-            <id>fstab</id>
-            <name>Fabian Stäber</name>
-            <email>fabian@fstab.de</email>
-        </developer>
-    </developers>
-
-    <dependencies>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!--
-        <dependency>
-            <groupId>io.opentelemetry</groupId>
-            <artifactId>opentelemetry-api</artifactId>
-            <version>1.29.0</version>
-            <scope>provided</scope>
-        </dependency>
-        -->
-    </dependencies>
-
-    <build>
-        <finalName>prometheus-opentelemetry-example-app</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
-                                </transformer>
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>u}(jl  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63jl  cexamples/example-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javajl  modifiedj{l  K j|l  K;jl  K;jl  https://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajl  https://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajl  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=99adbce95541940b7ba06b1744367e34a533ee56jl  X  @@ -2,29 +2,15 @@
 
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.Unit;
 
-import java.io.File;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * Simple example of an application exposing metrics pushing metrics via OTLP.
  */
 public class Main {
 
     public static void main(String[] args) throws Exception {
 
-        //Map<String, String> resourceAttributes = getResourceAttributes();
-        //System.out.println(resourceAttributes);
-
         Counter counter = Counter.newBuilder()
                 .withName("uptime_seconds_total")
                 .withHelp("total number of seconds since this application was started")
@@ -40,49 +26,4 @@ public static void main(String[] args) throws Exception {
             counter.inc();
         }
     }
-
-    public static Map<String, String> getResourceAttributes() throws Exception {
-        URL url1 = new File("/home/fabian/.m2/repository/io/opentelemetry/opentelemetry-api/1.29.0/opentelemetry-api-1.29.0.jar").toURI().toURL();
-        URL url2 = new File("/home/fabian/.m2/repository/io/opentelemetry/opentelemetry-context/1.29.0/opentelemetry-context-1.29.0.jar").toURI().toURL();
-
-        URLClassLoader cl = new URLClassLoader(new URL[]{url1, url2});
-        Class<?> globalOpenTelemetryClass = cl.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
-        Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
-        if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
-            // GlobalOpenTelemetry is injected by the OTel Java aqent
-            Object applicationMeterProvider = globalOpenTelemetry.getClass().getMethod("getMeterProvider").invoke(globalOpenTelemetry);
-            Field agentMeterProviderField = applicationMeterProvider.getClass().getDeclaredField("agentMeterProvider");
-            agentMeterProviderField.setAccessible(true);
-            Object agentMeterProvider = agentMeterProviderField.get(applicationMeterProvider);
-            Field delegateField = agentMeterProvider.getClass().getDeclaredField("delegate");
-            delegateField.setAccessible(true);
-            Object sdkMeterProvider = delegateField.get(agentMeterProvider);
-
-            // System.out.println(meterProvider.getClass());
-            Field sharedStateField = sdkMeterProvider.getClass().getDeclaredField("sharedState");
-            sharedStateField.setAccessible(true);
-            Object sharedState = sharedStateField.get(sdkMeterProvider);
-
-            Method getResourceMethod = sharedState.getClass().getMethod("getResource");
-            getResourceMethod.setAccessible(true);
-            Object resource = getResourceMethod.invoke(sharedState);
-            Method getAttributesMethod = resource.getClass().getMethod("getAttributes");
-            getAttributesMethod.setAccessible(true);
-            Object attributes = getAttributesMethod.invoke(resource);
-            Method asMapMethod = attributes.getClass().getMethod("asMap");
-            asMapMethod.setAccessible(true);
-            Map<?, ?> attributeMap = (Map<?, ?>) asMapMethod.invoke(attributes);
-
-            Map<String, String> result = new HashMap<>();
-            for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
-                if (entry.getKey() != null && entry.getValue() != null) {
-                    result.put(entry.getKey().toString(), entry.getValue().toString());
-                }
-            }
-            return result;
-        } else {
-            System.out.println("no java agent found");
-            return Collections.emptyMap();
-        }
-    }
 }u}(jl  (430cde0676cea4636d941b98ee255b7f760cb664jl  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javajl  modifiedj{l  Kj|l  Kjl  K$jl  https://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajl  https://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajl  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=99adbce95541940b7ba06b1744367e34a533ee56jl  X  @@ -183,20 +183,34 @@ static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTel
 
         static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String endpoint = config.getEndpoint();
-            if (endpoint != null) {
-                return endpoint;
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
             }
-            endpoint = getString("otel.exporter.otlp.endpoint");
-            if (endpoint != null) {
-                return endpoint;
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
             }
-            if (builder.endpoint != null) {
-                return builder.endpoint;
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
             }
-            if (getProtocol(builder, config).equals("http/protobuf")) {
-                return "http://localhost:4317";
-            } else { // grpc
-                return "http://localhost:4318";
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
             }
         }
 u}(jl  (824117fd33c03849cefaf97dce91d2476583793ejl  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javajl  modifiedj{l  Kj|l  Kjl  Kjl  https://github.com/prometheus/client_java/blob/99adbce95541940b7ba06b1744367e34a533ee56/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajl  https://github.com/prometheus/client_java/raw/99adbce95541940b7ba06b1744367e34a533ee56/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajl  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=99adbce95541940b7ba06b1744367e34a533ee56jl  X	  @@ -1,15 +1,12 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.Unit;
 
 class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
 
@@ -23,12 +20,27 @@ class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
     PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
         this.instrumentationScopeInfo = instrumentationScopeInfo;
         this.resource = resource;
-        this.name = metricMetadata.getName();
+        this.name = getNameWithoutUnit(metricMetadata);
         this.description = metricMetadata.getHelp();
         this.unit = metricMetadata.getUnit() == null ? null : metricMetadata.getUnit().toString();
         this.data = data;
     }
 
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
     @Override
     public Resource getResource() {
         return resource;ueu(732a6c14edd2ce6a29a3ebf230ff058cbe867006}(sha(732a6c14edd2ce6a29a3ebf230ff058cbe867006node_idEC_kwDOAHoJt9oAKDczMmE2YzE0ZWRkMmNlNmEyOWEzZWJmMjMwZmYwNThjYmU4NjcwMDYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jl  Fabian Stäberjl  fabian@fstab.dejl  2023-08-29T20:19:20ZumessageHAdd HTTPServer exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jl  (f50a6d7830685cdb641ded74a93bc471fa9fb3a3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f50a6d7830685cdb641ded74a93bc471fa9fb3a3ujl  hhttps://api.github.com/repos/prometheus/client_java/git/commits/732a6c14edd2ce6a29a3ebf230ff058cbe867006
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujl  dhttps://api.github.com/repos/prometheus/client_java/commits/732a6c14edd2ce6a29a3ebf230ff058cbe867006html_urlYhttps://github.com/prometheus/client_java/commit/732a6c14edd2ce6a29a3ebf230ff058cbe867006comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/732a6c14edd2ce6a29a3ebf230ff058cbe867006/commentsjl  }(loginfstabidJ' jl  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jl  "https://api.github.com/users/fstabjl  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujl  }(jl  fstabjl  J' jl  MDQ6VXNlcjMzMDUzNQ==jl  2https://avatars.githubusercontent.com/u/330535?v=4jl  h3jl  "https://api.github.com/users/fstabjl  https://github.com/fstabjl  ,https://api.github.com/users/fstab/followersjl  9https://api.github.com/users/fstab/following{/other_user}jl  2https://api.github.com/users/fstab/gists{/gist_id}jl  9https://api.github.com/users/fstab/starred{/owner}{/repo}jl  0https://api.github.com/users/fstab/subscriptionsjl  'https://api.github.com/users/fstab/orgsjl  (https://api.github.com/users/fstab/reposj m  3https://api.github.com/users/fstab/events{/privacy}jm  2https://api.github.com/users/fstab/received_eventsjm  Userjm  uparents]}(jl  (6c71218eef8c7c1f9017ce96008c489d7459f86cjl  dhttps://api.github.com/repos/prometheus/client_java/commits/6c71218eef8c7c1f9017ce96008c489d7459f86cjl  Yhttps://github.com/prometheus/client_java/commit/6c71218eef8c7c1f9017ce96008c489d7459f86cuastats}(totalM		additionsM		deletionsK@ufiles](}(jl  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedj m  K%j!m  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006patchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jl  (fd1f204d1d1ed425f184838aea568a893c9ae334j&m  #examples/example-httpserver/pom.xmlj(m  addedj m  KFj!m  K j*m  KFj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2Fpom.xmlj-m  ~https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (0563d583a93f32d63b484dd0d677f75db81927caj&m  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj(m  addedj m  K!j!m  K j*m  K!j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X=  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jl  (571e55a2b5d259f0401a881e9631fa0acce8e791j&m  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj(m  modifiedj m  Kj!m  Kj*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(jl  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cj&m  examples/pom.xmlj(m  modifiedj m  Kj!m  K j*m  Kj+m  jhttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fpom.xmlj-m  ihttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/examples%2Fpom.xmlj/m  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(jl  (aa81b08e8189c21bee10839e7605abd4b2c49b12j&m  #integration-tests/it-common/pom.xmlj(m  addedj m  K8j!m  K j*m  K8j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fpom.xmlj-m  ~https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (d60e5397941da631e78c1289365208a3becd4641j&m  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javaj(m  addedj m  K$j!m  K j*m  K$j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(jl  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j&m  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javaj(m  addedj m  Kej!m  K j*m  Kej+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(jl  (4eafa72596ce3619761aa5c3681eeabb90322228j&m  Iintegration-tests/it-common/src/test/resources/project_version.propertiesj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(jl  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj&m  -integration-tests/it-common/version-rules.xmlj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fversion-rules.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-common%2Fversion-rules.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jl  (8767c971d0f813a8af5a6dee7d7276f15ae79be6j&m  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj(m  addedj m  KIj!m  K j*m  KIj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (474db7804aabba78dee5e810f3952924b2853255j&m  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj(m  addedj m  Kbj!m  K j*m  Kbj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj/m  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jl  (a470df5c021d465c51388b5a740ba88a49d40858j&m  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj(m  addedj m  KSj!m  K j*m  KSj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (efa119c4e2292afc04d79a6f1b049bca20e923bej&m  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj(m  addedj m  Kqj!m  K j*m  Kqj+m  X  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj-m  X
  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj/m  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jl  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j&m  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj(m  addedj m  KNj!m  K j*m  KNj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jl  (21956ae78f5aca3a25abb6b5bb32a80999930390j&m  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj(m  addedj m  Kqj!m  K j*m  Kqj+m  X  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj-m  X  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj/m  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u     }(jl  (8d7404585288239abecdd5265b2984d493cb0628j&m  6integration-tests/it-exporter/it-exporter-test/pom.xmlj(m  addedj m  KBj!m  K j*m  KBj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(jl  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj&m  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj(m  addedj m  MVj!m  K j*m  MVj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(jl  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j&m  %integration-tests/it-exporter/pom.xmlj(m  addedj m  K1j!m  K j*m  K1j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fit-exporter%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u}(jl  (cce89906f28eebfb57aa16a5ab222f52117f4794j&m  integration-tests/pom.xmlj(m  addedj m  K@j!m  K j*m  K@j+m  shttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fpom.xmlj-m  rhttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/integration-tests%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(jl  (fc8359e560a3e05c90838b2ece08e0853d823358j&m  pom.xmlj(m  modifiedj m  Kj!m  K j*m  Kj+m  _https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/pom.xmlj-m  ^https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/pom.xmlj/m  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(jl  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcj&m  *prometheus-metrics-exporter-common/pom.xmlj(m  addedj m  K5j!m  K j*m  K5j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jl  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4j&m  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javaj(m  addedj m  K
j!m  K j*m  K
j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(jl  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj&m  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javaj(m  addedj m  KGj!m  K j*m  KGj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(jl  (4e3db6955fe7fbf010877f9faef50315ac489eedj&m  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javaj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(jl  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fj&m  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javaj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(jl  (318e865f55bdd893d762a5f4e759a502e8bbc983j&m  4prometheus-metrics-exporter-common/version-rules.xmlj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fversion-rules.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-common%2Fversion-rules.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jl  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160j&m  .prometheus-metrics-exporter-httpserver/pom.xmlj(m  addedj m  K+j!m  K j*m  K+j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jl  (e8a54e0cf687d16358a139f83d42f5960106395aj&m  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javaj(m  addedj m  KCj!m  K j*m  KCj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jl  (7c0275fc3624f8dff2d802b37671eb91fca4b48cj&m  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .buildAndStart();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server. Same as {@link #close()}.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer. Same as {@link #stop()}.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     * This is useful if you did not specify a port and the server picked a free port automatically.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build and start the HTTPServer.
+         */
+        public HTTPServer buildAndStart() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(jl  (03b647d99ed2bc1d67a3c66a11c33d900b53d501j&m  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javaj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jl  (4f1b4f63a7e59feb619963afc5d901560bc83e08j&m  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javaj(m  addedj m  Kwj!m  K j*m  Kwj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u     }(jl  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bj&m  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj(m  addedj m  K-j!m  K j*m  K-j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(jl  (378ac6ddc334fbe20d07b3510cf6434894770c6bj&m  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javaj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(jl  (318e865f55bdd893d762a5f4e759a502e8bbc983j&m  8prometheus-metrics-exporter-httpserver/version-rules.xmlj(m  addedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jl  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79j&m  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj(m  modifiedj m  Kj!m  Kj*m  K	j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(jl  (656d661ebddd423ba12fc58b1dbd136062e5a282j&m  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javaj(m  addedj m  K^j!m  K j*m  K^j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(jl  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ej&m  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javaj(m  modifiedj m  Kj!m  K4j*m  K8j+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj/m  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(jl  (3db354c56f52afb4c46e0a080ef010b492c401d6j&m  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javaj(m  modifiedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(jl  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfej&m  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj(m  modifiedj m  Kj!m  Kj*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(jl  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72j&m  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj(m  modifiedj m  Kj!m  Kj*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(jl  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfj&m  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj(m  modifiedj m  Kj!m  K j*m  Kj+m  https://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj-m  https://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj/m  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j1m  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(41380512582ddd13f695f5e00db5683ab1e29c0a}(sha(41380512582ddd13f695f5e00db5683ab1e29c0anode_idEC_kwDOAHoJt9oAKDQxMzgwNTEyNTgyZGRkMTNmNjk1ZjVlMDBkYjU2ODNhYjFlMjljMGEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-04T21:38:23Zu	committer}(jn  Fabian Stäberjn  fabian@fstab.dejn  2023-06-04T21:38:23ZumessageFix testtree}(j}n  (d0a8baa1d6b06e6b4c36d7f4bfb4e40e5c54ebbeurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d0a8baa1d6b06e6b4c36d7f4bfb4e40e5c54ebbeujn  hhttps://api.github.com/repos/prometheus/client_java/git/commits/41380512582ddd13f695f5e00db5683ab1e29c0a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujn  dhttps://api.github.com/repos/prometheus/client_java/commits/41380512582ddd13f695f5e00db5683ab1e29c0ahtml_urlYhttps://github.com/prometheus/client_java/commit/41380512582ddd13f695f5e00db5683ab1e29c0acomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/41380512582ddd13f695f5e00db5683ab1e29c0a/commentsjn  }(loginfstabidJ' jn  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jn  "https://api.github.com/users/fstabjn  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujn  }(jn  fstabjn  J' jn  MDQ6VXNlcjMzMDUzNQ==jn  2https://avatars.githubusercontent.com/u/330535?v=4jn  h3jn  "https://api.github.com/users/fstabjn  https://github.com/fstabjn  ,https://api.github.com/users/fstab/followersjn  9https://api.github.com/users/fstab/following{/other_user}jn  2https://api.github.com/users/fstab/gists{/gist_id}jn  9https://api.github.com/users/fstab/starred{/owner}{/repo}jn  0https://api.github.com/users/fstab/subscriptionsjn  'https://api.github.com/users/fstab/orgsjn  (https://api.github.com/users/fstab/reposjn  3https://api.github.com/users/fstab/events{/privacy}jn  2https://api.github.com/users/fstab/received_eventsjn  Userjn  uparents]}(j}n  (bbb7ee9635a6de87478e7aa8e5847bd49612889cjn  dhttps://api.github.com/repos/prometheus/client_java/commits/bbb7ee9635a6de87478e7aa8e5847bd49612889cjn  Yhttps://github.com/prometheus/client_java/commit/bbb7ee9635a6de87478e7aa8e5847bd49612889cuastats}(totalK	additionsK	deletionsKufiles]}(j}n  (d7314a6f52e064ac49ec8d19b6bef3206473f00ffilenameZprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricProperties.javastatusmodifiedjn  Kjn  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/41380512582ddd13f695f5e00db5683ab1e29c0a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/41380512582ddd13f695f5e00db5683ab1e29c0a/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricProperties.java?ref=41380512582ddd13f695f5e00db5683ab1e29c0apatchX  @@ -145,7 +145,7 @@ private void validate(String prefix) throws PrometheusPropertiesException {
         }
 
         if (summaryQuantileErrors != null) {
-            if (summaryQuantiles != null) {
+            if (summaryQuantiles == null) {
                 throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Can't configure " + SUMMARY_QUANTILE_ERRORS + " without configuring " + SUMMARY_QUANTILES);
             }
             if (summaryQuantileErrors.length != summaryQuantiles.length) {uau(f6e6db3665c5d260eec41042c7fffc089c4f3d84}(sha(f6e6db3665c5d260eec41042c7fffc089c4f3d84node_idEC_kwDOAHoJt9oAKGY2ZTZkYjM2NjVjNWQyNjBlZWM0MTA0MmM3ZmZmYzA4OWM0ZjNkODQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-04T11:23:11Zu	committer}(jn  Fabian Stäberjn  fabian@fstab.dejn  2023-07-04T11:23:11Zumessage#Fix exemplars for native histogramstree}(jn  (a2c0edf91f9a39e989be2cd7bfe14ed175a00298urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a2c0edf91f9a39e989be2cd7bfe14ed175a00298uj
o  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f6e6db3665c5d260eec41042c7fffc089c4f3d84
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj
o  dhttps://api.github.com/repos/prometheus/client_java/commits/f6e6db3665c5d260eec41042c7fffc089c4f3d84html_urlYhttps://github.com/prometheus/client_java/commit/f6e6db3665c5d260eec41042c7fffc089c4f3d84comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f6e6db3665c5d260eec41042c7fffc089c4f3d84/commentsjn  }(loginfstabidJ' jn  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j
o  "https://api.github.com/users/fstabjo  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj o  }(jo  fstabjo  J' jn  MDQ6VXNlcjMzMDUzNQ==jo  2https://avatars.githubusercontent.com/u/330535?v=4j!o  h3j
o  "https://api.github.com/users/fstabjo  https://github.com/fstabj$o  ,https://api.github.com/users/fstab/followersj&o  9https://api.github.com/users/fstab/following{/other_user}j(o  2https://api.github.com/users/fstab/gists{/gist_id}j*o  9https://api.github.com/users/fstab/starred{/owner}{/repo}j,o  0https://api.github.com/users/fstab/subscriptionsj.o  'https://api.github.com/users/fstab/orgsj0o  (https://api.github.com/users/fstab/reposj2o  3https://api.github.com/users/fstab/events{/privacy}j4o  2https://api.github.com/users/fstab/received_eventsj6o  Userj8o  uparents]}(jn  (32aec68ec774449de31105d1e9c50d35c3a418c1j
o  dhttps://api.github.com/repos/prometheus/client_java/commits/32aec68ec774449de31105d1e9c50d35c3a418c1jo  Yhttps://github.com/prometheus/client_java/commit/32aec68ec774449de31105d1e9c50d35c3a418c1uastats}(totalKǌ	additionsK	deletionsKufiles](}(jn  (d1660aac4571080cce7000bd1680ec2b00ade09efilenamedprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExpositionFormatProperties.javastatusmodifiedjRo  KjSo  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExpositionFormatProperties.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84patchX  @@ -16,7 +16,7 @@ public ExpositionFormatProperties(Boolean includeCreatedTimestamps) {
     }
 
     public Boolean getIncludeCreatedTimestamps() {
-        return includeCreatedTimestamps;
+        return includeCreatedTimestamps != null && includeCreatedTimestamps;
     }
 
     static ExpositionFormatProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {u}(jn  (f2e4a604c554b2df6cd9a22fb49de6253b985b3bjXo  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajZo  modifiedjRo  K#jSo  Kj\o  K5j]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -1,9 +1,11 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.tracer.common.SpanContext;
 import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
@@ -17,6 +19,8 @@
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -661,31 +665,17 @@ public void testFindBucketIndex() throws NoSuchMethodException, InvocationTarget
     }
 
     @Test
-    public void testDefaults() {
+    public void testDefaults() throws IOException {
         Histogram histogram = Histogram.newBuilder().withName("test").build();
         histogram.observe(0.5);
-        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(histogram.collect());
-        String expected = "" +
+        HistogramSnapshot snapshot = histogram.collect();
+        String expectedNative = "" +
                 "name: \"test\" " +
                 "type: HISTOGRAM " +
                 "metric { " +
                 "histogram { " +
                 "sample_count: 1 " +
                 "sample_sum: 0.5 " +
-                // Default should have classic buckets as well as native buckets.
-                // Default classic bucket boundaries should be the same as in client_golang.
-                "bucket { cumulative_count: 0 upper_bound: 0.005 } " +
-                "bucket { cumulative_count: 0 upper_bound: 0.01 } " +
-                "bucket { cumulative_count: 0 upper_bound: 0.025 } " +
-                "bucket { cumulative_count: 0 upper_bound: 0.05 } " +
-                "bucket { cumulative_count: 0 upper_bound: 0.1 } " +
-                "bucket { cumulative_count: 0 upper_bound: 0.25 } " +
-                "bucket { cumulative_count: 1 upper_bound: 0.5 } " +
-                "bucket { cumulative_count: 1 upper_bound: 1.0 } " +
-                "bucket { cumulative_count: 1 upper_bound: 2.5 } " +
-                "bucket { cumulative_count: 1 upper_bound: 5.0 } " +
-                "bucket { cumulative_count: 1 upper_bound: 10.0 } " +
-                "bucket { cumulative_count: 1 upper_bound: Infinity } " +
                 // default native schema is 5
                 "schema: 5 " +
                 // default zero threshold is 2^-128
@@ -694,7 +684,34 @@ public void testDefaults() {
                 "positive_span { offset: -32 length: 1 } " +
                 "positive_delta: 1 " +
                 "} }";
-        Assert.assertEquals(expected, TextFormat.printer().shortDebugString(protobufData));
+        String expectedClassic = "" +
+                // default classic buckets
+                "# TYPE test histogram\n" +
+                "test_bucket{le=\"0.005\"} 0\n" +
+                "test_bucket{le=\"0.01\"} 0\n" +
+                "test_bucket{le=\"0.025\"} 0\n" +
+                "test_bucket{le=\"0.05\"} 0\n" +
+                "test_bucket{le=\"0.1\"} 0\n" +
+                "test_bucket{le=\"0.25\"} 0\n" +
+                "test_bucket{le=\"0.5\"} 1\n" +
+                "test_bucket{le=\"1.0\"} 1\n" +
+                "test_bucket{le=\"2.5\"} 1\n" +
+                "test_bucket{le=\"5.0\"} 1\n" +
+                "test_bucket{le=\"10.0\"} 1\n" +
+                "test_bucket{le=\"+Inf\"} 1\n" +
+                "test_count 1\n" +
+                "test_sum 0.5\n" +
+                "# EOF\n";
+
+        // protobuf
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(snapshot);
+        Assert.assertEquals(expectedNative, TextFormat.printer().shortDebugString(protobufData));
+
+        // text
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expectedClassic, out.toString());
     }
 
     @Testu}(jn  (7b25f2f53ae2411b9cf74d4b898313cae8bc10c4jXo  -prometheus-metrics-exposition-formats/pom.xmljZo  modifiedjRo  KjSo  K j\o  Kj]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fpom.xmlj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fpom.xmljao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -43,6 +43,11 @@
             <artifactId>prometheus-metrics-model</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>protobuf-shaded</artifactId>u}(jn  (16f60d7e85cb835da8ba59112bb090f32208bc86jXo  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormats.javajZo  addedjRo  K5jSo  K j\o  K5j]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javaj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javajao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.config.ExpositionFormatProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+public class ExpositionFormats {
+
+    private final PrometheusProtobufWriter prometheusProtobufWriter;
+    private final PrometheusTextFormatWriter prometheusTextFormatWriter;
+    private final OpenMetricsTextFormatWriter openMetricsTextFormatWriter;
+
+    private ExpositionFormats(PrometheusProtobufWriter prometheusProtobufWriter,
+                              PrometheusTextFormatWriter prometheusTextFormatWriter,
+                              OpenMetricsTextFormatWriter openMetricsTextFormatWriter) {
+        this.prometheusProtobufWriter = prometheusProtobufWriter;
+        this.prometheusTextFormatWriter = prometheusTextFormatWriter;
+        this.openMetricsTextFormatWriter = openMetricsTextFormatWriter;
+    }
+
+    public static ExpositionFormats init() {
+        return init(PrometheusProperties.get().getExpositionFormatConfig());
+    }
+
+    public static ExpositionFormats init(ExpositionFormatProperties properties) {
+        return new ExpositionFormats(
+                new PrometheusProtobufWriter(),
+                new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),
+                new OpenMetricsTextFormatWriter(properties.getIncludeCreatedTimestamps())
+        );
+    }
+
+    public ExpositionFormatWriter findWriter(String acceptHeader) {
+        if (prometheusProtobufWriter.accepts(acceptHeader)) {
+            return prometheusProtobufWriter;
+        }
+        if (openMetricsTextFormatWriter.accepts(acceptHeader)) {
+            return openMetricsTextFormatWriter;
+        }
+        return prometheusTextFormatWriter;
+    }
+
+    public PrometheusProtobufWriter getPrometheusProtobufWriter() {
+        return prometheusProtobufWriter;
+    }
+
+    public PrometheusTextFormatWriter getPrometheusTextFormatWriter() {
+        return prometheusTextFormatWriter;
+    }
+
+    public OpenMetricsTextFormatWriter getOpenMetricsTextFormatWriter() {
+        return openMetricsTextFormatWriter;
+    }
+}u}(jn  (0751829d14a8ddc00efe89c10b49a4b07c222253jXo  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajZo  modifiedjRo  K1jSo  Kj\o  K9j]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
@@ -49,6 +50,16 @@ public String getContentType() {
         return CONTENT_TYPE;
     }
 
+    public String toDebugString(MetricSnapshots metricSnapshots) {
+        StringBuilder stringBuilder = new StringBuilder();
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                stringBuilder.append(TextFormat.printer().printToString(convert(snapshot)));
+            }
+        }
+        return stringBuilder.toString();
+    }
+
     @Override
     public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
         for (MetricSnapshot snapshot : metricSnapshots) {
@@ -146,7 +157,29 @@ private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data
     private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
-        if (data.hasClassicHistogramData()) {
+        if (data.hasNativeHistogramData()) {
+            histogramBuilder.setSchema(data.getNativeSchema());
+            histogramBuilder.setZeroCount(data.getNativeZeroCount());
+            histogramBuilder.setZeroThreshold(data.getNativeZeroThreshold());
+            addBuckets(histogramBuilder, data.getNativeBucketsForPositiveValues(), +1);
+            addBuckets(histogramBuilder, data.getNativeBucketsForNegativeValues(), -1);
+
+            // Add a single +Inf bucket for the exemplar.
+            // It is currently not possible to have more than one exemplar in a native histogram,
+            // see https://cloud-native.slack.com/archives/C02KR205UMU/p1688414381799849
+            Exemplar exemplar = data.getExemplars().getLatest();
+            if (exemplar != null) {
+                Metrics.Bucket.Builder bucketBuilder = Metrics.Bucket.newBuilder()
+                        .setCumulativeCount(getNativeCount(data))
+                        .setUpperBound(Double.POSITIVE_INFINITY);
+                bucketBuilder.setExemplar(convert(exemplar));
+                histogramBuilder.addBucket(bucketBuilder);
+            }
+        } else if (data.hasClassicHistogramData()) {
+
+            // Once native histograms support multiple exemplars the above can be changed from "else if" to "if",
+            // so that we always add the complete classic buckets and exemplars.
+
             ClassicHistogramBuckets buckets = data.getClassicBuckets();
             double lowerBound = Double.NEGATIVE_INFINITY;
             long cumulativeCount = 0;
@@ -164,13 +197,6 @@ private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnaps
                 lowerBound = upperBound;
             }
         }
-        if (data.hasNativeHistogramData()) {
-            histogramBuilder.setSchema(data.getNativeSchema());
-            histogramBuilder.setZeroCount(data.getNativeZeroCount());
-            histogramBuilder.setZeroThreshold(data.getNativeZeroThreshold());
-            addBuckets(histogramBuilder, data.getNativeBucketsForPositiveValues(), +1);
-            addBuckets(histogramBuilder, data.getNativeBucketsForNegativeValues(), -1);
-        }
         addLabels(metricBuilder, data.getLabels());
         setScrapeTimestamp(metricBuilder, data);
         if (data.hasCount()) {
@@ -183,6 +209,21 @@ private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnaps
         return metricBuilder;
     }
 
+    private long getNativeCount(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.hasCount()) {
+            return data.getCount();
+        } else {
+            long count = data.getNativeZeroCount();
+            for (int i = 0; i < data.getNativeBucketsForPositiveValues().size(); i++) {
+                count += data.getNativeBucketsForPositiveValues().getCount(i);
+            }
+            for (int i = 0; i < data.getNativeBucketsForNegativeValues().size(); i++) {
+                count += data.getNativeBucketsForNegativeValues().getCount(i);
+            }
+            return count;
+        }
+    }
+
     private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistogramBuckets buckets, int sgn) {
         if (buckets.size() > 0) {
             Metrics.BucketSpan.Builder currentSpan = Metrics.BucketSpan.newBuilder();u}(jn  (4857f43eaa544c3fa028e8c53b8fe31b3f4bfe29jXo  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajZo  modifiedjRo  KjSo  K j\o  Kj]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -1106,6 +1106,7 @@ public void testNativeHistogramComplete() throws IOException {
                     "histogram { " +
                         "sample_count: 2 " +
                         "sample_sum: 4.2 " +
+                        "bucket { cumulative_count: 2 upper_bound: Infinity " + exemplar2protoString + " } " +
                         "schema: 5 " +
                         "zero_threshold: 0.0 " +
                         "zero_count: 0 " +
@@ -1118,6 +1119,7 @@ public void testNativeHistogramComplete() throws IOException {
                     "histogram { " +
                         "sample_count: 55 " + // bucket counts + zero count
                         "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 55 upper_bound: Infinity " + exemplar2protoString + " } " +
                         "schema: 5 " +
                         "zero_threshold: 0.0 " +
                         "zero_count: 1 " +u}(jn  (641d0e57325f2ceb316a457179337d7b13e47e7bjXo  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplars.javajZo  modifiedjRo  KjSo  K j\o  Kj]o  https://github.com/prometheus/client_java/blob/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javaj_o  https://github.com/prometheus/client_java/raw/f6e6db3665c5d260eec41042c7fffc089c4f3d84/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javajao  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.java?ref=f6e6db3665c5d260eec41042c7fffc089c4f3d84jco  X  @@ -73,6 +73,33 @@ public Exemplar get(double lowerBound, double upperBound) {
         return null;
     }
 
+    /**
+     * Find the Exemplar with the newest timestamp. May return {@code null}.
+     */
+    public Exemplar getLatest() {
+        Exemplar latest = null;
+        for (int i=0; i<exemplars.size(); i++) {
+            Exemplar candidate = exemplars.get(i);
+            if (candidate == null) {
+                continue;
+            }
+            if (latest == null) {
+                latest = candidate;
+                continue;
+            }
+            if (!latest.hasTimestamp()) {
+                latest = candidate;
+                continue;
+            }
+            if (candidate.hasTimestamp()) {
+                if (latest.getTimestampMillis() < candidate.getTimestampMillis()) {
+                    latest = candidate;
+                }
+            }
+        }
+        return latest;
+    }
+
     public static class Builder {
 
         private final ArrayList<Exemplar> exemplars = new ArrayList<>();ueu(6b0a34b3ae21e543752751c809faaca4add7cf1b}(sha(6b0a34b3ae21e543752751c809faaca4add7cf1bnode_idEC_kwDOAHoJt9oAKDZiMGEzNGIzYWUyMWU1NDM3NTI3NTFjODA5ZmFhY2E0YWRkN2NmMWIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:36:44Zu	committer}(jo  Fabian Stäberjo  fabian@fstab.dejo  2023-07-16T21:43:22ZumessageClean up pom.xmltree}(jo  (0a61c25875cfd8022c18e5c23b8b1ef4f028ee0eurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/0a61c25875cfd8022c18e5c23b8b1ef4f028ee0eujo  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6b0a34b3ae21e543752751c809faaca4add7cf1b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujo  dhttps://api.github.com/repos/prometheus/client_java/commits/6b0a34b3ae21e543752751c809faaca4add7cf1bhtml_urlYhttps://github.com/prometheus/client_java/commit/6b0a34b3ae21e543752751c809faaca4add7cf1bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6b0a34b3ae21e543752751c809faaca4add7cf1b/commentsjo  }(loginfstabidJ' jo  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jo  "https://api.github.com/users/fstabjo  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujo  }(jo  fstabjo  J' jo  MDQ6VXNlcjMzMDUzNQ==jo  2https://avatars.githubusercontent.com/u/330535?v=4jo  h3jo  "https://api.github.com/users/fstabjo  https://github.com/fstabjo  ,https://api.github.com/users/fstab/followersjo  9https://api.github.com/users/fstab/following{/other_user}jo  2https://api.github.com/users/fstab/gists{/gist_id}jo  9https://api.github.com/users/fstab/starred{/owner}{/repo}jo  0https://api.github.com/users/fstab/subscriptionsjo  'https://api.github.com/users/fstab/orgsjo  (https://api.github.com/users/fstab/reposjo  3https://api.github.com/users/fstab/events{/privacy}jo  2https://api.github.com/users/fstab/received_eventsjo  Userjo  uparents]}(jo  (b323d620ce6455eaefa949b81317f6e1715b5e2fjo  dhttps://api.github.com/repos/prometheus/client_java/commits/b323d620ce6455eaefa949b81317f6e1715b5e2fjo  Yhttps://github.com/prometheus/client_java/commit/b323d620ce6455eaefa949b81317f6e1715b5e2fuastats}(totalM 	additionsK	deletionsKhufiles](}(jo  (fb53876ed4e255583338681850c3fe83632258e6filenameexamples/pom.xmlstatusmodifiedjo  K
jo  KchangesK#blob_urljhttps://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Fpom.xmlraw_urlihttps://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Fpom.xmlcontents_url|https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bpatchX  @@ -11,7 +11,10 @@
     <artifactId>examples</artifactId>
     <packaging>pom</packaging>
 
-    <name>Prometheus Java Client - Examples</name>
+    <name>Prometheus Metrics Examples</name>
+    <description>
+        Example projects for the Prometheus Metrics Library.
+    </description>
 
     <licenses>
         <license>
@@ -21,28 +24,16 @@
         </license>
     </licenses>
 
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
     <modules>
-        <module>tomcat-servlet</module>
+        <module>tomcat-servlet-example</module>
     </modules>
 
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-failsafe-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>integration-test</id>
-                            <phase>integration-test</phase>
-                            <goals>
-                                <goal>integration-test</goal>
-                                <goal>verify</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>u}(jo  (0688b6045eb0b65a1275f54dcfa287b780ba7c24jo  'examples/tomcat-servlet-example/pom.xmljo  renamedjo  Kjo  Kjp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X  @@ -9,9 +9,28 @@
         <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>tomcat-servlet</artifactId>
+    <artifactId>tomcat-servlet-example</artifactId>
 
-    <name>Example with Embedded Tomcat and the Exporter Servlet</name>
+    <name>Tomcat Servlet Example</name>
+    <description>
+        Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
 
     <dependencies>
         <dependency>previous_filenameexamples/tomcat-servlet/pom.xmlu}(jo  (97d4161ef49a383d7bf918acb98fcbd6eea26ee6jo  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javajo  renamedjo  K jo  K jp  K jp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajp  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  jexamples/tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(jo  (759b88cb9bc8fadf1b0140bad4f789f6af8baee3jo  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javajo  renamedjo  K jo  K jp  K jp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajp  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  ]examples/tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(jo  (5810c19b79e0ad001fbcb0acc455f4e7f7e0d629jo  !prometheus-metrics-config/pom.xmljo  modifiedjo  Kjo  Kjp  Kjp  {https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-config%2Fpom.xmljp  zhttps://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-config%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X  @@ -29,11 +29,12 @@
         <developer>
             <id>fstab</id>
             <name>Fabian Stäber</name>
-            <email>fabian@prometheus.io</email>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
     <dependencies>
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>u}(jo  (06d350b699a7b853db61b0b39dc12a2b086f5f87jo  prometheus-metrics-core/pom.xmljo  modifiedjo  Kjo  Kjp  Kjp  yhttps://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-core%2Fpom.xmljp  xhttps://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-core%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X  @@ -12,9 +12,9 @@
     <artifactId>prometheus-metrics-core</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient</name>
+    <name>Prometheus Metrics Core</name>
     <description>
-        Core instrumentation library for the simpleclient.
+        Core Prometheus metric types
     </description>
 
     <licenses>
@@ -29,15 +29,11 @@
         <developer>
             <id>fstab</id>
             <name>Fabian Stäber</name>
-            <email>fabian@prometheus.io</email>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
-
     <dependencies>
-        <!-- The simpleclient has no required 3rd party runtime dependencies by design, so that
-             it can be included into any other project without having to worry about conflicts.
-             All transitive dependencies of tracer libraries are scoped as provided and optional at runtime. -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
@@ -60,18 +56,12 @@
             <scope>test</scope>
         </dependency>
 
-        <!-- Test Dependencies Follow -->
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.13.2</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.6.1</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>u}(jo  (a6038dd91dba826120715c7e078e7ce43c97945ajo  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljo  modifiedjo  K	jo  Kjp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  XG  @@ -11,9 +11,9 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient Servlet - Jakarta</name>
+    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
     <description>
-        HTTP servlet exporter for the simpleclient.
+        Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
 
     <licenses>
@@ -24,9 +24,13 @@
         </license>
     </licenses>
 
-    <properties>
-      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
 
     <dependencies>
         <dependency>u}(jo  (9de57e88c1af8a760a686bc89243e55a89a2457ajo  -prometheus-metrics-exposition-formats/pom.xmljo  modifiedjo  Kjo  Kjp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-exposition-formats%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-exposition-formats%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X  @@ -12,9 +12,9 @@
     <artifactId>prometheus-metrics-exposition-formats</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient</name>
+    <name>Prometheus Metrics Exposition Formats</name>
     <description>
-        Core instrumentation library for the simpleclient.
+        Prometheus exposition formats.
     </description>
 
     <licenses>
@@ -27,17 +27,13 @@
 
     <developers>
         <developer>
-            <id>brian-brazil</id>
-            <name>Brian Brazil</name>
-            <email>brian.brazil@boxever.com</email>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
         </developer>
     </developers>
 
-
     <dependencies>
-        <!-- The simpleclient has no required 3rd party runtime dependencies by design, so that
-             it can be included into any other project without having to worry about conflicts.
-             All transitive dependencies of tracer libraries are scoped as provided and optional at runtime. -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
@@ -54,24 +50,17 @@
             <version>${project.version}</version>
         </dependency>
 
-        <!-- Test Dependencies Follow -->
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.13.2</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-            <version>3.6.1</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
         <plugins>
-
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>uf      }(jo  (b1f06cc23e5501051fb14030bbfe6061380605b6jo   prometheus-metrics-model/pom.xmljo  modifiedjo  Kjo  Kjp  Kjp  zhttps://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-model%2Fpom.xmljp  yhttps://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-model%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X7  @@ -13,7 +13,9 @@
     <packaging>bundle</packaging>
 
     <name>Prometheus Metrics Model</name>
-    <description>Data model for read-only immutable Prometheus metrics snapshots.</description>
+    <description>
+        Data model for read-only immutable Prometheus metrics snapshots.
+    </description>
 
     <licenses>
         <license>
@@ -31,8 +33,8 @@
         </developer>
     </developers>
 
-
     <dependencies>
+        <!-- test dependencies -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>u}(jo  (f8e9ed1d30b72e989873e68fcb3e47947738c37ejo  !prometheus-metrics-tracer/pom.xmljo  modifiedjo  Kjo  K
jp  Kjp  {https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fpom.xmljp  zhttps://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  Xb  @@ -11,26 +11,37 @@
   <artifactId>prometheus-metrics-tracer</artifactId>
   <packaging>pom</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Parent</name>
+  <name>Prometheus Metrics Tracer</name>
+  <description>
+    Parent for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencyManagement>
     <dependencies>
       <dependency>
         <groupId>io.opentelemetry</groupId>
         <artifactId>opentelemetry-api</artifactId>
-        <version>1.15.0</version>
+        <version>1.28.0</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
 
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-
   <modules>
     <module>prometheus-metrics-tracer-common</module>
     <module>prometheus-metrics-tracer-initializer</module>u}(jo  (2bd042af919c6581d56c682462cc70f7087728f4jo  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljo  modifiedjo  Kjo  Kjp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X  @@ -11,10 +11,10 @@
   <artifactId>prometheus-metrics-tracer-common</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Common</name>
-
-  <dependencies>
-  </dependencies>
+  <name>Prometheus Metrics Tracer Common</name>
+  <description>
+    Common Module for Prometheus integrations with distributed tracing libraries.
+  </description>
 
   <licenses>
     <license>
@@ -23,4 +23,12 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 </project>u}(jo  (ec939e20e9255d37cbc7560f38c7c70357b256bdjo  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljo  modifiedjo  Kjo  K	jp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  Xb  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - Common</name>
+  <name>Prometheus Metrics Tracer Initializer</name>
+  <description>
+    Initialize Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -30,12 +49,4 @@
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>u}(jo  (e24405186b4bca359cf017f6674d9d49a7219d42jo  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljo  modifiedjo  Kjo  K	jp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X[  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - OpenTelemetry Agent</name>
+  <name>Prometheus Metrics Tracer OpenTelemetry Agent</name>
+  <description>
+    Prometheus integration with the OpenTelemetry Java agent for distributed tracing.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -56,12 +75,4 @@
       </plugin>
     </plugins>
   </build>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>u}(jo  (6ee789fdf7f61da9eedc33f7d650ebffe5e733e3jo  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljo  modifiedjo  Kjo  K	jp  Kjp  https://github.com/prometheus/client_java/blob/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljp  https://github.com/prometheus/client_java/raw/6b0a34b3ae21e543752751c809faaca4add7cf1b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=6b0a34b3ae21e543752751c809faaca4add7cf1bjp  X\  @@ -11,7 +11,26 @@
   <artifactId>prometheus-metrics-tracer-otel</artifactId>
   <packaging>bundle</packaging>
 
-  <name>Prometheus Java Span Context Supplier - OpenTelemetry</name>
+  <name>Prometheus Metrics Tracer OpenTelemetry</name>
+  <description>
+    Prometheus integration with the OpenTelemetry distributed tracing library.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
 
   <dependencies>
     <dependency>
@@ -26,12 +45,4 @@
       <optional>true</optional>
     </dependency>
   </dependencies>
-
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
 </project>ueu(901b014c9c8ba1fc20a5b2027c2b665980915dfa}(sha(901b014c9c8ba1fc20a5b2027c2b665980915dfanode_idEC_kwDOAHoJt9oAKDkwMWIwMTRjOWM4YmExZmMyMGE1YjIwMjdjMmI2NjU5ODA5MTVkZmEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-02T21:16:09Zu	committer}(j~p  Fabian Stäberjp  fabian@fstab.dejp  2023-07-02T21:16:09ZumessageAdd JavaDoc for histogramtree}(jvp  (c1455a184769316991de1553ff64b9a2cafc8b75urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c1455a184769316991de1553ff64b9a2cafc8b75ujp  hhttps://api.github.com/repos/prometheus/client_java/git/commits/901b014c9c8ba1fc20a5b2027c2b665980915dfa
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujp  dhttps://api.github.com/repos/prometheus/client_java/commits/901b014c9c8ba1fc20a5b2027c2b665980915dfahtml_urlYhttps://github.com/prometheus/client_java/commit/901b014c9c8ba1fc20a5b2027c2b665980915dfacomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/901b014c9c8ba1fc20a5b2027c2b665980915dfa/commentsj|p  }(loginfstabidJ' jxp  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jp  "https://api.github.com/users/fstabjp  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujp  }(jp  fstabjp  J' jxp  MDQ6VXNlcjMzMDUzNQ==jp  2https://avatars.githubusercontent.com/u/330535?v=4jp  h3jp  "https://api.github.com/users/fstabjp  https://github.com/fstabjp  ,https://api.github.com/users/fstab/followersjp  9https://api.github.com/users/fstab/following{/other_user}jp  2https://api.github.com/users/fstab/gists{/gist_id}jp  9https://api.github.com/users/fstab/starred{/owner}{/repo}jp  0https://api.github.com/users/fstab/subscriptionsjp  'https://api.github.com/users/fstab/orgsjp  (https://api.github.com/users/fstab/reposjp  3https://api.github.com/users/fstab/events{/privacy}jp  2https://api.github.com/users/fstab/received_eventsjp  Userjp  uparents]}(jvp  (c45dd350414a4a980e7058aaa9da9bd668090170jp  dhttps://api.github.com/repos/prometheus/client_java/commits/c45dd350414a4a980e7058aaa9da9bd668090170jp  Yhttps://github.com/prometheus/client_java/commit/c45dd350414a4a980e7058aaa9da9bd668090170uastats}(totalK	additionsK	deletionsK@ufiles](}(jvp  (f08ccae9cb6e7c50848aad86a16d292e11c2aacefilenamefprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DistributionDataPoint.javastatusmodifiedjp  Kjp  KchangesK$blob_urlhttps://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javaraw_urlhttps://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfapatchXb  @@ -2,15 +2,35 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 
-import java.util.concurrent.Callable;
+/**
+ * Represents a single data point of a histogram or a summary metric.
+ * <p>
+ * Single data point means identified label values like {@code {method="GET", path="/", status_code="200"}},
+ * ignoring the {@code "le"} label for histograms or the {@code "quantile"} label for summaries.
+ * <p>
+ * This interface is named <i>DistributionDataPoint</i> because both histograms and summaries are used to observe
+ * distributions, like latency distributions or distributions of request sizes. Therefore
+ * <i>DistributionDataPoint</i> is a good name for a common interface implemented by histogram data points
+ * and summary data points.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface DistributionDataPoint extends DataPoint, TimerApi {
 
-public interface DistributionDataPoint extends DataPoint {
-    void observe(double amount);
-    default void observeWithExemplar(double amount) {
-        observeWithExemplar(amount, Labels.EMPTY);
-    }
-    void observeWithExemplar(double amount, Labels labels);
-    default void time(Callable<?> callable) {
+    /**
+     * Observe {@code value}.
+     */
+    void observe(double value);
+
+    /**
+     * Observe {@code value}, and create a custom exemplar with the given labels.
+     */
+    void observeWithExemplar(double value, Labels labels);
 
+    /**
+     * {@inheritDoc}
+     */
+    default Timer startTimer() {
+        return new Timer(this::observe);
     }
 }u}(jvp  (fd646186904c93dca51b560f1b8f3ed2f74ef5cajp  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/Timer.javajp  modifiedjp  Kjp  Kjp  Kjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X  @@ -1,5 +1,7 @@
 package io.prometheus.metrics.core.datapoints;
 
+import io.prometheus.metrics.model.snapshots.Unit;
+
 import java.io.Closeable;
 import java.util.function.DoubleConsumer;
 
@@ -8,7 +10,6 @@
  */
 public class Timer implements Closeable {
 
-    private static final double NANOSECONDS_PER_SECOND = 1E9;
     private final DoubleConsumer observeFunction;
     private final long startTimeNanos = System.nanoTime();
 
@@ -21,10 +22,10 @@ public class Timer implements Closeable {
 
     /**
      * Records the observed duration in seconds since this {@code Timer} instance was created.
-     * @return the observed duration.
+     * @return the observed duration in seconds.
      */
     public double observeDuration() {
-        double elapsed = (System.nanoTime() - startTimeNanos) / NANOSECONDS_PER_SECOND;
+        double elapsed = Unit.nanosToSeconds(System.nanoTime() - startTimeNanos);
         observeFunction.accept(elapsed);
         return elapsed;
     }u}(jvp  (a38c8053b561799bc0fbcefd42014f0313b51db1jp  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/TimerApi.javajp  modifiedjp  Kjp  K	jp  K'jp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  Xj  @@ -4,26 +4,49 @@
 import java.util.function.Supplier;
 
 /**
- * Convenience API for timing the duration of method calls.
+ * Convenience API for timing durations.
  * <p>
- * All times are recorded in seconds, as Prometheus mandates seconds as the base unit.
+ * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+ * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
  */
 public interface TimerApi {
 
     /**
      * Start a {@code Timer}. Example:
      * <pre>{@code
-     * try (Timer timer = dataPoint.startTimer) {
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("http_request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * try (Timer timer = histogram.withLabelValues("GET", "/").startTimer()) {
      *     // duration of this code block will be observed.
      * }
      * }</pre>
-     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
      */
     Timer startTimer();
 
     /**
-     * Observe the duration of the {@code func} call.
-     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
+     * Observe the duration of the {@code func} call. Example:
+     * <pre>{@code
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * histogram2.withLabelValues("GET", "/").time(() -> {
+     *     // duration of this code block will be observed.
+     * });
+     * }</pre>
+     * <p>
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
      */
     default void time(Runnable func) {
         try (Timer timer = startTimer()) {
@@ -32,9 +55,7 @@ default void time(Runnable func) {
     }
 
     /**
-     * Observe the duration of the {@code func} call.
-     * The duration is recorded in seconds, as Prometheus mandates seconds as the base unit.
-     * @return the return value of {@code func}.
+     * Like {@link #time(Runnable)}, but returns the return value of {@code func}.
      */
     default <T> T time(Supplier<T> func) {
         try (Timer timer = startTimer()) {u}(jvp  (119d98fe4b825e047a9c2d7dcf073a022c380647jp  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javajp  modifiedjp  Kjp  Kjp  Kjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X  @@ -18,12 +18,12 @@ class Buffer {
     private final Object appendLock = new Object();
     private final Object runLock = new Object();
 
-    boolean append(double amount) {
+    boolean append(double value) {
         long count = observationCount.incrementAndGet();
         if ((count & signBit) == 0) {
             return false; // sign bit not set -> buffer not active.
         } else {
-            doAppend(amount);
+            doAppend(value);
             return true;
         }
     }u}(jvp  (1f562f44e0292ff9b4c9de0aab938eb9d0461818jp  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajp  modifiedjp  K1jp  Kjp  KFjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X1  @@ -27,15 +27,30 @@
 import java.util.concurrent.atomic.LongAdder;
 
 /**
+ * Histogram metric. Example usage:
+ * <pre>{@code
+ * Histogram histogram = Histogram.newBuilder()
+ *         .withName("http_request_duration_seconds")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // do something
+ * histogram.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
  * Prometheus supports two internal representations of histograms:
  * <ol>
  *     <li><i>Classic Histograms</i> have a fixed number of buckets with fixed bucket boundaries.</li>
  *     <li><i>Native Histograms</i> have an infinite number of buckets with a dynamic resolution.
  *         Prometheus native histograms are the same as OpenTelemetry's exponential histograms.</li>
  * </ol>
- * By default, a histogram maintains both representations. Exposition format "Text" uses the classic histogram,
- * exposition format "Protobuf" uses both representations. This is great for migrating from classic histograms
- * to native histograms.
+ * By default, a histogram maintains both representations, i.e. the example above will maintain a classic
+ * histogram representation with Prometheus' default bucket boundaries as well as native histogram representation.
+ * Which representation is used depends on the exposition format, i.e. which content type the Prometheus server
+ * accepts when scraping. Exposition format "Text" exposes the classic histogram, exposition format "Protobuf"
+ * exposes both representations. This is great for migrating from classic histograms to native histograms.
  * <p>
  * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
  * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
@@ -134,6 +149,22 @@ private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProp
                 new ExemplarSamplerConfig(exemplarProperties, classicUpperBounds);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
     @Override
     protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
@@ -166,20 +197,26 @@ private DataPoint() {
             maybeScheduleNextReset();
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
-        public void observe(double amount) {
-            if (Double.isNaN(amount)) {
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
                 // See https://github.com/prometheus/client_golang/issues/1275 on ignoring NaN observations.
                 return;
             }
-            if (!buffer.append(amount)) {
-                doObserve(amount, false);
+            if (!buffer.append(value)) {
+                doObserve(value, false);
             }
             if (isExemplarsEnabled()) {
-                exemplarSampler.observe(amount);
+                exemplarSampler.observe(value);
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void observeWithExemplar(double value, Labels labels) {
             if (Double.isNaN(value)) {
@@ -225,7 +262,7 @@ private void doObserve(double value, boolean fromBuffer) {
             }
         }
 
-        public HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
+        private HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
             Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
@@ -561,6 +598,9 @@ private void maybeScheduleNextReset() {
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public HistogramSnapshot collect() {
         return (HistogramSnapshot) super.collect();
@@ -575,17 +615,6 @@ protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricD
         return new HistogramSnapshot(getMetadata(), data);
     }
 
-
-    @Override
-    public void observe(double amount) {
-        getNoLabels().observe(amount);
-    }
-
-    @Override
-    public void observeWithExemplar(double amount, Labels labels) {
-        getNoLabels().observeWithExemplar(amount, labels);
-    }
-
     @Override
     protected DataPoint newDataPoint() {
         return new DataPoint();
@@ -620,7 +649,6 @@ public static Builder newBuilder(PrometheusProperties config) {
 
     public static class Builder extends StatefulMetric.Builder<Histogram.Builder, Histogram> {
 
-        private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
         public static final double[] DEFAULT_CLASSIC_UPPER_BOUNDS = new double[]{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10};
         private final double DEFAULT_NATIVE_MIN_ZERO_THRESHOLD = Math.pow(2.0, -128);
         private final double DEFAULT_NATIVE_MAX_ZERO_THRESHOLD = Math.pow(2.0, -128);u}(jvp  (7c1b212b001c3fc9154ef4a9f1e34c93bd7ebd37jp  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajp  modifiedjp  Kjp  Kjp  Kjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X  @@ -65,7 +65,7 @@ public MetricSnapshot collect() {
     public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
-                throw new IllegalArgumentException("The " + getClass().getSimpleName() + " was created with label names, so you must call withLabelValues() when using it.");
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
             } else {
                 throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }u}(jvp  (d1a899b878005321f7c04f06414b445011deaa2ejp  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TmpTest.javajp  modifiedjp  K0jp  Kjp  KCjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X  @@ -17,6 +17,8 @@
 import java.util.Collections;
 import java.util.function.Consumer;
 
+import static io.prometheus.metrics.model.snapshots.Unit.SECONDS;
+
 public class TmpTest {
 
     static Consumer<CounterWithCallback.Callback> messageCountCallback = callback -> {
@@ -40,26 +42,49 @@ private static double getErroneousMessageCount() {
             .withLabelNames("region")
             .register();
 
-    public static void login (String region){
+    public static void login(String region) {
         currentActiveUsers.withLabelValues(region).inc();
         // perform login
     }
 
-    public static void logout (String region){
+    public static void logout(String region) {
         currentActiveUsers.withLabelValues(region).dec();
         // perform logout
     }
 
     public static void main(String[] args) throws Exception {
 
+        Histogram histogram = Histogram.newBuilder()
+                .withName("http_request_duration_seconds")
+                .withHelp("HTTP request service time in seconds")
+                .withUnit(SECONDS)
+                .withLabelNames("method", "path", "status_code")
+                .register();
+
+        long start = System.nanoTime();
+        // do something
+        histogram.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+
+        Histogram histogram2 = Histogram.newBuilder()
+                .withName("request_duration_seconds")
+                .withHelp("HTTP request service time in seconds")
+                .withUnit(SECONDS)
+                .withLabelNames("method", "path")
+                .register();
+
+        histogram2.withLabelValues("GET", "/").time(() -> {
+            // sdflkj
+        });
+
+
         login("us");
         login("us");
         logout("us");
 
         Gauge latestBatchJobDuration = Gauge.newBuilder()
                 .withName("latest_backup_duration_seconds")
                 .withHelp("Duration of the latest backup run in seconds.")
-                .withUnit(Unit.SECONDS)
+                .withUnit(SECONDS)
                 .withLabelNames("env")
                 .register();
         try (Timer timer = latestBatchJobDuration.withLabelValues("prod").startTimer()) {
@@ -68,11 +93,15 @@ public static void main(String[] args) throws Exception {
             throw new RuntimeException(e);
         }
 
-        latestBatchJobDuration.time(() -> System.out.println("hi"));
+        latestBatchJobDuration.withLabelValues("prod").time(() -> System.out.println("hi"));
 
-        latestBatchJobDuration.time(() -> {return 1 + 2;});
+        latestBatchJobDuration.withLabelValues("prod").time(() -> {
+            return 1 + 2;
+        });
 
-        latestBatchJobDuration.timeChecked(() -> {return 1 + 2;});
+        latestBatchJobDuration.withLabelValues("prod").timeChecked(() -> {
+            return 1 + 2;
+        });
         /*
 
         JVM_GC_COLLECTION_SECONDS,
@@ -81,10 +110,10 @@ public static void main(String[] args) throws Exception {
          */
         double MILLISECONDS_PER_SECOND = 1E3;
 
-             SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
+        SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
                 .withName("jvm_gc_collection_seconds")
                 .withHelp("Time spent in a given JVM garbage collector in seconds.")
-                .withUnit(Unit.SECONDS)
+                .withUnit(SECONDS)
                 .withLabelNames("gc")
                 .withCallback(callback -> {
                     for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
@@ -98,7 +127,7 @@ public static void main(String[] args) throws Exception {
                 })
                 .build();
 
-             Runtime.getRuntime().gc();
+        Runtime.getRuntime().gc();
         /*
         GaugeMetricFamily used = new GaugeMetricFamily(
                 JVM_MEMORY_BYTES_USED,
@@ -111,7 +140,7 @@ public static void main(String[] args) throws Exception {
 
         MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
 
-             GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
+        GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
                 .withName("jvm_memory_bytes_used")
                 .withHelp("Used bytes of a given JVM memory area.")
                 .withUnit(Unit.BYTES)
@@ -122,23 +151,23 @@ public static void main(String[] args) throws Exception {
                 })
                 .build();
 
-             CounterWithCallback messageCount = CounterWithCallback.newBuilder()
+        CounterWithCallback messageCount = CounterWithCallback.newBuilder()
                 .withName("messages_total")
                 .withLabelNames("status")
                 .withConstLabels(Labels.of("staus", "b"))
                 .withCallback(messageCountCallback)
                 .build();
 
-             ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
-             CounterWithCallback counter = CounterWithCallback.newBuilder()
+        ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+        CounterWithCallback counter = CounterWithCallback.newBuilder()
                 .withName("classes_loaded_total")
                 .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
                 .build();
-             CounterSnapshot sn = messageCount.collect();
-             GaugeSnapshot sn2 = memoryBytesUsed.collect();
-             SummarySnapshot sn3 = gcSeconds.collect();
-             PrometheusRegistry r = PrometheusRegistry.defaultRegistry;
-             MetricSnapshots s = r.scrape();
-             System.out.println(sn2);
+        CounterSnapshot sn = messageCount.collect();
+        GaugeSnapshot sn2 = memoryBytesUsed.collect();
+        SummarySnapshot sn3 = gcSeconds.collect();
+        PrometheusRegistry r = PrometheusRegistry.defaultRegistry;
+        MetricSnapshots s = r.scrape();
+        System.out.println(sn2);
     }
 }u}(jvp  (ac5f6d97f4592590eefcd0d013d30b35f6c0e488jp  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajp  modifiedjp  Kjp  Kjp  Kjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X  @@ -884,7 +884,7 @@ public void testCustomExemplarsClassicHistogram() throws InterruptedException, N
         assertExemplar(histogram, 0.5, "key", "value");
 
         Thread.sleep(sampleIntervalMillis * 3 + 1);
-        histogram.observeWithExemplar(0.5);
+        histogram.observeWithExemplar(0.5, Labels.EMPTY);
         assertExemplar(histogram, 0.5);
 
         Thread.sleep(sampleIntervalMillis * 3 + 1);u}(jvp  (515608a290d0621ba7453d6602f5f014ff507cbbjp  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Unit.javajp  modifiedjp  Kjp  K jp  Kjp  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajp  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javajp  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfajp  X(  @@ -30,4 +30,12 @@ public Unit(String name) {
     public String toString() {
         return name;
     }
+
+    public static double nanosToSeconds(long nanos) {
+        return nanos / 1E9;
+    }
+
+    public static double millisToSeconds(long nanos) {
+        return nanos / 1E3;
+    }
 }ueu(aa4d66886520565c5a22bc96e3c24a3028f910f1}(sha(aa4d66886520565c5a22bc96e3c24a3028f910f1node_idEC_kwDOAHoJt9oAKGFhNGQ2Njg4NjUyMDU2NWM1YTIyYmM5NmUzYzI0YTMwMjhmOTEwZjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-26T22:12:37Zu	committer}(j3q  Fabian Stäberj5q  fabian@fstab.dej7q  2023-08-26T22:12:37Zumessage&Add Gauge support to the OTel exportertree}(j+q  (4b8ba75c12b97a9bb97cf0d05f569ed5621e374furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/4b8ba75c12b97a9bb97cf0d05f569ed5621e374fujCq  hhttps://api.github.com/repos/prometheus/client_java/git/commits/aa4d66886520565c5a22bc96e3c24a3028f910f1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujCq  dhttps://api.github.com/repos/prometheus/client_java/commits/aa4d66886520565c5a22bc96e3c24a3028f910f1html_urlYhttps://github.com/prometheus/client_java/commit/aa4d66886520565c5a22bc96e3c24a3028f910f1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/aa4d66886520565c5a22bc96e3c24a3028f910f1/commentsj1q  }(loginfstabidJ' j-q  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jCq  "https://api.github.com/users/fstabjOq  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj9q  }(jTq  fstabjVq  J' j-q  MDQ6VXNlcjMzMDUzNQ==jXq  2https://avatars.githubusercontent.com/u/330535?v=4jZq  h3jCq  "https://api.github.com/users/fstabjOq  https://github.com/fstabj]q  ,https://api.github.com/users/fstab/followersj_q  9https://api.github.com/users/fstab/following{/other_user}jaq  2https://api.github.com/users/fstab/gists{/gist_id}jcq  9https://api.github.com/users/fstab/starred{/owner}{/repo}jeq  0https://api.github.com/users/fstab/subscriptionsjgq  'https://api.github.com/users/fstab/orgsjiq  (https://api.github.com/users/fstab/reposjkq  3https://api.github.com/users/fstab/events{/privacy}jmq  2https://api.github.com/users/fstab/received_eventsjoq  Userjqq  uparents]}(j+q  (a9efe238980887ec71ad324df14251516629662fjCq  dhttps://api.github.com/repos/prometheus/client_java/commits/a9efe238980887ec71ad324df14251516629662fjOq  Yhttps://github.com/prometheus/client_java/commit/a9efe238980887ec71ad324df14251516629662fuastats}(totalK?	additionsK?	deletionsK ufiles](}(j+q  (cecec645006b60fc5f12936d32b3fc125d27a26afilenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedjq  Kjq  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/aa4d66886520565c5a22bc96e3c24a3028f910f1/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/aa4d66886520565c5a22bc96e3c24a3028f910f1/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=aa4d66886520565c5a22bc96e3c24a3028f910f1patchX  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.examples.opentelemetry;
 
 import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
 import io.prometheus.metrics.model.snapshots.Unit;
 
@@ -17,6 +18,16 @@ public static void main(String[] args) throws Exception {
                 .withUnit(Unit.SECONDS)
                 .register();
 
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
         OpenTelemetryExporter.newBuilder()
                 .withIntervalSeconds(5)
                 .buildAndStart();u}(j+q  (d8832d492867f92422125fa34863ab09cbd8d254jq  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajq  modifiedjq  Kjq  K jq  Kjq  https://github.com/prometheus/client_java/blob/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajq  https://github.com/prometheus/client_java/raw/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajq  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=aa4d66886520565c5a22bc96e3c24a3028f910f1jq  Xf  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
@@ -34,7 +35,10 @@ public Collection<MetricData> collectAllMetrics() {
         for (MetricSnapshot snapshot : snapshots) {
             if (snapshot instanceof CounterSnapshot) {
                 result.add(factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                result.add(factory.create((GaugeSnapshot) snapshot));
             }
+
         }
         return result;
     }u}(j+q  (4dcc86dbd9c1fd76fb89db8370ff89382f34c980jq  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajq  modifiedjq  Kjq  K jq  Kjq  https://github.com/prometheus/client_java/blob/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajq  https://github.com/prometheus/client_java/raw/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajq  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=aa4d66886520565c5a22bc96e3c24a3028f910f1jq  X  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
@@ -20,4 +21,8 @@ public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumenta
     public MetricData create(CounterSnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
 }u}(j+q  (0b1b1ce4f0ce1345ca311f6c0a2396526852b124jq  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javajq  addedjq  K+jq  K jq  K+jq  https://github.com/prometheus/client_java/blob/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajq  https://github.com/prometheus/client_java/raw/aa4d66886520565c5a22bc96e3c24a3028f910f1/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajq  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=aa4d66886520565c5a22bc96e3c24a3028f910f1jq  X6  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                startEpochNanos,
+                epochNanos,
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}ueu(32aec68ec774449de31105d1e9c50d35c3a418c1}(sha(32aec68ec774449de31105d1e9c50d35c3a418c1node_idEC_kwDOAHoJt9oAKDMyYWVjNjhlYzc3NDQ0OWRlMzExMDVkMWU5YzUwZDM1YzNhNDE4YzEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-03T09:19:42Zu	committer}(jq  Fabian Stäberjq  fabian@fstab.dejq  2023-07-03T09:19:42Zumessage!JavaDoc added to all metric typestree}(jq  (9b4ffdac4fd0ff333df67b0ccc633303c5aa0f94urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9b4ffdac4fd0ff333df67b0ccc633303c5aa0f94ujq  hhttps://api.github.com/repos/prometheus/client_java/git/commits/32aec68ec774449de31105d1e9c50d35c3a418c1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujq  dhttps://api.github.com/repos/prometheus/client_java/commits/32aec68ec774449de31105d1e9c50d35c3a418c1html_urlYhttps://github.com/prometheus/client_java/commit/32aec68ec774449de31105d1e9c50d35c3a418c1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/32aec68ec774449de31105d1e9c50d35c3a418c1/commentsjq  }(loginfstabidJ' jq  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jq  "https://api.github.com/users/fstabjq  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujq  }(jq  fstabjq  J' jq  MDQ6VXNlcjMzMDUzNQ==jq  2https://avatars.githubusercontent.com/u/330535?v=4jq  h3jq  "https://api.github.com/users/fstabjq  https://github.com/fstabjq  ,https://api.github.com/users/fstab/followersjq  9https://api.github.com/users/fstab/following{/other_user}jq  2https://api.github.com/users/fstab/gists{/gist_id}jq  9https://api.github.com/users/fstab/starred{/owner}{/repo}jq  0https://api.github.com/users/fstab/subscriptionsjq  'https://api.github.com/users/fstab/orgsjq  (https://api.github.com/users/fstab/reposjq  3https://api.github.com/users/fstab/events{/privacy}jq  2https://api.github.com/users/fstab/received_eventsjq  Userjq  uparents]}(jq  (901b014c9c8ba1fc20a5b2027c2b665980915dfajq  dhttps://api.github.com/repos/prometheus/client_java/commits/901b014c9c8ba1fc20a5b2027c2b665980915dfajq  Yhttps://github.com/prometheus/client_java/commit/901b014c9c8ba1fc20a5b2027c2b665980915dfauastats}(totalMT	additionsMR	deletionsMufiles](}(jq  (73b7dfdb32452efe88891712c49f9e1168183b4bfilenamebprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/StateSetDataPoint.javastatusmodifiedjr  Kjr  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javaraw_urlhttps://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1patchXL  @@ -1,12 +1,32 @@
 package io.prometheus.metrics.core.datapoints;
 
+/**
+ * Represents a single StateSet data point.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
 public interface StateSetDataPoint extends DataPoint {
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
     void setTrue(String state);
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
     void setFalse(String state);
 
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
     default void setTrue(Enum<?> state) {
         setTrue(state.toString());
     }
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
     default void setFalse(Enum<?> state) {
         setFalse(state.toString());
     }u}(jq  (0c8275356ec5df83cfb4c52c38ea4a46be7cc73bjr  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javaj r  modifiedjr  Kjr  K	j"r  K!j#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X  @@ -13,6 +13,22 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.LongSupplier;
 
+/**
+ * The ExemplarSampler selects Spans as exemplars.
+ * <p>
+ * There are two types of Exemplars: Regular exemplars are sampled implicitly if a supported tracing
+ * library is detected. Custom exemplars are provided explicitly in code, for example if a developer
+ * wants to make sure an Exemplar is created for a specific code path.
+ * <p>
+ * Spans will be marked as being an Exemplar by calling {@link SpanContext#markCurrentSpanAsExemplar()}.
+ * The tracer implementation should set a Span attribute to mark the current Span as an Exemplar.
+ * This attribute can be used by a trace sampling algorithm to make sure traces with Exemplars are sampled.
+ * <p>
+ * The ExemplarSample is rate-limited, so only a small fraction of Spans will be marked as Exemplars in
+ * an application with a large number of requests.
+ * <p>
+ * See {@link ExemplarSamplerConfig} for configuration options.
+ */
 public class ExemplarSampler {
 
     private final ExemplarSamplerConfig config;
@@ -64,15 +80,14 @@ public void reset() {
 
     public void observe(double value) {
         if (!acceptingNewExemplars.get()) {
-            return;
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
         }
         rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));
     }
 
     public void observeWithExemplar(double value, Labels labels) {
         if (!acceptingNewCustomExemplars.get()) {
-            // This is the hot path. This should be as efficient as possible.
-            return;
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
         }
         rateLimitedObserve(acceptingNewCustomExemplars, value, customExemplars, () -> doObserveWithExemplar(value, labels));
     }
@@ -100,7 +115,7 @@ private long doObserveWithUpperBounds(double value) {
         long now = System.currentTimeMillis();
         double[] upperBounds = config.getHistogramClassicUpperBounds();
         for (int i = 0; i < upperBounds.length; i++) {
-            if (upperBounds[i] >= value) {
+            if (value <= upperBounds[i]) {
                 Exemplar previous = exemplars[i];
                 if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
                     return updateExemplar(i, value, now);
@@ -188,7 +203,7 @@ private long doObserveWithExemplarWithUpperBounds(double value, Labels labels) {
         long now = System.currentTimeMillis();
         double[] upperBounds = config.getHistogramClassicUpperBounds();
         for (int i = 0; i < upperBounds.length; i++) {
-            if (upperBounds[i] > value) {
+            if (value <= upperBounds[i]) {
                 Exemplar previous = customExemplars[i];
                 if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
                     return updateCustomExemplar(i, value, labels, now);
@@ -197,7 +212,6 @@ private long doObserveWithExemplarWithUpperBounds(double value, Labels labels) {
                 }
             }
         }
-        // TODO will happen for +Inf observations
         return 0; // will never happen, as upperBounds contains +Inf
     }
 
@@ -268,7 +282,7 @@ private long durationUntilNextExemplarExpires(long now) {
 
     private long updateCustomExemplar(int index, double value, Labels labels, long now) {
         if (!labels.contains(Exemplar.TRACE_ID) && !labels.contains(Exemplar.SPAN_ID)) {
-            labels = labels.merge(newTraceLabels());
+            labels = labels.merge(doSampleExemplar());
         }
         customExemplars[index] = Exemplar.newBuilder()
                 .withValue(value)
@@ -279,7 +293,7 @@ private long updateCustomExemplar(int index, double value, Labels labels, long n
     }
 
     private long updateExemplar(int index, double value, long now) {
-        Labels traceLabels = newTraceLabels();
+        Labels traceLabels = doSampleExemplar();
         if (!traceLabels.isEmpty()) {
             exemplars[index] = Exemplar.newBuilder()
                     .withValue(value)
@@ -292,14 +306,15 @@ private long updateExemplar(int index, double value, long now) {
         }
     }
 
-    private Labels newTraceLabels() {
+    private Labels doSampleExemplar() {
         try {
             SpanContext spanContext = SpanContextSupplier.getSpanContext();
             if (spanContext != null) {
                 if (spanContext.isCurrentSpanSampled()) {
                     String spanId = spanContext.getCurrentSpanId();
                     String traceId = spanContext.getCurrentTraceId();
                     if (spanId != null && traceId != null) {
+                        spanContext.markCurrentSpanAsExemplar();
                         return Labels.of(Exemplar.TRACE_ID, traceId, Exemplar.SPAN_ID, spanId);
                     }
                 }u}(jq  (390a2bc2b436590fa604ffe4ec1387fe993651bbjr  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javaj r  modifiedjr  Kjr  K j"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X{  @@ -8,6 +8,12 @@
 import java.util.function.Function;
 import java.util.function.Supplier;
 
+/**
+ * Metrics support concurrent write and scrape operations.
+ * <p>
+ * This is implemented by switching to a Buffer when the scrape starts,
+ * and applying the values from the buffer after the scrape ends.
+ */
 class Buffer {
 
     private static final long signBit = 1L << 63;u}(jq  (3eea94ba94830e18a3a1ad300d4b7e181ebaececjr  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javaj r  modifiedjr  Kjr  K j"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X:  @@ -685,6 +685,9 @@ protected MetricProperties toProperties() {
                     .build();
         }
 
+        /**
+         * Default properties for histogram metrics.
+         */
         @Override
         public MetricProperties getDefaultProperties() {
             return MetricProperties.newBuilder()u}(jq  (f97f616adf9648e603f70cda73d08b1008d5509ajr  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj r  modifiedjr  KDjr  Kj"r  KWj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java+      j'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X  @@ -6,31 +6,69 @@
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.Unit;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
-
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * Info metric. Example:
+ * <pre>{@code
+ * Info info = Info.newBuilder()
+ *         .withName("java_runtime_info")
+ *         .withHelp("Java runtime info")
+ *         .withLabelNames("env", "version", "vendor", "runtime")
+ *         .register();
+ *
+ * String version = System.getProperty("java.runtime.version", "unknown");
+ * String vendor = System.getProperty("java.vm.vendor", "unknown");
+ * String runtime = System.getProperty("java.runtime.name", "unknown");
+ *
+ * info.infoLabelValues("prod", version, vendor, runtime);
+ * info.infoLabelValues("dev", version, vendor, runtime);
+ * }</pre>
+ */
 public class Info extends MetricWithFixedMetadata {
 
-    private volatile Labels labels = Labels.EMPTY;
+    private final List<Labels> labels = new CopyOnWriteArrayList<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
-    public void info(Labels labels) {
-        // throws NPE if labels == null
-        for (Label label : labels) {
-            for (Label constLabel : constLabels) {
-                if (constLabel.getName().equals(label.getName())) {
-                    throw new IllegalArgumentException("Can't set label " + label.getName() + " because this label name is already used as a const Label.");
-                }
+    /**
+     * Create an info data point with the given label values.
+     */
+    public void infoLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }
         }
-        this.labels = labels;
+        labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public InfoSnapshot collect() {
-        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoDataPointSnapshot(labels.merge(constLabels))));
+        List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        }
+        return new InfoSnapshot(getMetadata(), data);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
     }
 
     public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {
@@ -39,6 +77,22 @@ private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
+        /**
+         * The {@code _info} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Info info1 = Info.newBuilder()
+         *     .withName("runtime_info")
+         *     .build();
+         * Info info2 = Info.newBuilder()
+         *     .withName("runtime")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
         @Override
         public Builder withName(String name) {
             if (name != null && name.endsWith("_info")) {
@@ -47,6 +101,9 @@ public Builder withName(String name) {
             return super.withName(name);
         }
 
+        /**
+         * Throws an {@link UnsupportedOperationException} because Info metrics cannot have a unit.
+         */
         @Override
         public Builder withUnit(Unit unit) {
             throw new UnsupportedOperationException("Info metrics cannot have a unit.");
@@ -69,12 +126,4 @@ protected Builder self() {
             return this;
         }
     }
-
-    public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.get());
-    }
-
-    public static Builder newBuilder(PrometheusProperties config) {
-        return new Builder(config);
-    }
 }u}(jq  (fccdcbd28d3c3050e945cdd249e5a9f81fc59022jr  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj r  modifiedjr  Kjr  K j"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  @@ -10,6 +10,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
+/**
+ * Common base class for all metrics.
+ */
 public abstract class Metric implements Collector {
 
     protected final Labels constLabels;u}(jq  (f04153faf769cd14dd9e06dbb9a42ab5f369a058jr  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj r  modifiedjr  Kjr  K j"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X  @@ -8,6 +8,12 @@
 import java.util.Arrays;
 import java.util.List;
 
+/**
+ * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
+ * <p>
+ * An exception would be a metric that is a bridge to a 3rd party metric library, where the metric name
+ * has to be retrieved from the 3rd party metric library at scrape time.
+ */
 public abstract class MetricWithFixedMetadata extends Metric {
 
     private final MetricMetadata metadata;u}(jq  (7f0eadc3b5c8ad83b70228d8fbd513c03da26fe6jr  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj r  modifiedjr  KJjr  Kj"r  K]j#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  Xd  @@ -11,7 +11,42 @@
 import java.util.List;
 import java.util.stream.Stream;
 
-// experimental
+/**
+ * StateSet metric. Example:
+ * <pre>{@code
+ * public enum Feature {
+ *
+ *     FEATURE_1("feature1"),
+ *     FEATURE_2("feature2");
+ *
+ *     private final String name;
+ *
+ *     Feature(String name) {
+ *         this.name = name;
+ *     }
+ *
+ *     @Override
+ *     public String toString() {
+ *         return name;
+ *     }
+ * }
+ *
+ * public static void main(String[] args) {
+ *
+ *     StateSet stateSet = StateSet.newBuilder()
+ *             .withName("feature_flags")
+ *             .withHelp("Feature flags")
+ *             .withLabelNames("env")
+ *             .withStates(Feature.class)
+ *             .register();
+ *
+ *     stateSet.withLabelValues("dev").setFalse(FEATURE_1);
+ *     stateSet.withLabelValues("dev").setTrue(FEATURE_2);
+ * }
+ * }</pre>
+ * The example above shows how to use a StateSet with an enum.
+ * You don't have to use enum, you can use regular strings as well.
+ */
 public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
 
     private final boolean exemplarsEnabled;
@@ -29,11 +64,30 @@ private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public StateSetSnapshot collect() {
         return (StateSetSnapshot) super.collect();
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setTrue(String state) {
+        getNoLabels().setTrue(state);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setFalse(String state) {
+        getNoLabels().setFalse(state);
+    }
+
     @Override
     protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
         List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
@@ -53,28 +107,24 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    @Override
-    public void setTrue(String state) {
-        getNoLabels().setTrue(state);
-    }
-
-    @Override
-    public void setFalse(String state) {
-        getNoLabels().setFalse(state);
-    }
-
     class DataPoint implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
         private DataPoint() {
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void setTrue(String state) {
             set(state, true);
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public void setFalse(String state) {
             set(state, false);
@@ -91,6 +141,13 @@ private void set(String name, boolean value) {
         }
     }
 
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
 
     public static class Builder extends StatefulMetric.Builder<Builder, StateSet> {
 
@@ -100,10 +157,16 @@ private Builder(PrometheusProperties config) {
             super(Collections.emptyList(), config);
         }
 
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
         public Builder withStates(Class<? extends Enum<?>> enumClass) {
             return withStates(Stream.of(enumClass.getEnumConstants()).map(Enum::toString).toArray(String[]::new));
         }
 
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
         public Builder withStates(String... stateNames) {
             if (stateNames.length == 0) {
                 throw new IllegalArgumentException("states cannot be empty");
@@ -128,12 +191,4 @@ protected Builder self() {
             return this;
         }
     }
-
-    public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.get());
-    }
-
-    public static Builder newBuilder(PrometheusProperties config) {
-        return new Builder(config);
-    }
 }u}(jq  (050736aa2a69e387f1a3e3b02f2efe6abf6e27a0jr  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaj r  modifiedjr  K|jr  K j"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X-(  @@ -2,6 +2,8 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.Quantile;
@@ -16,12 +18,32 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
+/**
+ * Summary metric. Example:
+ * <pre>{@code
+ * Summary summary = Summary.newBuilder()
+ *         .withName("http_request_duration_seconds_hi")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .withQuantile(0.5, 0.01)
+ *         .withQuantile(0.95, 0.001)
+ *         .withQuantile(0.99, 0.001)
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // process a request, duration will be observed
+ * summary.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
+ * See {@link Summary.Builder} for configuration options.
+ */
 public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
 
-    private final boolean exemplarsEnabled;
-    private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
+    private final List<CKMSQuantiles.Quantile> quantiles; // May be empty, but cannot be null.
     private final long maxAgeSeconds;
     private final int ageBuckets;
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
 
     private Summary(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
@@ -30,6 +52,7 @@ private Summary(Builder builder, PrometheusProperties prometheusProperties) {
         this.quantiles = Collections.unmodifiableList(makeQuantiles(properties));
         this.maxAgeSeconds = getConfigProperty(properties, MetricProperties::getSummaryMaxAgeSeconds);
         this.ageBuckets = getConfigProperty(properties, MetricProperties::getSummaryNumberOfAgeBuckets);
+        this.exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 4);
     }
 
     private List<CKMSQuantiles.Quantile> makeQuantiles(MetricProperties[] properties) {
@@ -49,6 +72,25 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public SummarySnapshot collect() {
         return (SummarySnapshot) super.collect();
@@ -68,23 +110,14 @@ protected DataPoint newDataPoint() {
         return new DataPoint();
     }
 
-    @Override
-    public void observe(double amount) {
-        getNoLabels().observe(amount);
-    }
-
-    @Override
-    public void observeWithExemplar(double amount, Labels labels) {
-        getNoLabels().observeWithExemplar(amount, labels);
-    }
-
 
     public class DataPoint implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
         private final TimeWindowQuantiles quantileValues;
         private final Buffer buffer = new Buffer();
+        private final ExemplarSampler exemplarSampler;
 
         private final long createdTimeMillis = System.currentTimeMillis();
 
@@ -94,19 +127,43 @@ private DataPoint() {
             } else {
                 quantileValues = null;
             }
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
-        public void observe(double amount) {
-            if (!buffer.append(amount)) {
-                doObserve(amount);
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
             }
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
-        public void observeWithExemplar(double amount, Labels labels) {
-            // TODO: Exemplars for summaries not implemented yet
-            observe(amount);
+        public void observeWithExemplar(double value, Labels labels) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
         }
 
         private void doObserve(double amount) {
@@ -119,7 +176,7 @@ private void doObserve(double amount) {
             count.increment();
         }
 
-        public SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
+        private SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     // TODO Exemplars (are hard-coded as empty in the line below)
@@ -142,11 +199,25 @@ private Quantiles makeQuantiles() {
         }
     }
 
+    public static Summary.Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Summary.Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
 
     public static class Builder extends StatefulMetric.Builder<Summary.Builder, Summary> {
 
+        /**
+         * 5 minutes. See {@link #withMaxAgeSeconds(long)}.
+         */
         public static final long DEFAULT_MAX_AGE_SECONDS = TimeUnit.MINUTES.toSeconds(5);
-        public static final int DEFAULT_AGE_BUCKETS = 5;
+
+        /**
+         * 5. See {@link #withNumberOfAgeBuckets(int)}
+         */
+        public static final int DEFAULT_NUMBER_OF_AGE_BUCKETS = 5;
         private final List<CKMSQuantiles.Quantile> quantiles = new ArrayList<>();
         private Long maxAgeSeconds;
         private Integer ageBuckets;
@@ -155,7 +226,21 @@ private Builder(PrometheusProperties properties) {
             super(Collections.singletonList("quantile"), properties);
         }
 
-        public Builder quantile(double quantile, double error) {
+        /**
+         * Example: The following will track the 0.95 quantile:
+         * <pre>{@code
+         * .withQuantile(0.95, 0.001)
+         * }</pre>
+         * The second argument is the acceptable error margin, i.e. with the code above the quantile
+         * will not be exactly the 0.95 quantile but something between 0.949 and 0.951.
+         * <p>
+         * There are two special cases:
+         * <ul>
+         *     <li>{@code .withQuantile(0.0, 0.0)} gives you the minimum observed value</li>
+         *     <li>{@code .withQuantile(1.0, 0.0)} gives you the maximum observed value</li>
+         * </ul>
+         */
+        public Builder withQuantile(double quantile, double error) {
             if (quantile < 0.0 || quantile > 1.0) {
                 throw new IllegalArgumentException("Quantile " + quantile + " invalid: Expected number between 0.0 and 1.0.");
             }
@@ -166,15 +251,27 @@ public Builder quantile(double quantile, double error) {
             return this;
         }
 
-        public Builder maxAgeSeconds(long maxAgeSeconds) {
+        /**
+         * The quantiles are relative to a moving time window.
+         * {@code maxAgeSeconds} is the size of that time window.
+         * Default is {@link #DEFAULT_MAX_AGE_SECONDS}.
+         */
+        public Builder withMaxAgeSeconds(long maxAgeSeconds) {
             if (maxAgeSeconds <= 0) {
                 throw new IllegalArgumentException("maxAgeSeconds cannot be " + maxAgeSeconds);
             }
             this.maxAgeSeconds = maxAgeSeconds;
             return this;
         }
 
-        public Builder ageBuckets(int ageBuckets) {
+        /**
+         * The quantiles are relative to a moving time window.
+         * The {@code numberOfAgeBuckets} defines how smoothly the time window moves forward.
+         * For example, if the time window is 5 minutes and has 5 age buckets,
+         * then it is moving forward every minute by one minute.
+         * Default is {@link #DEFAULT_NUMBER_OF_AGE_BUCKETS}.
+         */
+        public Builder withNumberOfAgeBuckets(int ageBuckets) {
             if (ageBuckets <= 0) {
                 throw new IllegalArgumentException("ageBuckets cannot be " + ageBuckets);
             }
@@ -203,11 +300,14 @@ protected MetricProperties toProperties() {
                     .build();
         }
 
+        /**
+         * Default properties for summary metrics.
+         */
         @Override
         public MetricProperties getDefaultProperties() {
             return MetricProperties.newBuilder()
                     .withExemplarsEnabled(true)
-                    .withSummaryNumberOfAgeBuckets(DEFAULT_AGE_BUCKETS)
+                    .withSummaryNumberOfAgeBuckets(DEFAULT_NUMBER_OF_AGE_BUCKETS)
                     .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)
                     .build();
         }
@@ -222,12 +322,4 @@ protected Builder self() {
             return this;
         }
     }
-
-    public static Summary.Builder newBuilder() {
-        return new Builder(PrometheusProperties.get());
-    }
-
-    public static Summary.Builder newBuilder(PrometheusProperties config) {
-        return new Builder(config);
-    }
 }u}(jq  (4bd0be7ee9d7946f2d28469f63b8f46587562725jr  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TimeWindowQuantiles.javaj r  modifiedjr  Kjr  Kj"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTimeWindowQuantiles.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X  @@ -5,8 +5,8 @@
 import java.util.concurrent.TimeUnit;
 
 /**
- * Wrapper around CKMSQuantiles.
- *
+ * Wrapper around {@link CKMSQuantiles}.
+ * <p>
  * Maintains a ring buffer of CKMSQuantiles to provide quantiles over a sliding windows of time.
  */
 class TimeWindowQuantiles {u}(jq  (d1a899b878005321f7c04f06414b445011deaa2ejr  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TmpTest.javaj r  removedjr  K jr  Kj"r  Kj#r  https://github.com/prometheus/client_java/blob/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj%r  https://github.com/prometheus/client_java/raw/901b014c9c8ba1fc20a5b2027c2b665980915dfa/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.java?ref=901b014c9c8ba1fc20a5b2027c2b665980915dfaj)r  XP  @@ -1,173 +0,0 @@
-package io.prometheus.metrics.core.metrics;
-
-import io.prometheus.metrics.core.datapoints.Timer;
-import io.prometheus.metrics.model.registry.PrometheusRegistry;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-import io.prometheus.metrics.model.snapshots.Quantiles;
-import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.model.snapshots.Unit;
-
-import java.lang.management.ClassLoadingMXBean;
-import java.lang.management.GarbageCollectorMXBean;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.util.Collections;
-import java.util.function.Consumer;
-
-import static io.prometheus.metrics.model.snapshots.Unit.SECONDS;
-
-public class TmpTest {
-
-    static Consumer<CounterWithCallback.Callback> messageCountCallback = callback -> {
-        double successfulMessageCount = getSuccessfulMessageCount();
-        double erroneousMessageCount = getErroneousMessageCount();
-        callback.call(successfulMessageCount, "success");
-        callback.call(erroneousMessageCount, "error");
-    };
-
-    private static double getSuccessfulMessageCount() {
-        return 2.0;
-    }
-
-    private static double getErroneousMessageCount() {
-        return 8.0;
-    }
-
-    static Gauge currentActiveUsers = Gauge.newBuilder()
-            .withName("current_active_users")
-            .withHelp("Number of users that are currently active")
-            .withLabelNames("region")
-            .register();
-
-    public static void login(String region) {
-        currentActiveUsers.withLabelValues(region).inc();
-        // perform login
-    }
-
-    public static void logout(String region) {
-        currentActiveUsers.withLabelValues(region).dec();
-        // perform logout
-    }
-
-    public static void main(String[] args) throws Exception {
-
-        Histogram histogram = Histogram.newBuilder()
-                .withName("http_request_duration_seconds")
-                .withHelp("HTTP request service time in seconds")
-                .withUnit(SECONDS)
-                .withLabelNames("method", "path", "status_code")
-                .register();
-
-        long start = System.nanoTime();
-        // do something
-        histogram.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
-
-        Histogram histogram2 = Histogram.newBuilder()
-                .withName("request_duration_seconds")
-                .withHelp("HTTP request service time in seconds")
-                .withUnit(SECONDS)
-                .withLabelNames("method", "path")
-                .register();
-
-        histogram2.withLabelValues("GET", "/").time(() -> {
-            // sdflkj
-        });
-
-
-        login("us");
-        login("us");
-        logout("us");
-
-        Gauge latestBatchJobDuration = Gauge.newBuilder()
-                .withName("latest_backup_duration_seconds")
-                .withHelp("Duration of the latest backup run in seconds.")
-                .withUnit(SECONDS)
-                .withLabelNames("env")
-                .register();
-        try (Timer timer = latestBatchJobDuration.withLabelValues("prod").startTimer()) {
-            Thread.sleep(100);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
-
-        latestBatchJobDuration.withLabelValues("prod").time(() -> System.out.println("hi"));
-
-        latestBatchJobDuration.withLabelValues("prod").time(() -> {
-            return 1 + 2;
-        });
-
-        latestBatchJobDuration.withLabelValues("prod").timeChecked(() -> {
-            return 1 + 2;
-        });
-        /*
-
-        JVM_GC_COLLECTION_SECONDS,
-              "Time spent in a given JVM garbage collector in seconds.",
-              Collections.singletonList("gc"));
-         */
-        double MILLISECONDS_PER_SECOND = 1E3;
-
-        SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
-                .withName("jvm_gc_collection_seconds")
-                .withHelp("Time spent in a given JVM garbage collector in seconds.")
-                .withUnit(SECONDS)
-                .withLabelNames("gc")
-                .withCallback(callback -> {
-                    for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
-                        callback.call(
-                                gc.getCollectionCount(),
-                                gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
-                                Quantiles.EMPTY,
-                                gc.getName()
-                        );
-                    }
-                })
-                .build();
-
-        Runtime.getRuntime().gc();
-        /*
-        GaugeMetricFamily used = new GaugeMetricFamily(
-                JVM_MEMORY_BYTES_USED,
-                "Used bytes of a given JVM memory area.",
-                Collections.singletonList("area"));
-        used.addMetric(Collections.singletonList("heap"), heapUsage.getUsed());
-        used.addMetric(Collections.singletonList("nonheap"), nonHeapUsage.getUsed());
-        sampleFamilies.add(used);
-         */
-
-        MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
-
-        GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
-                .withName("jvm_memory_bytes_used")
-                .withHelp("Used bytes of a given JVM memory area.")
-                .withUnit(Unit.BYTES)
-                .withLabelNames("area")
-                .withCallback(callback -> {
-                    callback.call(memoryBean.getHeapMemoryUsage().getUsed(), "heap");
-                    callback.call(memoryBean.getNonHeapMemoryUsage().getUsed(), "nonheap");
-                })
-                .build();
-
-        CounterWithCallback messageCount = CounterWithCallback.newBuilder()
-                .withName("messages_total")
-                .withLabelNames("status")
-                .withConstLabels(Labels.of("staus", "b"))
-                .withCallback(messageCountCallback)
-                .build();
-
-        ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
-        CounterWithCallback counter = CounterWithCallback.newBuilder()
-                .withName("classes_loaded_total")
-                .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
-                .build();
-        CounterSnapshot sn = messageCount.collect();
-        GaugeSnapshot sn2 = memoryBytesUsed.collect();
-        SummarySnapshot sn3 = gcSeconds.collect();
-        PrometheusRegistry r = PrometheusRegistry.defaultRegistry;
-        MetricSnapshots s = r.scrape();
-        System.out.println(sn2);
-    }
-}u}(jq  (22780819e6adf7e63bae34f0a2a01aba5c9a3c1cjr  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/util/Scheduler.javaj r  modifiedjr  Kjr  Kj"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  X=  @@ -7,6 +7,9 @@
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 
+/**
+ * Used for scheduling maintenance tasks like purging outdated Exemplars or resetting native histograms.
+ */
 public class Scheduler {
 
     private static class DaemonThreadFactory implements ThreadFactory {
@@ -17,8 +20,6 @@ public Thread newThread(Runnable runnable) {
         }
     }
 
-    // TODO: Does this start a thread right away, or only after it is used for the first time?
-    // If we want this library to work in native mode we can't start a thread in a static initializer.
     private static final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
 
     public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {u}(jq  (4cca37ef6fcd66eac25335f3a703067cb33fb77cjr  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj r  modifiedjr  Kjr  Kj"r  Kj#r  https://github.com/prometheus/client_java/blob/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj%r  https://github.com/prometheus/client_java/raw/32aec68ec774449de31105d1e9c50d35c3a418c1/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj'r  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=32aec68ec774449de31105d1e9c50d35c3a418c1j)r  XB  @@ -9,8 +9,11 @@ public class InfoTest {
 
     @Test
     public void testIncrement() {
-        Info info = Info.newBuilder().withName("target_info").build();
-        info.info(Labels.of("key", "value"));
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withLabelNames("key")
+                .build();
+        info.infoLabelValues("value");
         InfoSnapshot snapshot = info.collect();
         Assert.assertEquals("target", snapshot.getMetadata().getName());
         Assert.assertEquals(1, snapshot.getData().size());ueu(480d698aafdb0dd1664d15061b2bb382dafdf41e}(sha(480d698aafdb0dd1664d15061b2bb382dafdf41enode_idEC_kwDOAHoJt9oAKDQ4MGQ2OThhYWZkYjBkZDE2NjRkMTUwNjFiMmJiMzgyZGFmZGY0MWUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T11:29:47Zu	committer}(jr  Fabian Stäberjr  fabian@fstab.dejr  2023-07-17T11:29:47Zumessage=[maven-release-plugin] prepare for next development iterationtree}(jr  (27a52d1c467118e04809ba8f6b7b0b6be4b43910urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/27a52d1c467118e04809ba8f6b7b0b6be4b43910ujr  hhttps://api.github.com/repos/prometheus/client_java/git/commits/480d698aafdb0dd1664d15061b2bb382dafdf41e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujr  dhttps://api.github.com/repos/prometheus/client_java/commits/480d698aafdb0dd1664d15061b2bb382dafdf41ehtml_urlYhttps://github.com/prometheus/client_java/commit/480d698aafdb0dd1664d15061b2bb382dafdf41ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/480d698aafdb0dd1664d15061b2bb382dafdf41e/commentsjr  }(loginfstabidJ' jr  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jr  "https://api.github.com/users/fstabjr  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujr  }(jr  fstabjr  J' jr  MDQ6VXNlcjMzMDUzNQ==jr  2https://avatars.githubusercontent.com/u/330535?v=4jr  h3jr  "https://api.github.com/users/fstabjr  https://github.com/fstabjr  ,https://api.github.com/users/fstab/followersjr  9https://api.github.com/users/fstab/following{/other_user}jr  2https://api.github.com/users/fstab/gists{/gist_id}jr  9https://api.github.com/users/fstab/starred{/owner}{/repo}jr  0https://api.github.com/users/fstab/subscriptionsjr  'https://api.github.com/users/fstab/orgsjr  (https://api.github.com/users/fstab/reposjr  3https://api.github.com/users/fstab/events{/privacy}jr  2https://api.github.com/users/fstab/received_eventsjr  Userjr  uparents]}(jr  (56306fa5cf932c0ee7902380c51f44c72aa4202bjr  dhttps://api.github.com/repos/prometheus/client_java/commits/56306fa5cf932c0ee7902380c51f44c72aa4202bjr  Yhttps://github.com/prometheus/client_java/commit/56306fa5cf932c0ee7902380c51f44c72aa4202buastats}(totalKd	additionsK2	deletionsK2ufiles](}(jr  (7d207b99a2f5484a47057fb5b74847c7f840a3e2filenamebenchmarks/pom.xmlstatusmodifiedjr  Kjr  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41epatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jr  (b76818b770e28e8bad259bdce8adfc16fa0cbc2fjr  examples/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  jhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/examples%2Fpom.xmljr  ihttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/examples%2Fpom.xmljr  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jr  (51c0fa5f00bf773bfd14fe817439ea7ecd84ade9jr  'examples/tomcat-servlet-example/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/examples%2Ftomcat-servlet-example%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/examples%2Ftomcat-servlet-example%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(jr  (5a200b51d434fd6c0857411134be3f22ef62558fjr  #integration_tests/it_common/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_common%2Fpom.xmljr  ~https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_common%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jr  (519d5355e268b4a24805febe370286b6e771ddf1jr  1integration_tests/it_exemplars_otel_agent/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jr  (c2a6763cc2108740fcec7eae7a51a6fefe564c87jr  /integration_tests/it_exemplars_otel_sdk/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jr  (34df8597cbf4eecefa9954de0d2f7d37fb7527afjr  *integration_tests/it_java_versions/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_java_versions%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_java_versions%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jr  (d3236f7d3759f98f3416e6385e8a195006c94f48jr  #integration_tests/it_log4j2/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_log4j2%2Fpom.xmljr  ~https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_log4j2%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jr  (739e8684bb8d9bf6ed9b067c6c454fe8dae10f75jr  (integration_tests/it_pushgateway/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_pushgateway%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_pushgateway%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jr  (11db7010bd22b49a9537bbf9984402846f659252jr  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jr  (2ede9491e4602cfcc52358eb29442cfdfc6f8551jr  integration_tests/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  shttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fpom.xmljr  rhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/integration_tests%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jr  (7b24d41e2859ba5fc8dc23855f88c6f63cced068jr  pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  _https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/pom.xmljr  ^https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/pom.xmljr  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>v1.0.0-alpha-1</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <developers>u}(jr  (6bb2555837b85b18466eed2d601343b009a6215ajr  !prometheus-metrics-config/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  {https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-config%2Fpom.xmljr  zhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-config%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jr  (15f75c01e1c45c569307bbab13fbd16151b04570jr  prometheus-metrics-core/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  yhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-core%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-core%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jr  (95129ce21c4375573a0c84d408c2c8000a4c0433jr  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jr  (fafdde58ddd13317f6373177e959d2af55c23f15jr  -prometheus-metrics-exposition-formats/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-exposition-formats%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-exposition-formats%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jr  (a28d6c18a8c93459c0d97b4daf4b3f59e4eca64cjr   prometheus-metrics-model/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  zhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-model%2Fpom.xmljr  yhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-model%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jr  (19d0a2f5277a8580f9072329f70798aebfa64bebjr  !prometheus-metrics-tracer/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  {https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fpom.xmljr  zhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jr  (807b126ddccbc27496ddf27c1920abc122ff9442jr  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jr  (da05c105697915f641b14b9f02c641197d779786jr  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jr  (0fdd4cf494cf7a962794627f3e0d42495a39b8fajr  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jr  (da389af0cf4d0fa24ebca4ae7b8a2cbc09b8c9d5jr  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jr  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34jr  protobuf-shaded/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  qhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/protobuf-shaded%2Fpom.xmljr  phttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/protobuf-shaded%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(jr  (1b6c4ae1d0fec50fdd0ff07368f2ffeffc08f1d4jr  simpleclient/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  nhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient%2Fpom.xmljr  mhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jr  (18e4372ccc7d872d9079adec4f863e69a69cc01cjr  simpleclient_bom/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  rhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_bom%2Fpom.xmljr  qhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_bom%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jr  (44c9105c6582e4e349383b7bbc32036b0cde1fa2jr  simpleclient_caffeine/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  whttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_caffeine%2Fpom.xmljr  vhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_caffeine%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jr  (cbed662ec66e985ada43eba01c5c8f4b148296bejr  simpleclient_common/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  uhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_common%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_common%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jr  (64f1c46af4191cc89605c6523818b2fe09a41f88jr  simpleclient_dropwizard/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  yhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_dropwizard%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_dropwizard%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jr  (f2b27bac68cb715c2be7c8855baa4b08f16d126bjr  $simpleclient_graphite_bridge/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  ~https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_graphite_bridge%2Fpom.xmljr  }https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_graphite_bridge%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jr  (06d9a07dcfcf0822720f7cf47199b3c03a9fad73jr  simpleclient_guava/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  thttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_guava%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_guava%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jr  (933fc4a459b1286442c5a2f9bfc941e6002e0deejr  simpleclient_hibernate/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  xhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_hibernate%2Fpom.xmljr  whttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_hibernate%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jr  (b7d9af5598a2cc872c81786b559124e4b7d993eejr  simpleclient_hotspot/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  vhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_hotspot%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_hotspot%2Fpom.xml	     jr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jr  (ce830ebd744605d7ab9540d3b51f454b794b745fjr  simpleclient_httpserver/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  yhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_httpserver%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_httpserver%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jr  (b5bd23c7b6d3a991b43ca3d3d4bae24d9ee9ee3ejr  simpleclient_jetty/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  thttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_jetty%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_jetty%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jr  (1628141a75cf48bbbbbf245e87037714e01605b8jr  simpleclient_jetty_jdk8/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  yhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_jetty_jdk8%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_jetty_jdk8%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jr  (72f5a210bcf76a222db8c8c3585cda374b74c886jr  simpleclient_log4j/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  thttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_log4j%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_log4j%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jr  (4a772b5e2f61d468e4d9da8cf6e0bcd6146df2f9jr  simpleclient_log4j2/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  uhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_log4j2%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_log4j2%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jr  (73ef79f4247428aa3ce11f8f1bb71f7001177711jr  simpleclient_logback/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  vhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_logback%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_logback%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jr  (334d299aa02f822cf727fae857c0ec005941cee5jr   simpleclient_pushgateway/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  zhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_pushgateway%2Fpom.xmljr  yhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_pushgateway%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jr  (055caf224b22209a770495299ccbe7d42be061a9jr  simpleclient_servlet/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  vhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet%2Fpom.xmljr  uhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jr  (02a49fd7d7e6f682ce7758cf0407db6f7dc5c6b4jr  #simpleclient_servlet_common/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  }https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet_common%2Fpom.xmljr  |https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet_common%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jr  (4a86834915729d3a4ca0c1e0ccda28ea86a4cf77jr  $simpleclient_servlet_jakarta/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  ~https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet_jakarta%2Fpom.xmljr  }https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_servlet_jakarta%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jr  (9833ddf60557b180641c0f279423481fdc9e768ejr  simpleclient_spring_web/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  yhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_spring_web%2Fpom.xmljr  xhttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_spring_web%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jr  (0d5b9245d1085bf3b070162abec760022b8b185bjr  simpleclient_tracer/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  uhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jr  (ff5a09c58a22b80db04cf7ddb58204e07699a9f6jr  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jr  (f0b4a2114a9d0b7fb7f282145b77094943e0cfbejr  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jr  (f08539d4b4ba995e8bf91f910ce3f7062bc2fb02jr  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  https://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljr  https://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1</version>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jr  (ac11b3bea8b38b78ffb7e1af68d4e59e7e119d87jr  simpleclient_vertx/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  thttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_vertx%2Fpom.xmljr  shttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_vertx%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jr  (153f32248c61a81a25958458f6110a4fa0d23ee2jr  simpleclient_vertx4/pom.xmljr  modifiedjr  Kjr  Kjr  Kjr  uhttps://github.com/prometheus/client_java/blob/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_vertx4%2Fpom.xmljr  thttps://github.com/prometheus/client_java/raw/480d698aafdb0dd1664d15061b2bb382dafdf41e/simpleclient_vertx4%2Fpom.xmljr  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=480d698aafdb0dd1664d15061b2bb382dafdf41ejr  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1</version>
+        <version>1.0.0-alpha-2-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(1f4d136113d71069c53c811b928dc1a09865b44a}(sha(1f4d136113d71069c53c811b928dc1a09865b44anode_idEC_kwDOAHoJt9oAKDFmNGQxMzYxMTNkNzEwNjljNTNjODExYjkyOGRjMWEwOTg2NWI0NGEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-28T10:57:26Zu	committer}(jt  Fabian Stäberjt  fabian@fstab.dejt  2023-06-28T10:57:26ZumessageFix bug in manual load testtree}(jt  (9ba6269e5fdf9aa33940a7cac2c3e2a31c1fbb1burlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9ba6269e5fdf9aa33940a7cac2c3e2a31c1fbb1bujt  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1f4d136113d71069c53c811b928dc1a09865b44a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujt  dhttps://api.github.com/repos/prometheus/client_java/commits/1f4d136113d71069c53c811b928dc1a09865b44ahtml_urlYhttps://github.com/prometheus/client_java/commit/1f4d136113d71069c53c811b928dc1a09865b44acomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1f4d136113d71069c53c811b928dc1a09865b44a/commentsjt  }(loginfstabidJ' jt  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jt  "https://api.github.com/users/fstabjt  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujt  }(jt  fstabjt  J' jt  MDQ6VXNlcjMzMDUzNQ==jt  2https://avatars.githubusercontent.com/u/330535?v=4jt  h3jt  "https://api.github.com/users/fstabjt  https://github.com/fstabjt  ,https://api.github.com/users/fstab/followersjt  9https://api.github.com/users/fstab/following{/other_user}jt  2https://api.github.com/users/fstab/gists{/gist_id}jt  9https://api.github.com/users/fstab/starred{/owner}{/repo}jt  0https://api.github.com/users/fstab/subscriptionsjt  'https://api.github.com/users/fstab/orgsjt  (https://api.github.com/users/fstab/reposjt  3https://api.github.com/users/fstab/events{/privacy}jt  2https://api.github.com/users/fstab/received_eventsjt  Userjt  uparents]}(jt  (261af881ab1f7170f25ded313311ad9dbdd33f2ejt  dhttps://api.github.com/repos/prometheus/client_java/commits/261af881ab1f7170f25ded313311ad9dbdd33f2ejt  Yhttps://github.com/prometheus/client_java/commit/261af881ab1f7170f25ded313311ad9dbdd33f2euastats}(totalK	additionsK	deletionsKufiles]}(jt  (d19badefa4c286b3269bbd49b877a5523d37f3e9filenameItmp_example/src/main/java/com/example/ManualNativeHistogramBenchmark.javastatusmodifiedjt  Kjt  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/1f4d136113d71069c53c811b928dc1a09865b44a/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javaraw_urlhttps://github.com/prometheus/client_java/raw/1f4d136113d71069c53c811b928dc1a09865b44a/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FManualNativeHistogramBenchmark.java?ref=1f4d136113d71069c53c811b928dc1a09865b44apatchX/  @@ -24,7 +24,7 @@
 public class ManualNativeHistogramBenchmark {
 
 
-    private final int MAX_THREADS = 32;
+    private final int MAX_THREADS = 48;
     private final double[][] randoms = new double[MAX_THREADS][10 * 1024 * 1024];
     private Meter meter;
     private Histogram prometheusHistogram;uau(c208b817c60035bcc07ea9008e6c1d6a066ddc40}(sha(c208b817c60035bcc07ea9008e6c1d6a066ddc40node_idEC_kwDOAHoJt9oAKGMyMDhiODE3YzYwMDM1YmNjMDdlYTkwMDhlNmMxZDZhMDY2ZGRjNDAcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-29T21:19:44Zu	committer}(jt  Fabian Stäberju  fabian@fstab.deju  2023-08-29T20:25:34ZumessageHAdd HTTPServer exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(jt  (f50a6d7830685cdb641ded74a93bc471fa9fb3a3urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f50a6d7830685cdb641ded74a93bc471fa9fb3a3uju  hhttps://api.github.com/repos/prometheus/client_java/git/commits/c208b817c60035bcc07ea9008e6c1d6a066ddc40
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuju  dhttps://api.github.com/repos/prometheus/client_java/commits/c208b817c60035bcc07ea9008e6c1d6a066ddc40html_urlYhttps://github.com/prometheus/client_java/commit/c208b817c60035bcc07ea9008e6c1d6a066ddc40comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/c208b817c60035bcc07ea9008e6c1d6a066ddc40/commentsjt  }(loginfstabidJ' jt  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ju  "https://api.github.com/users/fstabju  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuju  }(j u  fstabj"u  J' jt  MDQ6VXNlcjMzMDUzNQ==j$u  2https://avatars.githubusercontent.com/u/330535?v=4j&u  h3ju  "https://api.github.com/users/fstabju  https://github.com/fstabj)u  ,https://api.github.com/users/fstab/followersj+u  9https://api.github.com/users/fstab/following{/other_user}j-u  2https://api.github.com/users/fstab/gists{/gist_id}j/u  9https://api.github.com/users/fstab/starred{/owner}{/repo}j1u  0https://api.github.com/users/fstab/subscriptionsj3u  'https://api.github.com/users/fstab/orgsj5u  (https://api.github.com/users/fstab/reposj7u  3https://api.github.com/users/fstab/events{/privacy}j9u  2https://api.github.com/users/fstab/received_eventsj;u  Userj=u  uparents]}(jt  (8aea91493bd6ff1a6c478131d7607cb0495ff965ju  dhttps://api.github.com/repos/prometheus/client_java/commits/8aea91493bd6ff1a6c478131d7607cb0495ff965ju  Yhttps://github.com/prometheus/client_java/commit/8aea91493bd6ff1a6c478131d7607cb0495ff965uastats}(totalM		additionsM		deletionsK@ufiles](}(jt  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedjWu  K%jXu  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40patchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jt  (fd1f204d1d1ed425f184838aea568a893c9ae334j]u  #examples/example-httpserver/pom.xmlj_u  addedjWu  KFjXu  K jau  KFjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2Fpom.xmljdu  ~https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jt  (0563d583a93f32d63b484dd0d677f75db81927caj]u  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj_u  addedjWu  K!jXu  K jau  K!jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajfu  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X=  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jt  (571e55a2b5d259f0401a881e9631fa0acce8e791j]u  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj_u  modifiedjWu  KjXu  Kjau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajfu  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -6,16 +6,20 @@
 import org.apache.catalina.startup.Tomcat;
 
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
 public class Main {
 
-    public static void main(String[] args) throws LifecycleException {
+    public static void main(String[] args) throws LifecycleException, IOException {
 
         Tomcat tomcat = new Tomcat();
-        tomcat.setPort(8080);
+        Path tmpDir = Files.createTempDirectory("prometheus-tomcat-servlet-example-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
 
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
 u}(jt  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cj]u  examples/pom.xmlj_u  modifiedjWu  KjXu  K jau  Kjbu  jhttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fpom.xmljdu  ihttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/examples%2Fpom.xmljfu  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(jt  (aa81b08e8189c21bee10839e7605abd4b2c49b12j]u  #integration-tests/it-common/pom.xmlj_u  addedjWu  K8jXu  K jau  K8jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fpom.xmljdu  ~https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  Xt  @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-common</artifactId>
+
+    <name>Integration Tests - Common Utilities</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Common utilities for integration tests
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jt  (d60e5397941da631e78c1289365208a3becd4641j]u  Yintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.javaj_u  addedjWu  K$jXu  K jau  K$jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.javajfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FLogConsumer.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,36 @@
+package io.prometheus.client.it.common;
+
+import org.testcontainers.containers.output.OutputFrame;
+
+import java.util.function.Consumer;
+
+/**
+ * Print Docker logs from TestContainers to stdout or stderr.
+ */
+public class LogConsumer implements Consumer<OutputFrame> {
+
+    private final String prefix;
+
+    private LogConsumer(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public static LogConsumer withPrefix(String prefix) {
+     return new LogConsumer(prefix);
+    }
+
+    @Override
+    public void accept(OutputFrame outputFrame) {
+        switch (outputFrame.getType()) {
+            case STDOUT:
+                System.out.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+            case END:
+                System.out.println(prefix + " - END");
+                break;
+            default: // STDERR or unexpected
+                System.err.print(prefix + " - " + outputFrame.getUtf8String());
+                break;
+        }
+    }
+}u}(jt  (6c32ba74bc3c7c0d712e326253c5fdce6e3f17a8j]u  Tintegration-tests/it-common/src/test/java/io/prometheus/client/it/common/Volume.javaj_u  addedjWu  KejXu  K jau  Kejbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.javajfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fcommon%2FVolume.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X.  @@ -0,0 +1,101 @@
+package io.prometheus.client.it.common;
+
+import org.junit.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.function.Predicate;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/**
+ * Temporary directory in ./target/ to be mounted as a volume in Docker containers.
+ */
+public class Volume {
+
+    private final Path tmpDir; // will be created in the ./target/ directory
+
+    private Volume(Path tmpDir) {
+        this.tmpDir = tmpDir;
+    }
+
+    public static Volume create(String prefix) throws IOException, URISyntaxException {
+        Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
+        Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
+        return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
+    }
+
+    /**
+     * Copy a file or directory to this volume.
+     * @param src is reltive to {@code ./target/}
+     */
+    public Volume copy(String src) throws IOException {
+        Path srcPath = tmpDir.getParent().resolve(src);
+        if (Files.isRegularFile(srcPath)) {
+            Files.copy(srcPath, tmpDir.resolve(srcPath.getFileName()), REPLACE_EXISTING);
+        } else if (Files.isDirectory(srcPath)) {
+            Path dest = tmpDir.resolve(srcPath.getFileName());
+            Files.createDirectories(dest);
+            Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
+
+                // create parent directories
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                    Files.createDirectories(dest.resolve(srcPath.relativize(dir)));
+                    return FileVisitResult.CONTINUE;
+                }
+
+                // copy file
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.copy(file, dest.resolve(srcPath.relativize(file)), REPLACE_EXISTING);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } else {
+            Assert.fail(src + ": No such file or directory");
+        }
+        return this;
+    }
+
+    /**
+     * Remove files in tmpDir if they match the predicate.
+     */
+    public void rm(Predicate<Path> predicate) throws IOException {
+        Files.walkFileTree(tmpDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                if (predicate.test(file)) {
+                    Files.delete(file);
+                }
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+    public String getHostPath() {
+        return tmpDir.toString();
+    }
+
+    /**
+     * Recursively remove tmpDir and its contents.
+     */
+    public void remove() throws IOException {
+        if (!deleteRecursively(tmpDir.toFile())) {
+            throw new IOException(tmpDir + ": Failed to remove temporary test directory.");
+        }
+    }
+
+    private boolean deleteRecursively(File file) {
+        File[] allContents = file.listFiles();
+        if (allContents != null) {
+            for (File child : allContents) {
+                deleteRecursively(child);
+            }
+        }
+        return file.delete();
+    }
+}u}(jt  (4eafa72596ce3619761aa5c3681eeabb90322228j]u  Iintegration-tests/it-common/src/test/resources/project_version.propertiesj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesjdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.propertiesjfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fsrc%2Ftest%2Fresources%2Fproject_version.properties?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  @@ -0,0 +1,2 @@
+# ${project.version} will be replaced by Maven at built time when this file is copied to the target/ directory.
+project.version=${project.version}
\ No newline at end of fileu}(jt  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj]u  -integration-tests/it-common/version-rules.xmlj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fversion-rules.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-common%2Fversion-rules.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fversion-rules.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jt  (8767c971d0f813a8af5a6dee7d7276f15ae79be6j]u  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj_u  addedjWu  KIjXu  K jau  KIjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-httpserver-sample</artifactId>
+
+    <name>Integration Tests - HTTPServer Exporter Sample</name>
+    <description>
+        HTTPServer Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-httpserver-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jt  (474db7804aabba78dee5e810f3952924b2853255j]u  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj_u  addedjWu  KbjXu  K jau  Kbjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajfu  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X
  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.it.exporter.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+public class HTTPServerSample {
+
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-httpserver-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(port)
+                .buildAndStart();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jt  (a470df5c021d465c51388b5a740ba88a49d40858j]u  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj_u  addedjWu  KSjXu  K jau  KSjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  XG  @@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-jetty-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Jetty Sample</name>
+    <description>
+        Jetty Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>11.0.15</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-jetty-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jt  (efa119c4e2292afc04d79a6f1b049bca20e923bej]u  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj_u  addedjWu  KqjXu  K jau  Kqjbu  X  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajdu  X
  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajfu  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.jetty;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletHandler;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Jetty.
+ */
+public class ExporterServletJettySample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-jetty-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-jetty-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Server server = new Server();
+
+        // set port
+        ServerConnector connector = new ServerConnector(server);
+        connector.setPort(port);
+        server.setConnectors(new Connector[] {connector});
+
+        // register servlet
+        ServletHandler servletHandler = new ServletHandler();
+        servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
+        server.setHandler(servletHandler);
+
+        System.out.println("Running on http://localhost:" + port + "/metrics");
+
+        // run
+        server.start();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u}(jt  (ce389c3525dcfdd5f984c5b594ae2ffde01dbef2j]u  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj_u  addedjWu  KNjXu  K jau  KNjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
+
+    <name>Integration Tests - Exporter Servlet with Tomcat Sample</name>
+    <description>
+        Tomcat Sample for the Exporter Integration Test
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>exporter-servlet-tomcat-sample</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jt  (21956ae78f5aca3a25abb6b5bb32a80999930390j]u  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj_u  addedjWu  KqjXu  K jau  Kqjbu  X  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajdu  X  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajfu  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X	  @@ -0,0 +1,113 @@
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Sample application using the {@link PrometheusMetricsServlet} in Tomcat.
+ */
+public class ExporterServletTomcatSample {
+    enum Mode {
+        success,
+        error
+    }
+
+    public static void main(String[] args) throws LifecycleException, IOException {
+
+        if (args.length != 2) {
+            System.err.println("Usage: java -jar exporter-servlet-tomcat-sample.jar <port> <mode>");
+            System.err.println("Where mode is \"success\" or \"error\".");
+            System.exit(1);
+        }
+
+        int port = parsePortOrExit(args[0]);
+        Mode mode = parseModeOrExit(args[1]);
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("exporter-servlet-tomcat-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
+
+        if (mode == Mode.error) {
+            Collector failingCollector = new Collector() {
+
+                @Override
+                public String getPrometheusName() {
+                    return null;
+                }
+
+                @Override
+                public MetricSnapshot collect() {
+                    throw new RuntimeException("Simulating an error.");
+                }
+            };
+
+            PrometheusRegistry.defaultRegistry.register(failingCollector);
+        }
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(port);
+
+        Path tmpDir = Files.createTempDirectory("exporter-servlet-tomcat-sample-");
+        tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+
+    private static int parsePortOrExit(String port) {
+        try {
+            return Integer.parseInt(port);
+        } catch (NumberFormatException e) {
+            System.err.println("\"" + port + "\": Invalid port number.");
+            System.exit(1);
+        }
+        return 0; // this won't happen
+    }
+
+    private static Mode parseModeOrExit(String mode) {
+        try {
+            return Mode.valueOf(mode);
+        } catch (IllegalArgumentException e) {
+            System.err.println("\"" + mode + "\": Invalid mode. Legal values are \"success\" and \"error\".");
+            System.exit(1);
+        }
+        return null; // this won't happen
+    }
+}u     }(jt  (8d7404585288239abecdd5265b2984d493cb0628j]u  6integration-tests/it-exporter/it-exporter-test/pom.xmlj_u  addedjWu  KBjXu  K jau  KBjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>it-exporter</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter-test</artifactId>
+
+    <name>Integration Tests - Exporter Test Implementations</name>
+    <description>
+        Integration Tests for Exporters
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.13.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>it-common</artifactId>
+            <type>test-jar</type>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(jt  (2f7baf9088dc2d262d348e2d5b28e023b44d745aj]u  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj_u  addedjWu  MVjXu  K jau  MVjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X5C  @@ -0,0 +1,342 @@
+package io.prometheus.metrics.it.exporter.test;
+
+import io.prometheus.client.it.common.LogConsumer;
+import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.apache.commons.io.IOUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+@RunWith(Parameterized.class)
+public class ExporterIT {
+
+    private final GenericContainer<?> sampleAppContainer;
+    private final Volume sampleAppVolume;
+    private final String sampleApp;
+
+    @Parameterized.Parameters(name = "{0}")
+    public static String[] sampleApps() {
+        return new String[]{
+                "exporter-httpserver-sample",
+                "exporter-servlet-tomcat-sample",
+                "exporter-servlet-jetty-sample",
+        };
+    }
+
+    public ExporterIT(String sampleApp) throws IOException, URISyntaxException {
+        this.sampleApp = sampleApp;
+        this.sampleAppVolume = Volume.create("it-exporter")
+                .copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
+        this.sampleAppContainer = new GenericContainer<>("openjdk:17")
+                .withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
+                .withWorkingDirectory("/app")
+                .withLogConsumer(LogConsumer.withPrefix(sampleApp))
+                .withExposedPorts(9400);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        sampleAppContainer.stop();
+        sampleAppVolume.remove();
+    }
+
+    @Test
+    public void testOpenMetricsTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // OpenMetrics text format has a UNIT.
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusTextFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        String bodyString = new String(response.body);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        // Prometheus text format does not have a UNIT.
+        Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
+    private void assertContentType(String expected, String actual) {
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
+    }
+
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
+        long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
+        HttpURLConnection con = (HttpURLConnection) url.openConnection();
+        con.setRequestMethod(method);
+        for (int i = 0; i < requestHeaders.length; i += 2) {
+            con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
+        }
+        long start = System.currentTimeMillis();
+        Exception exception = null;
+        while (System.currentTimeMillis() - start < timeoutMillis) {
+            try {
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
+            } catch (Exception e) {
+                exception = e;
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignored) {
+                }
+            }
+        }
+        if (exception != null) {
+            exception.printStackTrace();
+        }
+        Assert.fail("timeout while getting metrics from " + url);
+        return null; // will not happen
+    }
+
+    private static class Response {
+        private final int status;
+        private final Map<String, String> headers;
+        private final byte[] body;
+
+        private Response(int status, Map<String, List<String>> headers, byte[] body) {
+            this.status = status;
+            this.headers = new HashMap<>(headers.size());
+            this.body = body;
+            for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                if (entry.getKey() != null) { // HttpUrlConnection uses pseudo key "null" for the status line
+                    this.headers.put(entry.getKey().toLowerCase(), entry.getValue().get(0));
+                }
+            }
+        }
+
+        private String getHeader(String name) {
+            // HTTP headers are case-insensitive
+            return headers.get(name.toLowerCase());
+        }
+    }
+}u}(jt  (e5a7e8c99c8e3bffd7b114f470aec441bfd7c0a3j]u  %integration-tests/it-exporter/pom.xmlj_u  addedjWu  K1jXu  K jau  K1jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fit-exporter%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>integration-tests</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>it-exporter</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests - Exporter</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
+        <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
+        <url>git@github.com:prometheus/client_java.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>it-exporter-servlet-tomcat-sample</module>
+        <module>it-exporter-servlet-jetty-sample</module>
+        <module>it-exporter-httpserver-sample</module>
+        <module>it-exporter-test</module>
+    </modules>
+</project>u}(jt  (cce89906f28eebfb57aa16a5ab222f52117f4794j]u  integration-tests/pom.xmlj_u  addedjWu  K@jXu  K jau  K@jbu  shttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fpom.xmljdu  rhttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/integration-tests%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-tests</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Integration Tests</name>
+    <url>http://github.com/prometheus/client_java</url>
+    <description>
+        Integration tests for the Exporter modules
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <modules>
+        <module>it-common</module>
+        <module>it-exporter</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>integration-test</id>
+                            <phase>integration-test</phase>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.17.2</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>u}(jt  (fc8359e560a3e05c90838b2ece08e0853d823358j]u  pom.xmlj_u  modifiedjWu  KjXu  K jau  Kjbu  _https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/pom.xmljdu  ^https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/pom.xmljfu  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X#  @@ -55,8 +55,11 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
+        <module>integration-tests</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(jt  (83a3b1d42d9d342d37f56bb4f329c5f08bab7bfcj]u  *prometheus-metrics-exporter-common/pom.xmlj_u  addedjWu  K5jXu  K jau  K5jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  Xk  @@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-common</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - Common</name>
+    <description>
+        Common functionality for implementing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jt  (7a9f5846b52f0df7aaac6632d61f6308bf407ad4j]u  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.javaj_u  addedjWu  K
jXu  K jau  K
jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpExchange.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+
+public interface PrometheusHttpExchange extends AutoCloseable {
+    PrometheusHttpRequest getRequest();
+    PrometheusHttpResponse getResponse();
+    void handleException(IOException e) throws IOException;
+    void handleException(RuntimeException e);
+
+    @Override
+    void close();
+}u}(jt  (a5502003c9ff6da0eeb987f4040f0a7ac2f5581bj]u  qprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.javaj_u  addedjWu  KGjXu  K jau  KGjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpRequest.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+public interface PrometheusHttpRequest {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getQueryString()}
+     */
+    String getQueryString();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeaders(String)}
+     */
+    Enumeration<String> getHeaders(String name);
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getMethod()}
+     */
+    String getMethod();
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletRequest.getHeader(String)}
+     */
+    default String getHeader(String name) {
+        Enumeration<String> headers = getHeaders(name);
+        if (headers == null || !headers.hasMoreElements()) {
+            return null;
+        } else {
+            return headers.nextElement();
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameter(String)}
+     */
+    default String getParameter(String name) {
+        String[] values = getParameterValues(name);
+        if (values == null || values.length == 0) {
+            return null;
+        } else {
+            return values[0];
+        }
+    }
+
+    /**
+     * See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}
+     */
+    default String[] getParameterValues(String name) {
+        try {
+            ArrayList<String> result = new ArrayList<>();
+            String queryString = getQueryString();
+            if (queryString != null) {
+                String[] pairs = queryString.split("&");
+                for (String pair : pairs) {
+                    int idx = pair.indexOf("=");
+                    if (idx != -1 && URLDecoder.decode(pair.substring(0, idx), "UTF-8").equals(name)) {
+                        result.add(URLDecoder.decode(pair.substring(idx + 1), "UTF-8"));
+                    }
+                }
+            }
+            return result.toArray(new String[0]);
+        } catch (UnsupportedEncodingException e) {
+            // UTF-8 encoding not supported.
+            throw new RuntimeException(e);
+        }
+    }
+}u}(jt  (4e3db6955fe7fbf010877f9faef50315ac489eedj]u  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javaj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,18 @@
+package io.prometheus.metrics.exporter.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface PrometheusHttpResponse {
+
+    /**
+     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
+     */
+    void setHeader(String name, String value);
+
+    /**
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
+     */
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
+}u}(jt  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fj]u  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javaj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,173 @@
+package io.prometheus.metrics.exporter.common;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * Prometheus scrape endpoint.
+ */
+public class PrometheusScrapeHandler {
+
+    private final PrometheusRegistry registry;
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
+
+    public PrometheusScrapeHandler() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
+        try {
+            PrometheusHttpRequest request = exchange.getRequest();
+            PrometheusHttpResponse response = exchange.getResponse();
+            MetricSnapshots snapshots = scrape(request);
+            if (writeDebugResponse(snapshots, exchange)) {
+                return;
+            }
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
+            String acceptHeader = request.getHeader("Accept");
+            ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+            writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
+            response.setHeader("Content-Type", writer.getContentType());
+
+            if (shouldUseCompression(request)) {
+                response.setHeader("Content-Encoding", "gzip");
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
+                    responseBuffer.writeTo(gzipOutputStream);
+                }
+            } else {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
+                    response.setHeader("Content-Length", String.valueOf(contentLength));
+                }
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
+                        responseBuffer.writeTo(outputStream);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            exchange.handleException(e);
+        } catch (RuntimeException e) {
+            exchange.handleException(e);
+        } finally {
+            exchange.close();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    private MetricSnapshots scrape(PrometheusHttpRequest request) {
+        Predicate<String> filter = makeNameFilter(request.getParameterValues("name[]"));
+        if (filter != null) {
+            return registry.scrape(filter);
+        } else {
+            return registry.scrape();
+        }
+    }
+
+    private Predicate<String> makeNameFilter(String[] includedNames) {
+        Predicate<String> result = null;
+        if (includedNames != null) {
+            result = MetricNameFilter.newBuilder().nameMustBeEqualTo(includedNames).build();
+        }
+        if (result != null && nameFilter != null) {
+            result = result.and(nameFilter);
+        } else if (nameFilter != null) {
+            result = nameFilter;
+        }
+        return result;
+    }
+
+    private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
+        String debugParam = exchange.getRequest().getParameter("debug");
+        PrometheusHttpResponse response = exchange.getResponse();
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
+            switch (debugParam) {
+                case "openmetrics":
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
+                case "text":
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
+                case "prometheus-protobuf":
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
+            }
+            return true;
+        }
+    }
+
+    private boolean shouldUseCompression(PrometheusHttpRequest request) {
+        Enumeration<String> encodingHeaders = request.getHeaders("Accept-Encoding");
+        if (encodingHeaders == null) {
+            return false;
+        }
+        while (encodingHeaders.hasMoreElements()) {
+            String encodingHeader = encodingHeaders.nextElement();
+            String[] encodings = encodingHeader.split(",");
+            for (String encoding : encodings) {
+                if (encoding.trim().equalsIgnoreCase("gzip")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}u}(jt  (318e865f55bdd893d762a5f4e759a502e8bbc983j]u  4prometheus-metrics-exporter-common/version-rules.xmlj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fversion-rules.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-common%2Fversion-rules.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fversion-rules.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jt  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160j]u  .prometheus-metrics-exporter-httpserver/pom.xmlj_u  addedjWu  K+jXu  K jau  K+jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jt  (e8a54e0cf687d16358a139f83d42f5960106395aj]u  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javaj_u  addedjWu  KCjXu  K jau  KCjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,67 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jt  (7c0275fc3624f8dff2d802b37671eb91fca4b48cj]u  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .buildAndStart();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server. Same as {@link #close()}.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer. Same as {@link #stop()}.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     * This is useful if you did not specify a port and the server picked a free port automatically.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build and start the HTTPServer.
+         */
+        public HTTPServer buildAndStart() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(jt  (03b647d99ed2bc1d67a3c66a11c33d900b53d501j]u  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javaj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jt  (4f1b4f63a7e59feb619963afc5d901560bc83e08j]u  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javaj_u  addedjWu  KwjXu  K jau  Kwjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,119 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
+            }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        sendErrorResponseWithStackTrace(e);
+    }
+
+    private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
+        }
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u      }(jt  (3506ddd4bb4cd147fe1ad734cd1f47279b21c70bj]u  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javaj_u  addedjWu  K-jXu  K jau  K-jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(jt  (378ac6ddc334fbe20d07b3510cf6434894770c6bj]u  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javaj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(jt  (318e865f55bdd893d762a5f4e759a502e8bbc983j]u  8prometheus-metrics-exporter-httpserver/version-rules.xmlj_u  addedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jt  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79j]u  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj_u  modifiedjWu  KjXu  Kjau  K	jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(jt  (656d661ebddd423ba12fc58b1dbd136062e5a282j]u  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javaj_u  addedjWu  K^jXu  K jau  K^jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X
  @@ -0,0 +1,94 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void handleException(IOException e) throws IOException {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void handleException(RuntimeException e) {
+        throw e; // leave exception handling to the servlet container
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
+            response.setStatus(statusCode);
+            return response.getOutputStream();
+        }
+    }
+}u}(jt  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ej]u  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javaj_u  modifiedjWu  KjXu  K4jau  K8jbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javajfu  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(jt  (3db354c56f52afb4c46e0a080ef010b492c401d6j]u  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javaj_u  modifiedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -7,6 +7,10 @@
 
 public interface ExpositionFormatWriter {
     boolean accepts(String acceptHeader);
+
+    /**
+     * Text formats use UTF-8 encoding.
+     */
     void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
     String getContentType();
 }u}(jt  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfej]u  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj_u  modifiedjWu  KjXu  Kjau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(jt  (f66d00b6732e31c5e749a15fc428ff14c8f5bf72j]u  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj_u  modifiedjWu  KjXu  Kjau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  X  @@ -34,7 +34,8 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     }
 
     /**
-     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     * Override this and return {@code null} if a collector does not have a constant name,
+     * or if you don't want this library to call {@link #collect()} during registration of this collector.
      */
     default String getPrometheusName() {
         return collect().getMetadata().getPrometheusName();u}(jt  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfj]u  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj_u  modifiedjWu  KjXu  K jau  Kjbu  https://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajdu  https://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajfu  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jhu  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(46d17e6602452fc3cff7d8fafaf06f09db17374b}(sha(46d17e6602452fc3cff7d8fafaf06f09db17374bnode_idEC_kwDOAHoJt9oAKDQ2ZDE3ZTY2MDI0NTJmYzNjZmY3ZDhmYWZhZjA2ZjA5ZGIxNzM3NGIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-01T20:10:42Zu	committer}(jv  Fabian Stäberjv  fabian@fstab.dejv  2023-08-01T20:10:42Zumessage'First working example of the HTTPServertree}(jv  (a39cc3f11c6ddcf46f9044050b0802ae48e2f290urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a39cc3f11c6ddcf46f9044050b0802ae48e2f290ujv  hhttps://api.github.com/repos/prometheus/client_java/git/commits/46d17e6602452fc3cff7d8fafaf06f09db17374b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujv  dhttps://api.github.com/repos/prometheus/client_java/commits/46d17e6602452fc3cff7d8fafaf06f09db17374bhtml_urlYhttps://github.com/prometheus/client_java/commit/46d17e6602452fc3cff7d8fafaf06f09db17374bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/46d17e6602452fc3cff7d8fafaf06f09db17374b/commentsjv  }(loginfstabidJ' jv  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jv  "https://api.github.com/users/fstabjv  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujv  }(jv  fstabjv  J' jv  MDQ6VXNlcjMzMDUzNQ==jv  2https://avatars.githubusercontent.com/u/330535?v=4jv  h3jv  "https://api.github.com/users/fstabjv  https://github.com/fstabjv  ,https://api.github.com/users/fstab/followersjv  9https://api.github.com/users/fstab/following{/other_user}jv  2https://api.github.com/users/fstab/gists{/gist_id}jv  9https://api.github.com/users/fstab/starred{/owner}{/repo}jv  0https://api.github.com/users/fstab/subscriptionsjv  'https://api.github.com/users/fstab/orgsjv  (https://api.github.com/users/fstab/reposjv  3https://api.github.com/users/fstab/events{/privacy}jv  2https://api.github.com/users/fstab/received_eventsjv  Userjv  uparents]}(jv  (70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jv  dhttps://api.github.com/repos/prometheus/client_java/commits/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093jv  Yhttps://github.com/prometheus/client_java/commit/70e24e7e506b2fdd178cdd171ebcd2cd9aecb093uastats}(totalMJ	additionsM	deletionsKKufiles](}(jv  (1913676345d30c927811eda0605a2999cb4f0bb0filename%examples/example-httpserver/README.mdstatusaddedjw  K%jw  K changesK%blob_urlhttps://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2FREADME.mdraw_urlhttps://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2FREADME.mdcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2FREADME.md?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bpatchX  @@ -0,0 +1,37 @@
+# Built-in HTTPServer for Exposing Metrics
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+
+```
+java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+```
+
+## Manually testing the Metrics Endpoint
+
+Accessing [http://localhost:9400/metrics](http://localhost:9400/metrics) with a Web browser should yield an example of a counter metric.
+
+```
+# HELP uptime_seconds_total total number of seconds since this application was started
+# TYPE uptime_seconds_total counter
+uptime_seconds_total 301.0
+```
+
+The exporter supports a `debug` URL parameter to quickly view other formats in your Web browser:
+
+* [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
+* [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
+* [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
+
+## TODO
+
+Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).u}(jv  (fd1f204d1d1ed425f184838aea568a893c9ae334jw  #examples/example-httpserver/pom.xmljw  addedjw  KFjw  K jw  KFjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2Fpom.xmlj!w  ~https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2Fpom.xmlj#w  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fpom.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X0
  @@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-httpserver</artifactId>
+
+    <name>Example - HTTPServer</name>
+    <description>
+        Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.httpserver.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(jv  (ca5b8ef247c64d730329be29c4a14995be834d89jw  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javajw  addedjw  K!jw  K jw  K!jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X5  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.examples.httpserver;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.IOException;
+
+/**
+ * Simple example of an application exposing metrics via Prometheus' built-in HTTPServer.
+ */
+public class Main {
+
+    public static void main(String[] args) throws IOException, InterruptedException {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .build();
+
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(jv  (f8925e541121d08d1a5cdc8dd94c01e2c344f48cjw  examples/pom.xmljw  modifiedjw  Kjw  K jw  Kjw  jhttps://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fpom.xmlj!w  ihttps://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/examples%2Fpom.xmlj#w  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  @@ -33,6 +33,7 @@
     </developers>
 
     <modules>
+        <module>example-httpserver</module>
         <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
     </modules>u}(jv  (a60996a6b3dc80ce29d8529b4fed7c27cf6bf49fjw  pom.xmljw  modifiedjw  Kjw  K jw  Kjw  _https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/pom.xmlj!w  ^https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/pom.xmlj#w  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X  @@ -55,7 +55,9 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>prometheus-metrics-exporter-httpserver</module>
         <module>examples</module>
 
         <module>simpleclient</module>u}(jv  (19a54a4a07866f01ba94a4e216f93d678990bb55jw  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javajw  modifiedjw  Kjw  Kjw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X  @@ -13,6 +13,8 @@
 import java.io.OutputStream;
 import java.nio.charset.StandardCharsets;
 import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Predicate;
 import java.util.zip.GZIPOutputStream;
 
@@ -24,14 +26,7 @@ public class PrometheusScrapeHandler {
     private final PrometheusRegistry registry;
     private final ExpositionFormats expositionFormats;
     private final Predicate<String> nameFilter;
-    private final LocalByteArray threadLocalResponseBuffer = new LocalByteArray();
-
-    private static class LocalByteArray extends ThreadLocal<ByteArrayOutputStream> {
-        @Override
-        protected ByteArrayOutputStream initialValue() {
-            return new ByteArrayOutputStream(1 << 20); // 1 MB
-        }
-    }
+    private AtomicInteger lastResponseSize = new AtomicInteger(2 << 9); //  0.5 MB
 
     public PrometheusScrapeHandler() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -59,32 +54,34 @@ public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
             if (writeDebugResponse(snapshots, exchange)) {
                 return;
             }
-            ByteArrayOutputStream responseBuffer = threadLocalResponseBuffer.get();
+            ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(lastResponseSize.get() + 1024);
             String acceptHeader = request.getHeader("Accept");
             ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
             writer.write(responseBuffer, snapshots);
+            lastResponseSize.set(responseBuffer.size());
             response.setHeader("Content-Type", writer.getContentType());
+            response.setStatus(200);
 
             if (shouldUseCompression(request)) {
                 response.setHeader("Content-Encoding", "gzip");
-                response.setStatus(200);
                 try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.getOutputStream())) {
                     responseBuffer.writeTo(gzipOutputStream);
                 }
             } else {
                 long contentLength = responseBuffer.size();
-                if (contentLength > 0) {
+                if (contentLength > 0 && !request.getMethod().equals("HEAD")) {
                     response.setHeader("Content-Length", String.valueOf(contentLength));
                 }
-                if (!request.getMethod().equals("HEAD")) {
-                    try (OutputStream outputStream = response.getOutputStream()) {
+                try (OutputStream outputStream = response.getOutputStream()) {
+                    if (!request.getMethod().equals("HEAD")) {
                         responseBuffer.writeTo(outputStream);
                     }
                 }
             }
+        } catch (Exception e) {
+            e.printStackTrace();
         } finally {
             exchange.close();
-            threadLocalResponseBuffer.get().reset();
         }
     }
 u}(jv  (7ddc44a4283fa4d8e29a11a28cd52fa5c5277160jw  .prometheus-metrics-exporter-httpserver/pom.xmljw  addedjw  K+jw  K jw  K+jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fpom.xmlj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fpom.xmlj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X  @@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter - HTTP Server</name>
+    <description>
+        HTTP Server providing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>u}(jv  (a27b35ebd77cccc494af12dd93bf080ab90ae326jw  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.javajw  addedjw  K&jw  K jw  K&jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  XO  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the / endpoint
+ */
+public class DefaultHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public DefaultHandler() {
+        String responseString = "" +
+                "<html>\n" +
+                "<head><title>Prometheus Java Client</title></head>\n" +
+                "<body>\n" +
+                "<h1>Prometheus Java Client</h1>\n" +
+                "<p><a href=\"/metrics\">Metrics</a></p>\n" +
+                "</body>\n" +
+                "</html>\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/html; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jv  (c46cdd30a901490f29cc6889fbf157a5eecbd1b9jw  nprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javajw  addedjw  Kjw  K jw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  Xx"  @@ -0,0 +1,238 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.Authenticator;
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsServer;
+import io.prometheus.metrics.config.ExporterHttpServerProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Expose Prometheus metrics using a plain Java HttpServer.
+ * <p>
+ * Example Usage:
+ * <pre>
+ * {@code
+ * HTTPServer server = HTTPServer.newBuilder()
+ *     .withPort(9090)
+ *     .build();
+ * }</pre>
+ * */
+public class HTTPServer implements Closeable {
+
+    static {
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxReqTime")) {
+            System.setProperty("sun.net.httpserver.maxReqTime", "60");
+        }
+
+        if (!System.getProperties().containsKey("sun.net.httpserver.maxRspTime")) {
+            System.setProperty("sun.net.httpserver.maxRspTime", "600");
+        }
+    }
+
+    protected final HttpServer server;
+    protected final ExecutorService executorService;
+
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+        if (httpServer.getAddress() == null) {
+            throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
+        }
+        this.server = httpServer;
+        this.executorService = executorService;
+        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
+        registerHandler("/-/healthy", new HealthyHandler(), authenticator);
+        this.server.start();
+    }
+
+    private void registerHandler(String path, HttpHandler handler, Authenticator authenticator) {
+        HttpContext context = server.createContext(path, handler);
+        if (authenticator != null) {
+            context.setAuthenticator(authenticator);
+        }
+    }
+
+    /**
+     * Stop the HTTP server.
+     * @deprecated renamed to close(), so that the HTTPServer can be used in try-with-resources.
+     */
+    public void stop() {
+        close();
+    }
+
+    /**
+     * Stop the HTTPServer.
+     */
+    @Override
+    public void close() {
+        server.stop(0);
+        executorService.shutdown(); // Free any (parked/idle) threads in pool
+    }
+
+    /**
+     * Gets the port number.
+     */
+    public int getPort() {
+        return server.getAddress().getPort();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private Integer port = null;
+        private String hostname = null;
+        private InetAddress inetAddress = null;
+        private InetSocketAddress inetSocketAddress = null;
+        private ExecutorService executorService = null;
+        private PrometheusRegistry registry = null;
+        private ExporterHttpServerProperties properties = null;
+        private Authenticator authenticator = null;
+        private HttpsConfigurator httpsConfigurator = null;
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        /**
+         * Port to bind to. Default is 0, indicating that a random port will be selected.
+         * You can learn the randomly selected port by calling {@link HTTPServer#getPort()}.
+         */
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        /**
+         * Use this hostname to resolve the IP address to bind to.
+         * Must not be called together with {@link #withInetAddress(InetAddress)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withHostname(String hostname) {
+            this.hostname = hostname;
+            return this;
+        }
+
+        /**
+         * Bind to this IP address.
+         * Must not be called together with {@link #withHostname(String)}.
+         * Default is empty, indicating that the HTTPServer binds to the wildcard address.
+         */
+        public Builder withInetAddress(InetAddress address) {
+            this.inetAddress = address;
+            return this;
+        }
+
+        /**
+         * Optional: ExecutorService used by the {@code httpServer}.
+         */
+        public Builder withExecutorService(ExecutorService executorService) {
+            this.executorService = executorService;
+            return this;
+        }
+
+        /**
+         * Optional: Default is {@link PrometheusRegistry#defaultRegistry}.
+         */
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Optional: {@link Authenticator} for authentication.
+         */
+        public Builder withAuthenticator(Authenticator authenticator) {
+            this.authenticator = authenticator;
+            return this;
+        }
+
+        /**
+         * Optional: {@link HttpsConfigurator} for TLS/SSL
+         */
+        public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
+            this.httpsConfigurator = configurator;
+            return this;
+        }
+
+        /**
+         * Build the HTTPServer
+         */
+        public HTTPServer build() throws IOException {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            HttpServer httpServer;
+            if (httpsConfigurator != null) {
+                httpServer = HttpsServer.create(makeInetSocketAddress(), 3);
+                ((HttpsServer)httpServer).setHttpsConfigurator(httpsConfigurator);
+            } else {
+                httpServer = HttpServer.create(makeInetSocketAddress(), 3);
+            }
+            ExecutorService executorService = makeExecutorService();
+            httpServer.setExecutor(executorService);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+        }
+
+        private InetSocketAddress makeInetSocketAddress() {
+            if (inetSocketAddress != null) {
+                assertNull(port, "cannot configure 'inetSocketAddress' and 'port' at the same time");
+                assertNull(hostname, "cannot configure 'inetSocketAddress' and 'hostname' at the same time");
+                assertNull(inetAddress, "cannot configure 'inetSocketAddress' and 'inetAddress' at the same time");
+                return inetSocketAddress;
+            } else if (inetAddress != null) {
+                assertNull(hostname, "cannot configure 'inetAddress' and 'hostname' at the same time");
+                return new InetSocketAddress(inetAddress, findPort());
+            } else if (hostname != null) {
+                return new InetSocketAddress(hostname, findPort());
+            } else {
+                return new InetSocketAddress(findPort());
+            }
+        }
+
+        private ExecutorService makeExecutorService() {
+            if (executorService != null) {
+                return executorService;
+            } else {
+                ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newCachedThreadPool(NamedDaemonThreadFactory.defaultThreadFactory(true));
+                executor.setKeepAliveTime(2, TimeUnit.MINUTES);
+                return executor;
+            }
+        }
+
+        private int findPort() {
+            if (properties != null && properties.getPort() != null) {
+                return properties.getPort(); // you can overwrite the hard-coded port with properties.
+            }
+            if (port != null) {
+                return port;
+            }
+            return 0; // random port will be selected
+        }
+
+        private void assertNull(Object o, String msg) {
+            if (o != null) {
+                throw new IllegalStateException(msg);
+            }
+        }
+    }
+}u}(jv  (03b647d99ed2bc1d67a3c66a11c33d900b53d501jw  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.javajw  addedjw  Kjw  K jw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHealthyHandler.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X5  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handler for the /-/healthy endpoint
+ */
+public class HealthyHandler implements HttpHandler {
+
+    private final byte[] responseBytes;
+    private final String contentType;
+
+    public HealthyHandler() {
+        String responseString = "Exporter is healthy.\n";
+        this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);
+        this.contentType = "text/plain; charset=utf-8";
+    }
+
+    @Override
+    public void handle(HttpExchange exchange) throws IOException {
+        exchange.getResponseHeaders().set("Content-Type", contentType);
+        exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length));
+        exchange.sendResponseHeaders(200, responseBytes.length);
+        exchange.getResponseBody().write(responseBytes);
+        exchange.close();
+    }
+}u}(jv  (496f2c5f1758223ef30f57581871095a0fa801f9jw  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javajw  addedjw  KYjw  K jw  KYjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X4  @@ -0,0 +1,89 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final HttpExchange httpExchange;
+    private final HttpRequest request = new HttpRequest();
+    private final HttpResponse response = new HttpResponse();
+
+    public HttpExchangeAdapter(HttpExchange httpExchange) {
+        this.httpExchange = httpExchange;
+    }
+
+    public class HttpRequest implements PrometheusHttpRequest {
+
+        @Override
+        public String getQueryString() {
+            return httpExchange.getRequestURI().getRawQuery();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            List<String> headers = httpExchange.getRequestHeaders().get(name);
+            if (headers == null) {
+                return Collections.emptyEnumeration();
+            } else {
+                return Collections.enumeration(headers);
+            }
+        }
+
+        @Override
+        public String getMethod() {
+            return httpExchange.getRequestMethod();
+        }
+    }
+
+    public class HttpResponse implements PrometheusHttpResponse {
+
+        private int status = 0;
+
+        @Override
+        public void setHeader(String name, String value) {
+            httpExchange.getResponseHeaders().set(name, value);
+        }
+
+        @Override
+        public void setStatus(int statusCode) {
+            this.status = statusCode;
+        }
+
+        @Override
+        public OutputStream getOutputStream() throws IOException {
+            // This implementation assumes that getOutputStream() is called exactly once,
+            // and setStatus() is called prior to that.
+            List<String> contentLengthHeaders = httpExchange.getResponseHeaders().get("Content-Length");
+            if (contentLengthHeaders == null || contentLengthHeaders.size() == 0) {
+                httpExchange.sendResponseHeaders(status, 0);
+            } else {
+                httpExchange.sendResponseHeaders(status, Long.parseLong(contentLengthHeaders.get(0)));
+            }
+            return httpExchange.getResponseBody();
+        }
+    }
+
+    @Override
+    public HttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void close() {
+        httpExchange.close();
+    }
+}u}(jv  (5fcc4f00fe204aff8d97a7a6a29dbfdb9a4b2ac4jw  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/MetricsHandler.javajw  addedjw  K&jw  K jw  K&jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FMetricsHandler.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.io.IOException;
+
+/**
+ * Handler for the /metrics endpoint
+ */
+public class MetricsHandler implements HttpHandler {
+
+    private final PrometheusScrapeHandler prometheusScrapeHandler;
+
+    public MetricsHandler() {
+        prometheusScrapeHandler = new PrometheusScrapeHandler();
+    }
+
+    public MetricsHandler(PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(registry);
+    }
+
+    public MetricsHandler(PrometheusProperties config) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config);
+    }
+
+    public MetricsHandler(PrometheusProperties config, PrometheusRegistry registry) {
+        prometheusScrapeHandler = new PrometheusScrapeHandler(config, registry);
+    }
+
+    @Override
+    public void handle(HttpExchange t) throws IOException {
+        prometheusScrapeHandler.handleRequest(new HttpExchangeAdapter(t));
+    }
+}u}(jv  (378ac6ddc334fbe20d07b3510cf6434894770c6bjw  |prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/NamedDaemonThreadFactory.javajw  addedjw  Kjw  K jw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FNamedDaemonThreadFactory.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  Xn  @@ -0,0 +1,31 @@
+package io.prometheus.metrics.exporter.httpserver;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class NamedDaemonThreadFactory implements ThreadFactory {
+
+    private static final AtomicInteger POOL_NUMBER = new AtomicInteger(1);
+    private final int poolNumber = POOL_NUMBER.getAndIncrement();
+    private final AtomicInteger threadNumber = new AtomicInteger(1);
+    private final ThreadFactory delegate;
+    private final boolean daemon;
+
+    NamedDaemonThreadFactory(ThreadFactory delegate, boolean daemon) {
+        this.delegate = delegate;
+        this.daemon = daemon;
+    }
+
+    @Override
+    public Thread newThread(Runnable r) {
+        Thread t = delegate.newThread(r);
+        t.setName(String.format("prometheus-http-%d-%d", poolNumber, threadNumber.getAndIncrement()));
+        t.setDaemon(daemon);
+        return t;
+    }
+
+    static ThreadFactory defaultThreadFactory(boolean daemon) {
+        return new NamedDaemonThreadFactory(Executors.defaultThreadFactory(), daemon);
+    }
+}u}(jv  (318e865f55bdd893d762a5f4e759a502e8bbc983jw  8prometheus-metrics-exporter-httpserver/version-rules.xmljw  addedjw  Kjw  K jw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-httpserver%2Fversion-rules.xmlj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fversion-rules.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(jv  (b1c66016cfdc4f59a83c31ac7ee7d316190cab79jw  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljw  modifiedjw  Kjw  Kjw  K	jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X  @@ -11,7 +11,7 @@
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <name>Prometheus Metrics Exporter - Servlet Jakarta</name>
     <description>
         Jakarta Servlet for exposing a Prometheus scrape endpoint.
     </description>
@@ -35,12 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exporter-common</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>u}(jv  (72020cdaafa32fdee0302b21827ef983dbd5865ajw  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javajw  addedjw  KUjw  K jw  KUjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java|      j#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  XC	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.exporter.common.PrometheusHttpExchange;
+import io.prometheus.metrics.exporter.common.PrometheusHttpRequest;
+import io.prometheus.metrics.exporter.common.PrometheusHttpResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+public class HttpExchangeAdapter implements PrometheusHttpExchange {
+
+    private final Request request;
+    private final Response response;
+
+    public HttpExchangeAdapter(HttpServletRequest request, HttpServletResponse response) {
+        this.request = new Request(request);
+        this.response = new Response(response);
+    }
+
+    @Override
+    public PrometheusHttpRequest getRequest() {
+        return request;
+    }
+
+    @Override
+    public PrometheusHttpResponse getResponse() {
+        return response;
+    }
+
+    @Override
+    public void close() {
+        // nothing to do for Servlets.
+    }
+
+    public static class Request implements PrometheusHttpRequest {
+
+        private final HttpServletRequest request;
+
+        public Request(HttpServletRequest request) {
+            this.request = request;
+        }
+
+        @Override
+        public String getQueryString() {
+            return request.getQueryString();
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            return request.getHeaders(name);
+        }
+
+        @Override
+        public String getMethod() {
+            return request.getMethod();
+        }
+    }
+
+    public static class Response implements PrometheusHttpResponse {
+
+        private final HttpServletResponse response;
+
+        public Response(HttpServletResponse response) {
+            this.response = response;
+        }
+
+        @Override
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        @Override
+        public void setStatus(int statusCode) {
+            response.setStatus(statusCode);
+        }
+
+        @Override
+        public OutputStream getOutputStream() throws IOException {
+            return response.getOutputStream();
+        }
+    }
+}u}(jv  (94dcf83eb0dd5a75fcb5419bc00001c8dc14443ejw  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javajw  modifiedjw  Kjw  K4jw  K8jw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj#w  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X(  @@ -1,17 +1,13 @@
 package io.prometheus.metrics.exporter.servlet.jakarta;
 
-import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
-import io.prometheus.metrics.expositionformats.ExpositionFormats;
-import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.exporter.common.PrometheusScrapeHandler;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import jakarta.servlet.http.HttpServlet;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 
 import java.io.IOException;
-import java.util.function.Predicate;
 
 /**
  * Initial example exporter so that we can try the new metrics library out.
@@ -20,10 +16,7 @@
  */
 public class PrometheusMetricsServlet extends HttpServlet {
 
-    private final PrometheusRegistry registry;
-
-    private final ExpositionFormats expositionFormats;
-    private final Predicate<String> nameFilter;
+    private final PrometheusScrapeHandler handler;
 
     public PrometheusMetricsServlet() {
         this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
@@ -38,52 +31,11 @@ public PrometheusMetricsServlet(PrometheusProperties config) {
     }
 
     public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
-        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
-        this.registry = registry;
-        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
-    }
-
-    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
-        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
-            return null;
-        } else {
-            return MetricNameFilter.newBuilder()
-                    .nameMustBeEqualTo(props.getAllowedNames())
-                    .nameMustNotBeEqualTo(props.getExcludedNames())
-                    .nameMustStartWith(props.getAllowedPrefixes())
-                    .nameMustNotStartWith(props.getExcludedPrefixes())
-                    .build();
-        }
+        this.handler = new PrometheusScrapeHandler(config, registry);
     }
 
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        Predicate<String> filter = nameFilter;
-        String[] allowedNames = request.getParameterValues("name[]");
-        if (allowedNames != null) {
-            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
-        }
-        String debugParam = request.getParameter("debug");
-        if (debugParam != null) {
-            switch (debugParam) {
-                case "openmetrics":
-                    response.setContentType("text/plain");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "text":
-                    response.setContentType("text/plain");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
-                    return;
-                case "prometheus-protobuf":
-                    response.setContentType("text/plain");
-                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
-                    response.getWriter().write(debugString);
-                    return;
-            }
-        }
-        String acceptHeader = request.getHeader("Accept");
-        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
-        response.setContentType(writer.getContentType());
-        writer.write(response.getOutputStream(), registry.scrape(filter));
+        handler.handleRequest(new HttpExchangeAdapter(request, response));
     }
 }u}(jv  (bbaf0c59c2267c445c14f7b7a3a2320ec1c2bcfejw  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajw  modifiedjw  Kjw  Kjw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  X_  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -29,7 +29,6 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.u}(jv  (d85e87b7a979ca3a0d01e968058788e62bc0cbbfjw  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajw  modifiedjw  Kjw  K jw  Kjw  https://github.com/prometheus/client_java/blob/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj!w  https://github.com/prometheus/client_java/raw/46d17e6602452fc3cff7d8fafaf06f09db17374b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj#w  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=46d17e6602452fc3cff7d8fafaf06f09db17374bj%w  @@ -105,4 +105,5 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         return result.build();
     }
+
 }ueu(5ffc1e4bad21be8459a1dde4010993fcb2570f57}(sha(5ffc1e4bad21be8459a1dde4010993fcb2570f57node_idEC_kwDOAHoJt9oAKDVmZmMxZTRiYWQyMWJlODQ1OWExZGRlNDAxMDk5M2ZjYjI1NzBmNTccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-22T20:56:47Zu	committer}(jw  Fabian Stäberjw  fabian@fstab.dejw  2023-08-22T20:56:47Zumessage	Fix buildtree}(jw  (d08cdc3168fb55baad0508d627ede5b065009e37urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d08cdc3168fb55baad0508d627ede5b065009e37ujw  hhttps://api.github.com/repos/prometheus/client_java/git/commits/5ffc1e4bad21be8459a1dde4010993fcb2570f57
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujw  dhttps://api.github.com/repos/prometheus/client_java/commits/5ffc1e4bad21be8459a1dde4010993fcb2570f57html_urlYhttps://github.com/prometheus/client_java/commit/5ffc1e4bad21be8459a1dde4010993fcb2570f57comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/5ffc1e4bad21be8459a1dde4010993fcb2570f57/commentsjw  }(loginfstabidJ' jw  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jw  "https://api.github.com/users/fstabjw  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujw  }(jw  fstabjw  J' jw  MDQ6VXNlcjMzMDUzNQ==jw  2https://avatars.githubusercontent.com/u/330535?v=4jw  h3jw  "https://api.github.com/users/fstabjw  https://github.com/fstabjw  ,https://api.github.com/users/fstab/followersjw  9https://api.github.com/users/fstab/following{/other_user}jw  2https://api.github.com/users/fstab/gists{/gist_id}jw  9https://api.github.com/users/fstab/starred{/owner}{/repo}jw  0https://api.github.com/users/fstab/subscriptionsjw  'https://api.github.com/users/fstab/orgsjw  (https://api.github.com/users/fstab/reposjw  3https://api.github.com/users/fstab/events{/privacy}jw  2https://api.github.com/users/fstab/received_eventsjw  Userjw  uparents]}(jw  (61548310ecf100254dea23427e0eb911e8148a17jw  dhttps://api.github.com/repos/prometheus/client_java/commits/61548310ecf100254dea23427e0eb911e8148a17jw  Yhttps://github.com/prometheus/client_java/commit/61548310ecf100254dea23427e0eb911e8148a17uastats}(totalK	additionsK		deletionsKufiles](}(jw  (1553d27d1930ceafbf8735bc3ffb40b70251a40afilename.circleci/config.ymlstatusmodifiedjx  Kjx  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/5ffc1e4bad21be8459a1dde4010993fcb2570f57/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/5ffc1e4bad21be8459a1dde4010993fcb2570f57/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=5ffc1e4bad21be8459a1dde4010993fcb2570f57patchXo  @@ -16,7 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(jw  (e1c406efb76d7e7c1546c103d2ebd1b289878779jx  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj!x  modifiedjx  Kjx  Kj#x  Kj$x  https://github.com/prometheus/client_java/blob/5ffc1e4bad21be8459a1dde4010993fcb2570f57/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj&x  https://github.com/prometheus/client_java/raw/5ffc1e4bad21be8459a1dde4010993fcb2570f57/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj(x  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=5ffc1e4bad21be8459a1dde4010993fcb2570f57j*x  X  @@ -10,7 +10,6 @@
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
-    <packaging>bundle</packaging>
 
     <name>Shaded OpenTelemetry</name>
     <description>
@@ -102,18 +101,20 @@
                             </relocations>
                             <transformers>
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
                             </transformers>
                             <filters>
                                 <filter>
                                     <artifact>*:*</artifact>
                                     <excludes>
-                                        <exclude>META-INF/maven//org.jctools/**</exclude>
-                                        <exclude>META-INF/maven//org.jetbrains/**</exclude>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
                                         <exclude>META-INF/versions/**</exclude>
                                         <exclude>META-INF/native-image/**</exclude>
                                         <exclude>META-INF/services/**</exclude>
                                         <exclude>META-INF/proguard/**</exclude>
                                         <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
                                     </excludes>
                                 </filter>
                             </filters>u}(jw  (b856ef185427b3939f8b4292d464b4b9f1de817cjx  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj!x  modifiedjx  Kjx  Kj#x  Kj$x  https://github.com/prometheus/client_java/blob/5ffc1e4bad21be8459a1dde4010993fcb2570f57/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj&x  https://github.com/prometheus/client_java/raw/5ffc1e4bad21be8459a1dde4010993fcb2570f57/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj(x  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=5ffc1e4bad21be8459a1dde4010993fcb2570f57j*x  X  @@ -10,7 +10,6 @@
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
-    <packaging>bundle</packaging>
 
     <name>Shaded Protobuf</name>
     <description>
@@ -71,12 +70,16 @@
                                     <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
                                 </relocation>
                             </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
                             <filters>
                                 <filter>
                                     <artifact>*:*</artifact>
                                     <excludes>
                                         <exclude>META-INF/maven/com.google.protobuf/**</exclude>
                                         <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
                                     </excludes>
                                 </filter>
                             </filters>ueu(97add1a3faa5e10c3f1c8c2ea06cf765b692f045}(sha(97add1a3faa5e10c3f1c8c2ea06cf765b692f045node_idEC_kwDOAHoJt9oAKDk3YWRkMWEzZmFhNWUxMGMzZjFjOGMyZWEwNmNmNzY1YjY5MmYwNDUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-29T12:11:07Zu	committer}(jFx  Fabian StäberjHx  fabian@fstab.dejJx  2023-06-29T12:34:09ZumessageRenamingtree}(j>x  (ef7e2b4f3c01e13adc2ad95a03fff8ad9bac6466urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ef7e2b4f3c01e13adc2ad95a03fff8ad9bac6466ujVx  hhttps://api.github.com/repos/prometheus/client_java/git/commits/97add1a3faa5e10c3f1c8c2ea06cf765b692f045
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujVx  dhttps://api.github.com/repos/prometheus/client_java/commits/97add1a3faa5e10c3f1c8c2ea06cf765b692f045html_urlYhttps://github.com/prometheus/client_java/commit/97add1a3faa5e10c3f1c8c2ea06cf765b692f045comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/commentsjDx  }(loginfstabidJ' j@x  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jVx  "https://api.github.com/users/fstabjbx  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujLx  }(jgx  fstabjix  J' j@x  MDQ6VXNlcjMzMDUzNQ==jkx  2https://avatars.githubusercontent.com/u/330535?v=4jmx  h3jVx  "https://api.github.com/users/fstabjbx  https://github.com/fstabjpx  ,https://api.github.com/users/fstab/followersjrx  9https://api.github.com/users/fstab/following{/other_user}jtx  2https://api.github.com/users/fstab/gists{/gist_id}jvx  9https://api.github.com/users/fstab/starred{/owner}{/repo}jxx  0https://api.github.com/users/fstab/subscriptionsjzx  'https://api.github.com/users/fstab/orgsj|x  (https://api.github.com/users/fstab/reposj~x  3https://api.github.com/users/fstab/events{/privacy}jx  2https://api.github.com/users/fstab/received_eventsjx  Userjx  uparents]}(j>x  (95a92120e52148f3fa2cacc0ac9fccb45f8e7193jVx  dhttps://api.github.com/repos/prometheus/client_java/commits/95a92120e52148f3fa2cacc0ac9fccb45f8e7193jbx  Yhttps://github.com/prometheus/client_java/commit/95a92120e52148f3fa2cacc0ac9fccb45f8e7193uastats}(totalM	additionsMu	deletionsMufiles](}(j>x  (060b52bce5adae651f1243512856cbbc5a491026filenameTprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javastatusmodifiedjx  Kjx  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaraw_urlhttps://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045patchX1  @@ -1,14 +1,14 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Supplier;
 
-class Buffer<T extends MetricData> {
+class Buffer {
 
     private static final long signBit = 1L << 63;
     private final AtomicLong observationCount = new AtomicLong(0);
@@ -41,11 +41,11 @@ private void doAppend(double amount) {
     /**
      * Must be called by the runnable in the run() method.
      */
-    public void reset() {
+    void reset() {
         reset = true;
     }
 
-    T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
+    <T extends DataPointSnapshot> T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
         double[] buffer;
         int bufferSize;
         T result;u}(j>x  (ec3ae9a06f689fb52226febe54c2d29682d2155cjx  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -17,7 +17,7 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.DoubleSupplier;
 
-public class Counter extends StatefulMetric<CounterDataPoint, Counter.CounterData> implements CounterDataPoint, Collector {
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -60,17 +60,17 @@ public void incWithExemplar(double amount, Labels labels) {
 
 
     @Override
-    protected CounterData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new CounterData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new CounterData(null);
+            return new DataPoint(null);
         }
     }
 
     @Override
-    protected CounterSnapshot collect(List<Labels> labels, List<CounterData> metricData) {
-        List<CounterSnapshot.CounterData> data = new ArrayList<>(labels.size());
+    protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<CounterSnapshot.CounterDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -97,7 +97,7 @@ private static String normalizeName(String name) {
         return name;
     }
 
-    class CounterData implements CounterDataPoint {
+    class DataPoint implements CounterDataPoint {
 
         private final DoubleAdder doubleValue = new DoubleAdder();
         // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
@@ -107,7 +107,7 @@ class CounterData implements CounterDataPoint {
         private final long createdTimeMillis = System.currentTimeMillis();
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private CounterData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -157,7 +157,7 @@ private void validateAndAdd(double amount) {
             doubleValue.add(amount);
         }
 
-        private CounterSnapshot.CounterData collect(Labels labels) {
+        private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -170,7 +170,7 @@ private CounterSnapshot.CounterData collect(Labels labels) {
                     }
                 }
             }
-            return new CounterSnapshot.CounterData(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, oldest, createdTimeMillis);
         }
     }
 
@@ -208,7 +208,7 @@ private FromCallback(Counter.FromCallback.Builder builder) {
 
         @Override
         public CounterSnapshot collect() {
-            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterData(
+            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterDataPointSnapshot(
                     callback.getAsDouble(),
                     constLabels,
                     null,u}(j>x  (b45c4bfe601c6ee4d70bfa213c74ffb2d6c3f74djx  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javajx  modifiedjx  K
jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X
  @@ -15,7 +15,7 @@
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.DoubleSupplier;
 
-public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.GaugeData> implements GaugeDataPoint {
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
 
     private final boolean exemplarsEnabled;
     private final ExemplarSamplerConfig exemplarSamplerConfig;
@@ -57,20 +57,20 @@ public GaugeSnapshot collect() {
     }
 
     @Override
-    protected GaugeSnapshot collect(List<Labels> labels, List<GaugeData> metricData) {
-        List<GaugeSnapshot.GaugeData> data = new ArrayList<>(labels.size());
+    protected GaugeSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPointSnapshots = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(metricData.get(i).collect(labels.get(i)));
+            dataPointSnapshots.add(metricData.get(i).collect(labels.get(i)));
         }
-        return new GaugeSnapshot(getMetadata(), data);
+        return new GaugeSnapshot(getMetadata(), dataPointSnapshots);
     }
 
     @Override
-    protected GaugeData newMetricData() {
+    protected DataPoint newDataPoint() {
         if (isExemplarsEnabled()) {
-            return new GaugeData(new ExemplarSampler(exemplarSamplerConfig));
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
         } else {
-            return new GaugeData(null);
+            return new DataPoint(null);
         }
     }
 
@@ -79,11 +79,11 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    class GaugeData implements GaugeDataPoint {
+    class DataPoint implements GaugeDataPoint {
 
         private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
 
-        private GaugeData(ExemplarSampler exemplarSampler) {
+        private DataPoint(ExemplarSampler exemplarSampler) {
             this.exemplarSampler = exemplarSampler;
         }
 
@@ -121,7 +121,7 @@ public void setWithExemplar(double value, Labels labels) {
             }
         }
 
-        private GaugeSnapshot.GaugeData collect(Labels labels) {
+        private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
             // Read the exemplar first. Otherwise, there is a race condition where you might
             // see an Exemplar for a value that's not represented in getValue() yet.
             // If there are multiple Exemplars (by default it's just one), use the oldest
@@ -134,7 +134,7 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
                     }
                 }
             }
-            return new GaugeSnapshot.GaugeData(Double.longBitsToDouble(value.get()), labels, oldest);
+            return new GaugeSnapshot.GaugeDataPointSnapshot(Double.longBitsToDouble(value.get()), labels, oldest);
         }
     }
 
@@ -167,7 +167,7 @@ private FromCallback(Gauge.FromCallback.Builder builder) {
         @Override
         public GaugeSnapshot collect() {
             return new GaugeSnapshot(getMetadata(), Collections.singletonList(
-                    new GaugeSnapshot.GaugeData(callback.getAsDouble(), constLabels, null)
+                    new GaugeSnapshot.GaugeDataPointSnapshot(callback.getAsDouble(), constLabels, null)
             ));
         }
 u}(j>x  (c3cf0d21de6adf5cabdc5eb427654aa871888e85jx  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X}  @@ -40,7 +40,7 @@
  * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
  * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
  */
-public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.HistogramData> implements DistributionDataPoint {
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.DataPoint> implements DistributionDataPoint {
 
     // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
     private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
@@ -139,7 +139,7 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
-    public class HistogramData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
         private final LongAdder[] classicBuckets;
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
         private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
@@ -149,11 +149,11 @@ public class HistogramData implements DistributionDataPoint {
         private volatile int nativeSchema = nativeInitialSchema; // integer in [-4, 8] or CLASSIC_HISTOGRAM
         private volatile double nativeZeroThreshold = Histogram.this.nativeMinZeroThreshold;
         private volatile long createdTimeMillis = System.currentTimeMillis();
-        private final Buffer<HistogramSnapshot.HistogramData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
         private volatile boolean resetDurationExpired = false;
         private final ExemplarSampler exemplarSampler;
 
-        private HistogramData() {
+        private DataPoint() {
             if (exemplarsEnabled) {
                 exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
             } else {
@@ -225,14 +225,14 @@ private void doObserve(double value, boolean fromBuffer) {
             }
         }
 
-        public HistogramSnapshot.HistogramData collect(Labels labels) {
+        public HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
             Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     () -> {
                         if (classicUpperBounds.length == 0) {
                             // native only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     nativeSchema,
                                     nativeZeroCount.sum(),
                                     nativeZeroThreshold,
@@ -244,15 +244,15 @@ public HistogramSnapshot.HistogramData collect(Labels labels) {
                                     createdTimeMillis);
                         } else if (Histogram.this.nativeInitialSchema == CLASSIC_HISTOGRAM) {
                             // classic only
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     sum.sum(),
                                     labels,
                                     exemplars,
                                     createdTimeMillis);
                         } else {
                             // hybrid: classic and native
-                            return new HistogramSnapshot.HistogramData(
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
                                     ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
                                     nativeSchema,
                                     nativeZeroCount.sum(),
@@ -567,8 +567,8 @@ public HistogramSnapshot collect() {
     }
 
     @Override
-    protected HistogramSnapshot collect(List<Labels> labels, List<HistogramData> metricData) {
-        List<HistogramSnapshot.HistogramData> data = new ArrayList<>(labels.size());
+    protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<HistogramSnapshot.HistogramDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
@@ -587,8 +587,8 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
     @Override
-    protected HistogramData newMetricData() {
-        return new HistogramData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     static {u}(j>x  (42269340f42744e413e4b1cc4d7869adea1c348djx  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -30,7 +30,7 @@ public void info(Labels labels) {
 
     @Override
     public InfoSnapshot collect() {
-        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoData(labels.merge(constLabels))));
+        return new InfoSnapshot(getMetadata(), Collections.singletonList(new InfoSnapshot.InfoDataPointSnapshot(labels.merge(constLabels))));
     }
 
     public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {u}(j>x  (467f8860b93cb348c452380a8446ae64bf756673jx  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -12,7 +12,7 @@
 import java.util.stream.Stream;
 
 // experimental
-public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.StateSetData> implements StateSetDataPoint {
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
 
     private final boolean exemplarsEnabled;
     private final String[] names;
@@ -35,17 +35,17 @@ public StateSetSnapshot collect() {
     }
 
     @Override
-    protected StateSetSnapshot collect(List<Labels> labels, List<StateSetData> metricDataList) {
-        List<StateSetSnapshot.StateSetData> data = new ArrayList<>(labels.size());
+    protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
+        List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
-            data.add(new StateSetSnapshot.StateSetData(names, metricDataList.get(i).values, labels.get(i)));
+            data.add(new StateSetSnapshot.StateSetDataPointSnapshot(names, metricDataList.get(i).values, labels.get(i)));
         }
         return new StateSetSnapshot(getMetadata(), data);
     }
 
     @Override
-    protected StateSetData newMetricData() {
-        return new StateSetData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -63,11 +63,11 @@ public void setFalse(String state) {
         getNoLabels().setFalse(state);
     }
 
-    class StateSetData implements StateSetDataPoint {
+    class DataPoint implements StateSetDataPoint {
 
         private final boolean[] values = new boolean[names.length];
 
-        private StateSetData() {
+        private DataPoint() {
         }
 
         @Overrideu}(j>x  (5d4998fe80bdc45c53ab29f8797a4b0ca891aee1jx  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajx  modifiedjx  Kjx  Kjx  K&jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X>  @@ -27,19 +27,19 @@
  * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
  * but this has nothing to do with multi-threading.
  */
-abstract class StatefulMetric<O extends DataPoint, V extends O> extends MetricWithFixedMetadata {
+abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
 
     /**
      * Map from variableLabelValues to MetricData.
      */
-    private final ConcurrentHashMap<List<String>, V> data = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
 
     /**
      * Shortcut to data.get(Collections.emptyList())
      */
-    private volatile V noLabels;
+    private volatile T noLabels;
 
     protected StatefulMetric(Builder<?, ?> builder) {
         super(builder);
@@ -51,45 +51,45 @@ protected StatefulMetric(Builder<?, ?> builder) {
     /**
      * labels and metricData have the same size. labels.get(i) are the labels for metricData.get(i).
      */
-    protected abstract MetricSnapshot collect(List<Labels> labels, List<V> metricData);
+    protected abstract MetricSnapshot collect(List<Labels> labels, List<T> metricData);
 
     public MetricSnapshot collect() {
         if (labelNames.length == 0 && data.size() == 0) {
             // This is a metric without labels that has not been used yet. Initialize the data on the fly.
             withLabelValues();
         }
         List<Labels> labels = new ArrayList<>(data.size());
-        List<V> metricData = new ArrayList<>(data.size());
-        for (Map.Entry<List<String>, V> entry : data.entrySet()) {
+        List<T> metricData = new ArrayList<>(data.size());
+        for (Map.Entry<List<String>, T> entry : data.entrySet()) {
             String[] variableLabelValues = entry.getKey().toArray(new String[labelNames.length]);
             labels.add(constLabels.merge(labelNames, variableLabelValues));
             metricData.add(entry.getValue());
         }
         return collect(labels, metricData);
     }
 
-    public O withLabelValues(String... labelValues) {
+    public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
                 throw new IllegalArgumentException("The " + getClass().getSimpleName() + " was created with label names, so you must call withLabelValues() when using it.");
             } else {
                 throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
             }
         }
-        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newMetricData());
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
     // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }
 
-    protected abstract V newMetricData();
+    protected abstract T newDataPoint();
 
-    protected V getNoLabels() {
+    protected T getNoLabels() {
         if (noLabels == null) {
             // Note that this will throw an IllegalArgumentException if labelNames is not empty.
-            noLabels = (V) withLabelValues();
+            noLabels = (T) withLabelValues();
         }
         return noLabels;
     }
@@ -125,22 +125,6 @@ protected <T> T getConfigProperty(MetricProperties[] properties, Function<Metric
 
     protected abstract boolean isExemplarsEnabled();
 
-    /*
-    protected boolean isExemplarsEnabled() {
-        if (exemplarsEnabled != null) {
-            return exemplarsEnabled;
-        } else {
-            return DefaultExemplarConfig.isEnabledByDefault();
-        }
-    }
-     */
-
-    /*
-    protected boolean hasSpanContextSupplier() {
-        return exemplarConfig != null ? exemplarConfig.hasSpanContextSupplier() : DefaultExemplarConfig.hasSpanContextSupplier();
-    }
-     */
-
     static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;u}(j>x  (2cb1440283be44ed998b037a81ebbe25fb149f6ejx  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javajx  modifiedjx  K
jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -16,7 +16,7 @@
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
-public class Summary extends StatefulMetric<DistributionDataPoint, Summary.SummaryData> implements DistributionDataPoint {
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
 
     private final boolean exemplarsEnabled;
     private final List<CKMSQuantiles.Quantile> quantiles; // Can be empty, but can never be null.
@@ -55,17 +55,17 @@ public SummarySnapshot collect() {
     }
 
     @Override
-    protected SummarySnapshot collect(List<Labels> labels, List<SummaryData> metricData) {
-        List<SummarySnapshot.SummaryData> data = new ArrayList<>(labels.size());
+    protected SummarySnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<SummarySnapshot.SummaryDataPointSnapshot> data = new ArrayList<>(labels.size());
         for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
         return new SummarySnapshot(getMetadata(), data);
     }
 
     @Override
-    protected SummaryData newMetricData() {
-        return new SummaryData();
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
     }
 
     @Override
@@ -79,16 +79,16 @@ public void observeWithExemplar(double amount, Labels labels) {
     }
 
 
-    public class SummaryData implements DistributionDataPoint {
+    public class DataPoint implements DistributionDataPoint {
 
         private final LongAdder count = new LongAdder();
         private final DoubleAdder sum = new DoubleAdder();
         private final TimeWindowQuantiles quantileValues;
-        private final Buffer<SummarySnapshot.SummaryData> buffer = new Buffer<>();
+        private final Buffer buffer = new Buffer();
 
         private final long createdTimeMillis = System.currentTimeMillis();
 
-        private SummaryData() {
+        private DataPoint() {
             if (quantiles.size() > 0) {
                 quantileValues = new TimeWindowQuantiles(quantiles.toArray(new CKMSQuantiles.Quantile[]{}), maxAgeSeconds, ageBuckets);
             } else {
@@ -119,11 +119,11 @@ private void doObserve(double amount) {
             count.increment();
         }
 
-        public SummarySnapshot.SummaryData collect(Labels labels) {
+        public SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
             return buffer.run(
                     expectedCount -> count.sum() == expectedCount,
                     // TODO Exemplars (are hard-coded as empty in the line below)
-                    () -> new SummarySnapshot.SummaryData(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
+                    () -> new SummarySnapshot.SummaryDataPointSnapshot(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
                     this::doObserve
             );
         }u}(j>x  (0efa6ee4a3d203aa207aa48ea48c63f7416c9a43jx  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  Xg  @@ -54,7 +54,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private CounterSnapshot.CounterData getData(Counter counter, String... labels) {
+    private CounterSnapshot.CounterDataPointSnapshot getData(Counter counter, String... labels) {
         return counter.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()
@@ -140,9 +140,9 @@ public void testSnapshotComplete() {
         Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
         Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
         Assert.assertEquals(2, snapshot.getData().size());
-        Iterator<CounterSnapshot.CounterData> iter = snapshot.getData().iterator();
+        Iterator<CounterSnapshot.CounterDataPointSnapshot> iter = snapshot.getData().iterator();
         // data is ordered by labels, so 200 comes before 500
-        CounterSnapshot.CounterData data = iter.next();
+        CounterSnapshot.CounterDataPointSnapshot data = iter.next();
         Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
         Assert.assertEquals(2, data.getValue(), 0.0001);
         Assert.assertTrue(data.getCreatedTimestampMillis() >= before);u}(j>x  (63f94f5ae8dc66dac36dbd97e8f9213b1d08c233jx  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -36,7 +36,7 @@ public void tearDown() {
         SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
-    private GaugeSnapshot.GaugeData getData(Gauge gauge, String... labels) {
+    private GaugeSnapshot.GaugeDataPointSnapshot getData(Gauge gauge, String... labels) {
         return ((GaugeSnapshot) gauge.collect()).getData().stream()
                 .filter(data -> data.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(j>x  (3e7892b5e3207a9c34d49ad012a6b01901c3f44djx  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -77,7 +77,7 @@ private void run() throws NoSuchFieldException, IllegalAccessException {
             System.out.println("Running " + name + "...");
             for (double observation : observations) {
                 if (observation == RESET_DURATION_REACHED) {
-                    Field resetAllowed = Histogram.HistogramData.class.getDeclaredField("resetDurationExpired");
+                    Field resetAllowed = Histogram.DataPoint.class.getDeclaredField("resetDurationExpired");
                     resetAllowed.setAccessible(true);
                     resetAllowed.set(histogram.getNoLabels(), true);
                 } else {
@@ -619,14 +619,14 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
         double[] expectedUpperBounds = new double[]{0.25, 1, 4, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.5, 1, 2, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
                 0.8408964152537144, 1, 1.189207115002721, Double.MAX_VALUE, Double.POSITIVE_INFINITY};
-        Method method = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method method = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         method.setAccessible(true);
         for (int i = 0; i < indexes.length; i++) {
             Histogram histogram = Histogram.newBuilder()
                     .withName("test")
                     .withNativeInitialSchema(schemas[i])
                     .build();
-            Histogram.HistogramData histogramData = histogram.newMetricData();
+            Histogram.DataPoint histogramData = histogram.newDataPoint();
             double result = (double) method.invoke(histogramData, schemas[i], indexes[i]);
             Assert.assertEquals("index=" + indexes[i] + ", schema=" + schemas[i], expectedUpperBounds[i], result, 0.0000000000001);
         }
@@ -638,8 +638,8 @@ public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, In
     @Test
     public void testFindBucketIndex() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
         Random rand = new Random();
-        Method findBucketIndex = Histogram.HistogramData.class.getDeclaredMethod("findBucketIndex", double.class);
-        Method nativeBucketIndexToUpperBound = Histogram.HistogramData.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        Method findBucketIndex = Histogram.DataPoint.class.getDeclaredMethod("findBucketIndex", double.class);
+        Method nativeBucketIndexToUpperBound = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
         findBucketIndex.setAccessible(true);
         nativeBucketIndexToUpperBound.setAccessible(true);
         for (int schema = -4; schema <= 8; schema++) {
@@ -849,7 +849,7 @@ public void markCurrentSpanAsExemplar() {
     }
 
     private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... labels) {
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("Labels not found"));
@@ -907,7 +907,7 @@ private void assertExemplar(Histogram histogram, double value, String... labels)
         double lowerBound = Double.NEGATIVE_INFINITY;
         double upperBound = Double.POSITIVE_INFINITY;
         HistogramSnapshot snapshot = histogram.collect();
-        HistogramSnapshot.HistogramData data = snapshot.getData().stream()
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
                 .filter(d -> d.getLabels().isEmpty())
                 .findFirst()
                 .orElseThrow(() -> new RuntimeException("No data without labels found"));
@@ -1217,8 +1217,8 @@ public void testObserveWithLabels() {
         histogram.withLabelValues("/hello", "200").observe(0.11);
         histogram.withLabelValues("/hello", "200").observe(0.2);
         histogram.withLabelValues("/hello", "500").observe(0.19);
-        HistogramSnapshot.HistogramData data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
-        HistogramSnapshot.HistogramData data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        HistogramSnapshot.HistogramDataPointSnapshot data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        HistogramSnapshot.HistogramDataPointSnapshot data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
         assertEquals(2, data200.getCount());
         assertEquals(0.31, data200.getSum(), 0.0000001);
         assertEquals(1, data500.getCount());
@@ -1265,7 +1265,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
             long count = 0;
             for (HistogramSnapshot snapshot : snapshots) {
                 Assert.assertEquals(1, snapshot.getData().size());
-                HistogramSnapshot.HistogramData data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
+                HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
                 Assert.assertTrue(data.getCount() >= (count + 1000)); // 1000 own observations plus the ones from other threads
                 count = data.getCount();
             }
@@ -1280,7 +1280,7 @@ public void testObserveMultithreaded() throws InterruptedException, ExecutionExc
     }
 
 
-    private HistogramSnapshot.HistogramData getData(Histogram histogram, String... labels) {
+    private HistogramSnapshot.HistogramDataPointSnapshot getData(Histogram histogram, String... labels) {
         return histogram.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(j>x  (13fb887127d0488299efae10bce027c7f7b1822djx  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X(  @@ -14,7 +14,7 @@ public void testIncrement() {
         InfoSnapshot snapshot = info.collect();
         Assert.assertEquals("target", snapshot.getMetadata().getName());
         Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoData data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
+        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
         Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
     }
 }u}(j>x  (1babd430cd9fc54a09561e9adcfb9db80c452152jx  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -61,7 +61,7 @@ public void testDefaultFalse() {
         Assert.assertFalse(getData(stateSet).isTrue(2));
     }
 
-    private StateSetSnapshot.StateSetData getData(StateSet stateSet, String... labels) {
+    private StateSetSnapshot.StateSetDataPointSnapshot getData(StateSet stateSet, String... labels) {
         return stateSet.collect().getData().stream()
                 .filter(d -> d.getLabels().equals(Labels.of(labels)))
                 .findAny()u}(j>x  (6cd75ddccc2da47e94051e4f413e7651a46ef63djx  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java     jx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -2,14 +2,14 @@
 
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.DistributionData;
+import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -86,7 +86,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
-        for (CounterSnapshot.CounterData data : snapshot.getData()) {
+        for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -97,7 +97,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -115,8 +115,8 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramData> dataList) throws IOException {
-        for (HistogramSnapshot.HistogramData data : dataList) {
+    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramDataPointSnapshot> dataList) throws IOException {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : dataList) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             Exemplars exemplars = data.getExemplars();
             long cumulativeCount = 0;
@@ -142,7 +142,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -156,7 +156,7 @@ private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDat
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -188,7 +188,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
@@ -198,7 +198,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "stateset", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -231,14 +231,14 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
         }
     }
 
-    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionData data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
+    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
             writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
@@ -261,7 +261,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
         }
     }
 
-    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, MetricData data) throws IOException {
+    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
             writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
@@ -289,7 +289,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
         writer.write(' ');
     }
 
-    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, MetricData data, Exemplar exemplar) throws IOException {
+    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPointSnapshot data, Exemplar exemplar) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(j>x  (e1b566ee48ced2a7363e76a1a78022c27ce84226jx  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajx  modifiedjx  Kjx  Kjx  K"jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X!  @@ -3,13 +3,13 @@
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -61,43 +61,43 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         Metrics.MetricFamily.Builder builder = Metrics.MetricFamily.newBuilder();
         if (snapshot instanceof CounterSnapshot) {
-            for (CounterData data : ((CounterSnapshot) snapshot).getData()) {
+            for (CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_total", Metrics.MetricType.COUNTER);
         } else if (snapshot instanceof GaugeSnapshot) {
-            for (GaugeSnapshot.GaugeData data : ((GaugeSnapshot) snapshot).getData()) {
+            for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof HistogramSnapshot) {
             HistogramSnapshot histogram = (HistogramSnapshot) snapshot;
-            for (HistogramSnapshot.HistogramData data : histogram.getData()) {
+            for (HistogramSnapshot.HistogramDataPointSnapshot data : histogram.getData()) {
                 builder.addMetric(convert(data));
             }
             Metrics.MetricType type = histogram.isGaugeHistogram() ? Metrics.MetricType.GAUGE_HISTOGRAM : Metrics.MetricType.HISTOGRAM;
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, type);
         } else if (snapshot instanceof SummarySnapshot) {
-            for (SummarySnapshot.SummaryData data : ((SummarySnapshot) snapshot).getData()) {
+            for (SummarySnapshot.SummaryDataPointSnapshot data : ((SummarySnapshot) snapshot).getData()) {
                 if (data.hasCount() || data.hasSum() || data.getQuantiles().size() > 0) {
                     builder.addMetric(convert(data));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.SUMMARY);
         } else if (snapshot instanceof InfoSnapshot) {
-            for (InfoSnapshot.InfoData data : ((InfoSnapshot) snapshot).getData()) {
+            for (InfoSnapshot.InfoDataPointSnapshot data : ((InfoSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_info", Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof StateSetSnapshot) {
-            for (StateSetSnapshot.StateSetData data : ((StateSetSnapshot) snapshot).getData()) {
+            for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
                     builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
         } else if (snapshot instanceof UnknownSnapshot) {
-            for (UnknownSnapshot.UnknownData data : ((UnknownSnapshot) snapshot).getData()) {
+            for (UnknownSnapshot.UnknownDataPointSnapshot data : ((UnknownSnapshot) snapshot).getData()) {
                 builder.addMetric(convert(data));
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.UNTYPED);
@@ -120,7 +120,7 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
         builder.setType(type);
     }
 
-    private Metrics.Metric.Builder convert(CounterData data) {
+    private Metrics.Metric.Builder convert(CounterDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Counter.Builder counterBuilder = Metrics.Counter.newBuilder();
         counterBuilder.setValue(data.getValue());
@@ -133,7 +133,7 @@ private Metrics.Metric.Builder convert(CounterData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
+    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(data.getValue());
@@ -143,7 +143,7 @@ private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramData data) {
+    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
         if (data.hasClassicHistogramData()) {
@@ -232,7 +232,7 @@ private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistog
         }
     }
 
-    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
+    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Summary.Builder summaryBuilder = Metrics.Summary.newBuilder();
         if (data.hasCount()) {
@@ -254,7 +254,7 @@ private Metrics.Metric.Builder convert(SummarySnapshot.SummaryData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
+    private Metrics.Metric.Builder convert(InfoSnapshot.InfoDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         gaugeBuilder.setValue(1);
@@ -264,7 +264,7 @@ private Metrics.Metric.Builder convert(InfoSnapshot.InfoData data) {
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, String name, int i) {
+    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetDataPointSnapshot data, String name, int i) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
         addLabels(metricBuilder, data.getLabels());
@@ -282,7 +282,7 @@ private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetData data, Strin
         return metricBuilder;
     }
 
-    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownData data) {
+    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot data) {
         Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
         Metrics.Untyped.Builder untypedBuilder = Metrics.Untyped.newBuilder();
         untypedBuilder.setValue(data.getValue());
@@ -319,7 +319,7 @@ private Metrics.Exemplar.Builder convert(Exemplar exemplar) {
         return builder;
     }
 
-    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, MetricData data) {
+    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, DataPointSnapshot data) {
         if (data.hasScrapeTimestamp()) {
             metricBuilder.setTimestampMs(data.getScrapeTimestampMillis());
         }u}(j>x  (d80b90f630755080dfc7ec6015ea67252fa1e4c7jx  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajx  modifiedjx  K
jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -6,7 +6,7 @@
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricData;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
@@ -96,7 +96,7 @@ public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOEx
     public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) throws IOException {
             boolean metadataWritten = false;
             MetricMetadata metadata = snapshot.getMetadata();
-            for (MetricData data : snapshot.getData()) {
+            for (DataPointSnapshot data : snapshot.getData()) {
                 if (data.hasCreatedTimestamp()) {
                     if (!metadataWritten) {
                         writeMetadata(writer, "_created", "gauge", metadata);
@@ -114,7 +114,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         if (snapshot.getData().size() > 0) {
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
-            for (CounterSnapshot.CounterData data : snapshot.getData()) {
+            for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
                 writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
@@ -125,7 +125,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
     private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (GaugeSnapshot.GaugeData data : snapshot.getData()) {
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -135,7 +135,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
     private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "histogram", metadata);
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             ClassicHistogramBuckets buckets = getClassicBuckets(data);
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
@@ -162,7 +162,7 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
         }
     }
 
-    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramData data) {
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
         if (data.getClassicBuckets().isEmpty()) {
             return ClassicHistogramBuckets.of(
                     new double[]{Double.POSITIVE_INFINITY},
@@ -177,7 +177,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
         // Prometheus text format does not support gaugehistogram's _gcount and _gsum.
         // So we append _gcount and _gsum as gauge metrics.
         boolean metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasCount()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gcount", "gauge", metadata);
@@ -189,7 +189,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
             }
         }
         metadataWritten = false;
-        for (HistogramSnapshot.HistogramData data : snapshot.getData()) {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
             if (data.hasSum()) {
                 if (!metadataWritten) {
                     writeMetadata(writer, "_gsum", "gauge", metadata);
@@ -205,7 +205,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
     private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
         boolean metadataWritten = false;
         MetricMetadata metadata = snapshot.getMetadata();
-        for (SummarySnapshot.SummaryData data : snapshot.getData()) {
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
             if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
                 continue;
             }
@@ -234,7 +234,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
     private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
-        for (InfoSnapshot.InfoData data : snapshot.getData()) {
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
@@ -244,7 +244,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
     private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
-        for (StateSetSnapshot.StateSetData data : snapshot.getData()) {
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
                 writer.write(metadata.getName());
                 writer.write('{');
@@ -277,7 +277,7 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
     private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
-        for (UnknownSnapshot.UnknownData data : snapshot.getData()) {
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
             writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
@@ -337,7 +337,7 @@ private void writeEscapedHelp(Writer writer, String s) throws IOException {
         }
     }
 
-    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, MetricData data) throws IOException {
+    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, DataPointSnapshot data) throws IOException {
         if (data.hasScrapeTimestamp()) {
             writer.write(' ');
             writeTimestamp(writer, data.getScrapeTimestampMillis());u}(j>x  (13001720a04a50212f9bd53d10fdfd6ff399fff7jx  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajx  modifiedjx  K(jx  K(jx  KPjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X*N  @@ -3,12 +3,12 @@
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
@@ -18,10 +18,10 @@
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryData;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryDataPointSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
-import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownData;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -133,7 +133,7 @@ public void testCounterComplete() throws IOException {
                 .withName("service_time_seconds")
                 .withHelp("total time spent serving")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.8)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -143,7 +143,7 @@ public void testCounterComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(0.9)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("path", "/hello")
@@ -174,7 +174,7 @@ public void testCounterMinimal() throws IOException {
                 "name: \"my_counter_total\" type: COUNTER metric { counter { value: 1.1 } }";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_counter")
-                .addCounterData(CounterData.newBuilder().withValue(1.1).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.1).build())
                 .build();
         assertOpenMetricsText(openMetricsText, counter);
         assertPrometheusText(prometheusText, counter);
@@ -216,15 +216,15 @@ public void testGaugeComplete() throws IOException {
                 .withName("disk_usage_ratio")
                 .withHelp("percentage used")
                 .withUnit(new Unit("ratio"))
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda2")
                                 .build())
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("device", "/dev/sda1")
@@ -253,7 +253,7 @@ public void testGaugeMinimal() throws IOException {
                 "name: \"temperature_centigrade\" type: GAUGE metric { gauge { value: 22.3 } }";
         GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
                 .withName("temperature_centigrade")
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -359,7 +359,7 @@ public void testSummaryComplete() throws IOException {
                 .withName("http_request_duration_seconds")
                 .withHelp("request duration")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(7)
                         .withSum(2.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -374,7 +374,7 @@ public void testSummaryComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .withQuantiles(Quantiles.newBuilder()
@@ -427,7 +427,7 @@ public void testSummaryWithoutQuantiles() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(3)
                         .withSum(1.2)
                         .build())
@@ -460,7 +460,7 @@ public void testSummaryNoCountAndSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withQuantiles(Quantiles.newBuilder().addQuantile(0.95, 200.0).build())
                         .build())
                 .build();
@@ -492,7 +492,7 @@ public void testSummaryJustCount() throws IOException {
         //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withCount(1)
                         .build())
                 .build();
@@ -524,7 +524,7 @@ public void testSummaryJustSum() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withSum(12.3)
                         .build())
                 .build();
@@ -543,7 +543,7 @@ public void testSummaryEmptyData() throws IOException {
                 .withName("latency_seconds")
                 .withHelp("latency")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummaryData.newBuilder().build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder().build())
                 .build();
         assertOpenMetricsText("# EOF\n", summary);
         assertPrometheusText("", summary);
@@ -577,15 +577,15 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
                 //@formatter:on
         SummarySnapshot summary = SummarySnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v1"))
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v2"))
                         .withCount(2)
                         .withSum(10.7)
                         .build())
-                .addSummaryData(SummaryData.newBuilder()
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/v3"))
                         .build())
                 .build();
@@ -702,7 +702,7 @@ public void testClassicHistogramComplete() throws Exception {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(0.0, 3)
@@ -714,7 +714,7 @@ public void testClassicHistogramComplete() throws Exception {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.1)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.2, 2)
@@ -761,7 +761,7 @@ public void testClassicHistogramMinimal() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
                                 .build())
@@ -804,7 +804,7 @@ public void testClassicHistogramCountAndSum() throws Exception {
                 //@formatter:on
         HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
                 .withName("request_latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 2)
@@ -926,7 +926,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                 .withName("cache_size_bytes")
                 .withHelp("number of bytes in the cache")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(17)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 3)
@@ -937,7 +937,7 @@ public void testClassicGaugeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .withScrapeTimestampMillis(scrapeTimestamp1)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(18)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(2.0, 4)
@@ -987,7 +987,7 @@ public void testClassicGaugeHistogramMinimal() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
                                 .build())
@@ -1033,7 +1033,7 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
                 .asGaugeHistogram()
                 .withName("queue_size_bytes")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(27000)
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(Double.POSITIVE_INFINITY, 130)
@@ -1155,7 +1155,7 @@ public void testNativeHistogramComplete() throws IOException {
                 .withName("response_size_bytes")
                 .withHelp("help")
                 .withUnit(Unit.BYTES)
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(3.2)
                         .withNativeSchema(5)
                         .withNativeZeroCount(1)
@@ -1189,7 +1189,7 @@ public void testNativeHistogramComplete() throws IOException {
                         .withCreatedTimestampMillis(createdTimestamp2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withSum(4.2)
                         .withNativeSchema(5)
                         .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
@@ -1233,7 +1233,7 @@ public void testNativeHistogramMinimal() throws IOException {
                 //@formatter:on
         HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
                 .withName("latency_seconds")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
@@ -1258,7 +1258,7 @@ public void testInfo() throws IOException {
         InfoSnapshot info = InfoSnapshot.newBuilder()
                 .withName("version")
                 .withHelp("version information")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("version", "1.2.3"))
                         .build())
                 .build();
@@ -1288,13 +1288,13 @@ public void testStateSetComplete() throws IOException {
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
                 .withHelp("complete state set example")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "prod"))
                         .addState("state1", false)
                         .addState("state2", true)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("env", "dev"))
                         .addState("state2", false)
                         .addState("state1", true)
@@ -1320,7 +1320,7 @@ public void testStateSetMinimal() throws IOException {
                 "state{state=\"bb\"} 0\n";
         StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
                 .withName("state")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("a", true)
                         .addState("bb", false)
                         .build())
@@ -1349,13 +1349,13 @@ public void testUnknownComplete() throws IOException {
                 .withName("my_special_thing_bytes")
                 .withHelp("help message")
                 .withUnit(Unit.BYTES)
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.7)
                         .withLabels(Labels.of("env", "prod"))
                         .withExemplar(exemplar2)
                         .withScrapeTimestampMillis(scrapeTimestamp2)
                         .build())
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.2)
                         .withLabels(Labels.of("env", "dev"))
                         .withExemplar(exemplar1)
@@ -1379,7 +1379,7 @@ public void testUnknownMinimal() throws IOException {
                 "other 22.3\n";
         UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
                 .withName("other")
-                .addUnknownData(UnknownData.newBuilder()
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
                         .withValue(22.3)
                         .build())
                 .build();
@@ -1403,7 +1403,7 @@ public void testHelpEscape() throws IOException {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
                 .withHelp("Some text and \n some \" escaping") // example from https://openMetrics.io
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         assertOpenMetricsText(openMetrics, counter);
         assertPrometheusText(prometheus, counter);
@@ -1422,7 +1422,7 @@ public void testLabelValueEscape() throws IOException {
                 "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n";
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("test")
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         // example from https://openMetrics.io
                         .withLabels(Labels.of("a", "x", "b", "escaping\" example \n "))
                         .withValue(1.0)u}(j>x  (e994e951357da20776fd49fd0f3f5decf502c078jx  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X2  @@ -17,23 +17,23 @@ public class CounterSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public CounterSnapshot(MetricMetadata metadata, Collection<CounterData> data) {
+    public CounterSnapshot(MetricMetadata metadata, Collection<CounterDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<CounterData> getData() {
-        return (List<CounterData>) data;
+    public List<CounterDataPointSnapshot> getData() {
+        return (List<CounterDataPointSnapshot>) data;
     }
 
-    public static class CounterData extends MetricData {
+    public static class CounterDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link CounterData}, you can either call the constructor directly or use the
-         * Builder with {@link CounterData#newBuilder()}.
+         * To create a new {@link CounterDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link CounterDataPointSnapshot#newBuilder()}.
          *
          * @param value                  the counter value. Must not be negative.
          * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
@@ -42,7 +42,7 @@ public static class CounterData extends MetricData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
             this(value, labels, exemplar, createdTimestampMillis, 0);
         }
 
@@ -51,7 +51,7 @@ public CounterData(double value, Labels labels, Exemplar exemplar, long createdT
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public CounterData(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(labels, createdTimestampMillis, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -75,7 +75,7 @@ protected void validate() {
             }
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -102,11 +102,11 @@ public Builder withCreatedTimestampMillis(long createdTimestampMillis) {
                 return this;
             }
 
-            public CounterData build() {
+            public CounterDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new CounterData(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
+                return new CounterDataPointSnapshot(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
             }
 
             @Override
@@ -122,18 +122,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<CounterData> counterData = new ArrayList<>();
+        private final List<CounterDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addCounterData(CounterData data) {
-            counterData.add(data);
+        public Builder addDataPoint(CounterDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public CounterSnapshot build() {
-            return new CounterSnapshot(buildMetadata(), counterData);
+            return new CounterSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (b4241e2e4263f7038abcb79d763ca090f48176cfjx  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DataPointSnapshot.javajx  renamedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-public abstract class MetricData {
+public abstract class DataPointSnapshot {
     private final Labels labels;
     private final long createdTimestampMillis;
     private final long scrapeTimestampMillis;
 
-    protected MetricData(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         this.labels = labels;
         this.createdTimestampMillis = createdTimestampMillis;
         this.scrapeTimestampMillis = scrapeTimestampMillis;previous_filename\prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricData.javau}(j>x  (522ce7997942a9fcd0c848b2fcfedd8282ee702ejx  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javajx  renamedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  Xp  @@ -5,15 +5,15 @@
  * Histograms and Summaries represent distributions, like a latency distribution or a distribution
  * of request sizes in Bytes.
  */
-public abstract class DistributionData extends MetricData {
+public abstract class DistributionDataPointSnapshot extends DataPointSnapshot {
     private final long count; // optional, negative value means no count.
     private final double sum; // optional, Double.NaN means no sum.
     private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.
 
     /**
      * See JavaDoc of the child classes.
      */
-    protected DistributionData(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
         super(labels, createdTimestampMillis, scrapeTimestampMillis);
         this.count = count;
         this.sum = sum;
@@ -58,7 +58,7 @@ public Exemplars getExemplars() {
         return exemplars;
     }
 
-    public static abstract class Builder<T extends Builder<T>> extends MetricData.Builder<T> {
+    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {
 
         protected long count = -1;
         protected double sum = Double.NaN;jAy  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionData.javau}(j>x  (54c033d3446b3a08aba32e148fbe212295210a05jx  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -16,29 +16,29 @@ public final class GaugeSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeData> data) {
+    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<GaugeData> getData() {
-        return (List<GaugeData>) data;
+    public List<GaugeDataPointSnapshot> getData() {
+        return (List<GaugeDataPointSnapshot>) data;
     }
 
-    public static final class GaugeData extends MetricData {
+    public static final class GaugeDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link GaugeData}, you can either call the constructor directly or use the
-         * Builder with {@link GaugeData#newBuilder()}.
+         * To create a new {@link GaugeDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link GaugeDataPointSnapshot#newBuilder()}.
          *
          * @param value    the gauge value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, labels, exemplar, 0);
         }
 
@@ -47,7 +47,7 @@ public GaugeData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public GaugeData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -64,7 +64,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -88,11 +88,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public GaugeData build() {
+            public GaugeDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new GaugeData(value, labels, exemplar, scrapeTimestampMillis);
+                return new GaugeDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -108,18 +108,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<GaugeData> gaugeData = new ArrayList<>();
+        private final List<GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addGaugeData(GaugeData data) {
-            gaugeData.add(data);
+        public Builder addDataPoint(GaugeDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public GaugeSnapshot build() {
-            return new GaugeSnapshot(buildMetadata(), gaugeData);
+            return new GaugeSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (860b291c7fb65b8bb730cd4b8af049df89ab350djx  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javajx  modifiedjx  Kjx  Kjx  K&jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -19,7 +19,7 @@ public final class HistogramSnapshot extends MetricSnapshot {
      * @param metadata see {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         this(false, metadata, data);
     }
 
@@ -29,7 +29,7 @@ public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramData> data
      * are semantically gauges and not counters.
      * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
      */
-    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramData> data) {
+    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
         super(metadata, data);
         this.gaugeHistogram = isGaugeHistogram;
     }
@@ -39,11 +39,11 @@ public boolean isGaugeHistogram() {
     }
 
     @Override
-    public List<HistogramData> getData() {
-        return (List<HistogramData>) data;
+    public List<HistogramDataPointSnapshot> getData() {
+        return (List<HistogramDataPointSnapshot>) data;
     }
 
-    public static final class HistogramData extends DistributionData {
+    public static final class HistogramDataPointSnapshot extends DistributionDataPointSnapshot {
 
         // There are two types of histograms: Classic histograms and native histograms.
         // Classic histograms have a fixed set of buckets.
@@ -68,7 +68,7 @@ public static final class HistogramData extends DistributionData {
         /**
          * Constructor for classic histograms (as opposed to native histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets         required. Must not be empty. Must at least contain the +Inf bucket.
@@ -79,7 +79,7 @@ public static final class HistogramData extends DistributionData {
          *                               (this specific set of labels) was created (or reset to zero).
          *                               It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 double sum,
                 Labels labels,
@@ -91,7 +91,7 @@ public HistogramData(
         /**
          * Constructor for native histograms (as opposed to classic histograms).
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
@@ -108,7 +108,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 int nativeSchema,
                 long nativeZeroCount,
                 double nativeZeroThreshold,
@@ -124,7 +124,7 @@ public HistogramData(
         /**
          * Constructor for a histogram with both, classic and native data.
          * <p>
-         * To create a new {@link HistogramData}, you can either call the constructor directly or use the
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
          * Builder with {@link HistogramSnapshot#newBuilder()}.
          *
          * @param classicBuckets                 required. Must not be empty. Must at least contain the +Inf bucket.
@@ -142,7 +142,7 @@ public HistogramData(
          *                                       (this specific set of labels) was created (or reset to zero).
          *                                       It's optional. Use {@code 0L} if there is no created timestamp.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -161,7 +161,7 @@ public HistogramData(
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public HistogramData(
+        public HistogramDataPointSnapshot(
                 ClassicHistogramBuckets classicBuckets,
                 int nativeSchema,
                 long nativeZeroCount,
@@ -298,7 +298,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private ClassicHistogramBuckets classicHistogramBuckets = ClassicHistogramBuckets.EMPTY;
             private int nativeSchema = CLASSIC_HISTOGRAM;
@@ -345,11 +345,11 @@ public Builder withNativeBucketsForNegativeValues(NativeHistogramBuckets buckets
                 return this;
             }
 
-            public HistogramData build() {
+            public HistogramDataPointSnapshot build() {
                 if (nativeSchema == CLASSIC_HISTOGRAM && classicHistogramBuckets.isEmpty()) {
                     throw new IllegalArgumentException("One of nativeSchema and classicHistogramBuckets is required.");
                 }
-                return new HistogramData(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+                return new HistogramDataPointSnapshot(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -360,14 +360,14 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<HistogramData> histogramData = new ArrayList<>();
+        private final List<HistogramDataPointSnapshot> dataPoints = new ArrayList<>();
         private boolean isGaugeHistogram = false;
 
         private Builder() {
         }
 
-        public Builder addData(HistogramData data) {
-            histogramData.add(data);
+        public Builder addDataPoint(HistogramDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -382,7 +382,7 @@ public Builder asGaugeHistogram() {
         }
 
         public HistogramSnapshot build() {
-            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), histogramData);
+            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), dataPoints);
         }
 
         @Overrideu
     }(j>x  (b49e0d1218825153dfc81322aded933ad9b73ce4jx  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  Xk
  @@ -18,7 +18,7 @@ public final class InfoSnapshot extends MetricSnapshot {
      *                 The metadata must not have a unit.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
+    public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
         if (metadata.getName().endsWith("_info")) {
             throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
@@ -29,19 +29,19 @@ public InfoSnapshot(MetricMetadata metadata, Collection<InfoData> data) {
     }
 
     @Override
-    public List<InfoData> getData() {
-        return (List<InfoData>) data;
+    public List<InfoDataPointSnapshot> getData() {
+        return (List<InfoDataPointSnapshot>) data;
     }
 
-    public static class InfoData extends MetricData {
+    public static class InfoDataPointSnapshot extends DataPointSnapshot {
 
         /**
-         * To create a new {@link InfoData}, you can either call the constructor directly or use the
-         * Builder with {@link InfoData#newBuilder()}.
+         * To create a new {@link InfoDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link InfoDataPointSnapshot#newBuilder()}.
          *
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public InfoData(Labels labels) {
+        public InfoDataPointSnapshot(Labels labels) {
             this(labels, 0L);
         }
 
@@ -50,14 +50,14 @@ public InfoData(Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public InfoData(Labels labels, long scrapeTimestampMillis) {
+        public InfoDataPointSnapshot(Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
-            public InfoData build() {
-                return new InfoData(labels, scrapeTimestampMillis);
+            public InfoDataPointSnapshot build() {
+                return new InfoDataPointSnapshot(labels, scrapeTimestampMillis);
             }
 
             @Override
@@ -73,13 +73,13 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<InfoData> infoData = new ArrayList<>();
+        private final List<InfoDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addInfoData(InfoData data) {
-            infoData.add(data);
+        public Builder addDataPoint(InfoDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -89,7 +89,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public InfoSnapshot build() {
-            return new InfoSnapshot(buildMetadata(), infoData);
+            return new InfoSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (5108c3bd041c3dd2d07541d5b3946adc2f06876djx  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -13,19 +13,19 @@
 public abstract class MetricSnapshot {
 
     private final MetricMetadata metadata;
-    protected final List<? extends MetricData> data;
+    protected final List<? extends DataPointSnapshot> data;
 
-    protected MetricSnapshot(MetricMetadata metadata, MetricData... data) {
+    protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
         this(metadata, Arrays.asList(data));
     }
 
-    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends MetricData> data) {
+    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
         this.metadata = metadata;
         if (data == null) {
             throw new NullPointerException();
         }
-        List<? extends MetricData> dataCopy = new ArrayList<>(data);
-        dataCopy.sort(Comparator.comparing(MetricData::getLabels));
+        List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
+        dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);
         validateLabels();
     }
@@ -34,7 +34,7 @@ public MetricMetadata getMetadata() {
         return metadata;
     }
 
-    public abstract List<? extends MetricData> getData();
+    public abstract List<? extends DataPointSnapshot> getData();
 
     protected void validateLabels() {
         // Verify that labels are unique (the same set of names/values must not be used multiple times for the same metric).u}(j>x  (6e0890a99df4df0c495911237516bc2a76a7c76ejx  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -11,7 +11,7 @@
  * Immutable representation of native histogram buckets.
  * <p>
  * The bucket index defines the boundaries of the bucket,
- * depending on the histogram's {@link HistogramSnapshot.HistogramData#getNativeSchema() schema}.
+ * depending on the histogram's {@link HistogramSnapshot.HistogramDataPointSnapshot#getNativeSchema() schema}.
  * <pre>
  *     base = 2^(2^-schema)
  *     lower bound = base^(index - 1)u}(j>x  (4cad4ac1111b1e1cc47948d9497463b74f194309jx  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajx  modifiedjx  Kjx  Kjx  K jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -20,7 +20,7 @@ public final class StateSetSnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetData> data) {
+    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetDataPointSnapshot> data) {
         super(metadata, data);
         validate();
     }
@@ -29,34 +29,34 @@ private void validate() {
         if (getMetadata().hasUnit()) {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
-        for (StateSetData entry : getData()) {
+        for (StateSetDataPointSnapshot entry : getData()) {
             if (entry.getLabels().contains(getMetadata().getName())) {
                 throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
             }
         }
     }
 
     @Override
-    public List<StateSetData> getData() {
-        return (List<StateSetData>) data;
+    public List<StateSetDataPointSnapshot> getData() {
+        return (List<StateSetDataPointSnapshot>) data;
     }
 
 
-    public static class StateSetData extends MetricData implements Iterable<State> {
+    public static class StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<State> {
         private final String[] names;
         private final boolean[] values;
 
         /**
-         * To create a new {@link StateSetData}, you can either call the constructor directly or use the
-         * Builder with {@link StateSetData#newBuilder()}.
+         * To create a new {@link StateSetDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link StateSetDataPointSnapshot#newBuilder()}.
          *
          * @param names  state names. Must have at least 1 entry.
          *               The constructor will create a copy of the array.
          * @param values state values. Must have the same length as {@code names}.
          *               The constructor will create a copy of the array.
          * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels) {
             this(names, values, labels, 0L);
         }
 
@@ -65,7 +65,7 @@ public StateSetData(String[] names, boolean[] values, Labels labels) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public StateSetData(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             if (names.length == 0) {
                 throw new IllegalArgumentException("StateSet must have at least one state.");
@@ -142,7 +142,7 @@ private static void swap(int i, int j, String[] names, boolean[] values) {
             values[i] = tmpValue;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private final ArrayList<String> names = new ArrayList<>();
             private final ArrayList<Boolean> values = new ArrayList<>();
@@ -160,12 +160,12 @@ protected Builder self() {
                 return this;
             }
 
-            public StateSetData build() {
+            public StateSetDataPointSnapshot build() {
                 boolean[] valuesArray = new boolean[values.size()];
                 for (int i = 0; i < values.size(); i++) {
                     valuesArray[i] = values.get(i);
                 }
-                return new StateSetData(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
+                return new StateSetDataPointSnapshot(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
             }
         }
 
@@ -194,13 +194,13 @@ public boolean isTrue() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<StateSetData> stateSetData = new ArrayList<>();
+        private final List<StateSetDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addStateSetData(StateSetData data) {
-            stateSetData.add(data);
+        public Builder addDataPoint(StateSetDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
@@ -210,7 +210,7 @@ public Builder withUnit(Unit unit) {
         }
 
         public StateSetSnapshot build() {
-            return new StateSetSnapshot(buildMetadata(), stateSetData);
+            return new StateSetSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (cf84162a7b8690e761080f346b559d497479760cjx  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X<  @@ -16,23 +16,23 @@ public final class SummarySnapshot extends MetricSnapshot {
      * @param metadata See {@link MetricMetadata} for more naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryData> data) {
+    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<SummaryData> getData() {
-        return (List<SummaryData>) data;
+    public List<SummaryDataPointSnapshot> getData() {
+        return (List<SummaryDataPointSnapshot>) data;
     }
 
-    public static final class SummaryData extends DistributionData {
+    public static final class SummaryDataPointSnapshot extends DistributionDataPointSnapshot {
 
         private final Quantiles quantiles;
 
 
         /**
-         * To create a new {@link SummaryData}, you can either call the constructor directly
-         * or use the Builder with {@link SummaryData#newBuilder()}.
+         * To create a new {@link SummaryDataPointSnapshot}, you can either call the constructor directly
+         * or use the Builder with {@link SummaryDataPointSnapshot#newBuilder()}.
          *
          * @param count                  total number of observations. Optional, pass -1 if not available.
          * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
@@ -45,7 +45,7 @@ public static final class SummaryData extends DistributionData {
          *                               not the creation of the snapshot.
          *                               The created timestamp optional. Use {@code 0L} if there is no created timestamp.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
             this(count, sum, quantiles, labels, exemplars, createdTimestampMillis, 0);
         }
 
@@ -54,7 +54,7 @@ public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, E
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public SummaryData(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
             super(count, sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
             this.quantiles = quantiles;
             validate();
@@ -75,7 +75,7 @@ private void validate() {
             }
         }
 
-        public static class Builder extends DistributionData.Builder<Builder> {
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
 
             private Quantiles quantiles = Quantiles.EMPTY;
 
@@ -98,8 +98,8 @@ public Builder withCount(long count) {
                 return this;
             }
 
-            public SummaryData build() {
-                return new SummaryData(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            public SummaryDataPointSnapshot build() {
+                return new SummaryDataPointSnapshot(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
             }
         }
 
@@ -110,18 +110,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<SummaryData> summaryData = new ArrayList<>();
+        private final List<SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addSummaryData(SummaryData data) {
-            summaryData.add(data);
+        public Builder addDataPoint(SummaryDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public SummarySnapshot build() {
-            return new SummarySnapshot(buildMetadata(), summaryData);
+            return new SummarySnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (34735823be44bc387de912e87d582771794decfajx  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X8  @@ -17,29 +17,29 @@ public final class UnknownSnapshot extends MetricSnapshot {
      *                 See {@link MetricMetadata} for naming conventions.
      * @param data     the constructor will create a sorted copy of the collection.
      */
-    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownData> data) {
+    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownDataPointSnapshot> data) {
         super(metadata, data);
     }
 
     @Override
-    public List<UnknownData> getData() {
-        return (List<UnknownData>) data;
+    public List<UnknownDataPointSnapshot> getData() {
+        return (List<UnknownDataPointSnapshot>) data;
     }
 
-    public static final class UnknownData extends MetricData {
+    public static final class UnknownDataPointSnapshot extends DataPointSnapshot {
 
         private final double value;
         private final Exemplar exemplar; // may be null
 
         /**
-         * To create a new {@link UnknownData}, you can either call the constructor directly or use the
-         * Builder with {@link UnknownData#newBuilder()}.
+         * To create a new {@link UnknownDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link UnknownDataPointSnapshot#newBuilder()}.
          *
          * @param value    the value.
          * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
          * @param exemplar may be null.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
             this(value, Labels.EMPTY, exemplar, 0);
         }
 
@@ -48,7 +48,7 @@ public UnknownData(double value, Labels labels, Exemplar exemplar) {
          * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
          * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
          */
-        public UnknownData(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
             super(labels, 0L, scrapeTimestampMillis);
             this.value = value;
             this.exemplar = exemplar;
@@ -65,7 +65,7 @@ public Exemplar getExemplar() {
             return exemplar;
         }
 
-        public static class Builder extends MetricData.Builder<Builder> {
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
 
             private Exemplar exemplar = null;
             private Double value = null;
@@ -89,11 +89,11 @@ public Builder withExemplar(Exemplar exemplar) {
                 return this;
             }
 
-            public UnknownData build() {
+            public UnknownDataPointSnapshot build() {
                 if (value == null) {
                     throw new IllegalArgumentException("Missing required field: value is null.");
                 }
-                return new UnknownData(value, labels, exemplar, scrapeTimestampMillis);
+                return new UnknownDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
             }
 
             @Override
@@ -109,18 +109,18 @@ public static Builder newBuilder() {
 
     public static class Builder extends MetricSnapshot.Builder<Builder> {
 
-        private final List<UnknownData> unknownData = new ArrayList<>();
+        private final List<UnknownDataPointSnapshot> dataPoints = new ArrayList<>();
 
         private Builder() {
         }
 
-        public Builder addUnknownData(UnknownData data) {
-            unknownData.add(data);
+        public Builder addDataPoint(UnknownDataPointSnapshot data) {
+            dataPoints.add(data);
             return this;
         }
 
         public UnknownSnapshot build() {
-            return new UnknownSnapshot(buildMetadata(), unknownData);
+            return new UnknownSnapshot(buildMetadata(), dataPoints);
         }
 
         @Overrideu}(j>x  (4f2b2d75d287ccd7ba8b82c4cae985338a6f55aejx  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javajx  modifiedjx  K
jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -18,7 +18,7 @@ public void testCompleteGoodCase() {
                 .withName("http_server_requests_seconds")
                 .withHelp("total time spent serving requests")
                 .withUnit(Unit.SECONDS)
-                .addCounterData(CounterData.newBuilder()
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(3.0)
@@ -31,7 +31,7 @@ public void testCompleteGoodCase() {
                                 .build())
                         .withCreatedTimestampMillis(createdTimestamp1)
                         .build()
-                ).addCounterData(CounterData.newBuilder()
+                ).addDataPoint(CounterDataPointSnapshot.newBuilder()
                         .withValue(2.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(4.0)
@@ -48,7 +48,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "http_server_requests_seconds", "total time spent serving requests", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        CounterDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("path", "/hello"), data.getLabels());
         Assert.assertEquals(2.0, data.getValue(), 0.0);
         Assert.assertEquals(4.0, data.getExemplar().getValue(), 0.0);
@@ -66,11 +66,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "events", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        CounterData data = snapshot.getData().get(0);
+        CounterDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(1.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -91,17 +91,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         CounterSnapshot snapshot = CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
-                .addCounterData(CounterData.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
                 .build();
-        Iterator<CounterSnapshot.CounterData> iterator = snapshot.getData().iterator();
+        Iterator<CounterDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(j>x  (20a094a236ec5589bc0f928619b559353987a6f0jx  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterData;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("cache_size_bytes")
                 .withHelp("cache size in Bytes")
                 .withUnit(Unit.BYTES)
-                .addGaugeData(GaugeData.newBuilder()
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(1024.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(1024.0)
@@ -28,7 +28,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addGaugeData(GaugeData.newBuilder()
+                ).addDataPoint(GaugeDataPointSnapshot.newBuilder()
                         .withValue(128.0)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(128.0)
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "cache_size_bytes", "cache size in Bytes", "bytes");
         Assert.assertEquals(2, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        GaugeDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
         Assert.assertEquals(Labels.of("env", "dev"), data.getLabels());
         Assert.assertEquals(128.0, data.getValue(), 0.0);
         Assert.assertEquals(128.0, data.getExemplar().getValue(), 0.0);
@@ -62,11 +62,11 @@ public void testCompleteGoodCase() {
     public void testMinimalGoodCase() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("temperature")
-                .addGaugeData(GaugeData.newBuilder().withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withValue(23.0).build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "temperature", null, null);
         Assert.assertEquals(1, snapshot.getData().size());
-        GaugeData data = snapshot.getData().get(0);
+        GaugeDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.EMPTY, data.getLabels());
         Assert.assertEquals(23.0, data.getValue(), 0.0);
         Assert.assertNull(data.getExemplar());
@@ -89,17 +89,17 @@ public void testTotalSuffixPresent() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        CounterData.newBuilder().build();
+        CounterDataPointSnapshot.newBuilder().build();
     }
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
         GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
                 .withName("gauge")
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
-                .addGaugeData(GaugeData.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
                 .build();
-        Iterator<GaugeSnapshot.GaugeData> iterator = snapshot.getData().iterator();
+        Iterator<GaugeDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(j>x  (9dc21a2358170bab952c996021e109e66e161618jx  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javajx  modifiedjx  Kjx  Kjx  K&jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramData;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -25,8 +25,8 @@ public void testGoodCaseComplete() {
                 .withName("request_size_bytes")
                 .withHelp("request sizes in bytes")
                 .withUnit(Unit.BYTES)
-                .addData(
-                        HistogramData.newBuilder()
+                .addDataPoint(
+                        HistogramDataPointSnapshot.newBuilder()
                                 .withSum(27000.0)
                                 .withNativeSchema(5)
                                 .withNativeZeroCount(2)
@@ -54,7 +54,7 @@ public void testGoodCaseComplete() {
                                 .withCreatedTimestampMillis(createdTimestamp)
                                 .withScrapeTimestampMillis(scrapeTimestamp)
                                 .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withCount(3) // TODO how is that not a compile error? This is a protected method!
                                 .withSum(400.2)
                         .withNativeSchema(5)
@@ -77,7 +77,7 @@ public void testGoodCaseComplete() {
         SnapshotTestUtil.assertMetadata(snapshot, "request_size_bytes", "request sizes in bytes", "bytes");
 
         Assert.assertEquals(2, snapshot.getData().size());
-        HistogramData data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
+        HistogramDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
         Assert.assertTrue(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertTrue(data.hasCreatedTimestamp());
@@ -166,11 +166,11 @@ public void testEmptyHistogram() {
     public void testMinimalClassicHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("minimal_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertEquals(1, snapshot.getData().get(0).getClassicBuckets().size());
     }
@@ -179,14 +179,14 @@ public void testMinimalClassicHistogram() {
     public void testMinimalNativeHistogram() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("hist")
-                .addData(HistogramSnapshot.HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withNativeSchema(5)
                         .build())
                 .build();
         Assert.assertEquals("hist", snapshot.getMetadata().getName());
         Assert.assertFalse(snapshot.getMetadata().hasUnit());
         Assert.assertEquals(1, snapshot.getData().size());
-        HistogramSnapshot.HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasCreatedTimestamp());
         Assert.assertFalse(data.hasScrapeTimestamp());
         Assert.assertTrue(data.hasCount());
@@ -200,15 +200,15 @@ public void testMinimalNativeHistogram() {
     public void testClassicCount() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
                                 .addBucket(1.0, 3)
                                 .addBucket(2.0, 2)
                                 .addBucket(Double.POSITIVE_INFINITY, 0)
                                 .build())
                         .build())
                 .build();
-        HistogramData data = snapshot.getData().get(0);
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertFalse(data.hasSum());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(5, data.getCount());
@@ -217,12 +217,12 @@ public void testClassicCount() {
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyData() {
         // This will fail because one of nativeSchema and classicHistogramBuckets is required
-        HistogramData.newBuilder().build();
+        HistogramDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testEmptyNativeData() {
-        HistogramSnapshot.HistogramData data = HistogramSnapshot.HistogramData.newBuilder()
+        HistogramDataPointSnapshot data = HistogramDataPointSnapshot.newBuilder()
                 .withNativeSchema(5)
                 .build();
         Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
@@ -233,28 +233,28 @@ public void testEmptyNativeData() {
     public void testDataImmutable() {
         HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
                 .withName("test_histogram")
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "a"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
                         .build())
-                .addData(HistogramData.newBuilder()
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("a", "b"))
                         .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{2}))
                         .build())
                 .build();
-        Iterator<HistogramData> iterator = snapshot.getData().iterator();
+        Iterator<HistogramDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testEmptyClassicBuckets() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
     @Test
     public void testMinimalNativeData() {
-        new HistogramData(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 
@@ -263,7 +263,7 @@ public void testMinimalClassicData() {
         ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
                 .addBucket(Double.POSITIVE_INFINITY, 0)
                 .build();
-        new HistogramData(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
+        new HistogramDataPointSnapshot(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
                 NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
     }
 }u}(j>x  (e5b7d55be16907e5898140948d7e2250ad1b6aadjx  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajx  modifiedjx  Kjx  Kjx  K
jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,7 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -14,7 +12,7 @@ public void testCompleteGoodCase() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
                 .withHelp("Target info")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway"))
                         .build())
                 .build();
@@ -34,14 +32,14 @@ public void testEmptyInfo() {
     public void testDataImmutable() {
         InfoSnapshot snapshot = InfoSnapshot.newBuilder()
                 .withName("target")
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway.v1"))
                         .build())
-                .addInfoData(InfoSnapshot.InfoData.newBuilder()
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("instance_id", "127.0.0.1:9200", "service_name", "gateway.v2"))
                         .build())
                 .build();
-        Iterator<InfoSnapshot.InfoData> iterator = snapshot.getData().iterator();
+        Iterator<InfoSnapshot.InfoDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }u}(j>x  (492472c9408a101b92e3f33e6a00419c6b8bf62bjx  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javajx  modifiedjx  Kjx  Kjx  K
jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -13,15 +9,15 @@ public class MetricSnapshotTest {
     public void testDuplicateLabels() {
         CounterSnapshot.newBuilder()
                 .withName("events")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/hello", "status", "200"))
                         .withValue(1.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("path", "/world", "status", "200"))
                         .withValue(2.0)
                         .build())
-                .addCounterData(CounterSnapshot.CounterData.newBuilder()
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("status", "200", "path", "/hello"))
                         .withValue(3.0)
                         .build())u}(j>x  (7066146c46da3afc1ab1efdfd5aac059e3e66682jx  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javajx  modifiedjx  K	jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  Xk  @@ -1,9 +1,5 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.CounterSnapshot;
-import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -21,15 +17,15 @@ public void testEmpty() {
     public void testSort() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Assert.assertEquals(3, snapshots.size());
@@ -47,11 +43,11 @@ public void testDuplicateName() {
         //    and that is the conflict. Therefore, you cannot have a counter named "foo" and a gauge named "foo".
         CounterSnapshot c = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         GaugeSnapshot g = GaugeSnapshot.newBuilder()
                 .withName("my_metric")
-                .addGaugeData(GaugeSnapshot.GaugeData.newBuilder().withValue(1.0).build())
+                .addDataPoint(GaugeSnapshot.GaugeDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         new MetricSnapshots(c, g);
     }
@@ -60,7 +56,7 @@ public void testDuplicateName() {
     public void testBuilder() {
         CounterSnapshot counter = CounterSnapshot.newBuilder()
                 .withName("my_metric")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots.Builder builder = MetricSnapshots.newBuilder();
         Assert.assertFalse(builder.containsMetricName("my_metric"));
@@ -72,15 +68,15 @@ public void testBuilder() {
     public void testImmutable() {
         CounterSnapshot c1 = CounterSnapshot.newBuilder()
                 .withName("counter1")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c2 = CounterSnapshot.newBuilder()
                 .withName("counter2")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         CounterSnapshot c3 = CounterSnapshot.newBuilder()
                 .withName("counter3")
-                .addCounterData(CounterSnapshot.CounterData.newBuilder().withValue(1.0).build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
                 .build();
         MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
         Iterator<MetricSnapshot> iterator = snapshots.iterator();u}(j>x  (6c4fa61d35329e3482e6fcbbf2b06b49a826dc77jx  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javajx  modifiedjx  K
jx  K
jx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  Xl  @@ -14,14 +14,14 @@ public void testCompleteGoodCase() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_feature_flags")
                 .withHelp("Feature Flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .addState("feature1", true)
                         .addState("feature2", false)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature1", false)
                         .addState("feature2", false)
@@ -30,7 +30,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_feature_flags", "Feature Flags", null);
         Assert.assertEquals(2, snapshot.getData().size());
-        StateSetSnapshot.StateSetData data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
+        StateSetSnapshot.StateSetDataPointSnapshot data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
         Assert.assertEquals(Labels.of("entity", "controller"), data.getLabels());
         Assert.assertEquals(2, data.size());
         Assert.assertEquals("feature1", data.getName(0));
@@ -44,7 +44,7 @@ public void testCompleteGoodCase() {
 
     @Test
     public void testStateSetDataSorted() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("b", true)
                 .addState("d", false)
                 .addState("c", true)
@@ -64,14 +64,14 @@ public void testStateSetDataSorted() {
     @Test(expected = IllegalArgumentException.class)
     public void testMustHaveState() {
         // Must have at least one state.
-        StateSetSnapshot.StateSetData.newBuilder().build();
+        StateSetSnapshot.StateSetDataPointSnapshot.newBuilder().build();
     }
 
     @Test
     public void testMinimal() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("my_flag")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("flag", true)
                         .build()
                 )
@@ -89,7 +89,7 @@ public void testEmpty() {
 
     @Test(expected = UnsupportedOperationException.class)
     public void testDataImmutable() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("c", true)
@@ -101,7 +101,7 @@ public void testDataImmutable() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testDuplicateState() {
-        StateSetSnapshot.StateSetData data = StateSetSnapshot.StateSetData.newBuilder()
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                 .addState("a", true)
                 .addState("b", true)
                 .addState("a", true)
@@ -112,18 +112,18 @@ public void testDuplicateState() {
     public void testStateSetImmutable() {
         StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "controller"))
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("entity", "api"))
                         .addState("feature", true)
                         .build()
                 )
                 .build();
-        Iterator<StateSetSnapshot.StateSetData> iterator = snapshot.getData().iterator();
+        Iterator<StateSetSnapshot.StateSetDataPointSnapshot> iterator = snapshot.getData().iterator();
         iterator.next();
         iterator.remove();
     }
@@ -132,11 +132,11 @@ public void testStateSetImmutable() {
     public void testLabelsUnique() {
         StateSetSnapshot.newBuilder()
                 .withName("flags")
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )
-                .addStateSetData(StateSetSnapshot.StateSetData.newBuilder()
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
                         .addState("feature", true)
                         .build()
                 )u}(j>x  (cf65f46bf2c6096f777b1b9d767511927d757b4fjx  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javajx  modifiedjx  Kjx  Kjx  K
jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X	  @@ -16,7 +16,7 @@ public void testCompleteGoodCase() {
                 .withName("latency_seconds")
                 .withHelp("latency in seconds")
                 .withUnit(Unit.SECONDS)
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCreatedTimestampMillis(createdTimestamp)
                         .withScrapeTimestampMillis(scrapeTimestamp)
                         .withLabels(Labels.of("endpoint", "/"))
@@ -42,15 +42,15 @@ public void testCompleteGoodCase() {
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withLabels(Labels.of("endpoint", "/test"))
                         .withCount(1093)
                         .withSum(218.6)
                         .build())
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "latency_seconds", "latency in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        SummarySnapshot.SummaryData data = snapshot.getData().get(0);
+        SummarySnapshot.SummaryDataPointSnapshot data = snapshot.getData().get(0);
         Assert.assertEquals(Labels.of("endpoint", "/"), data.getLabels());
         Assert.assertTrue(data.hasCount());
         Assert.assertEquals(1093, data.getCount());
@@ -77,7 +77,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         SummarySnapshot snapshot = SummarySnapshot.newBuilder()
                 .withName("size_bytes")
-                .addSummaryData(SummarySnapshot.SummaryData.newBuilder()
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
                         .withCount(10)
                         .withSum(12.0)
                         .build())
@@ -94,7 +94,7 @@ public void testEmptySnapshot() {
 
     @Test
     public void testEmptyData() {
-        SummarySnapshot.SummaryData data = SummarySnapshot.SummaryData.newBuilder().build();
+        SummarySnapshot.SummaryDataPointSnapshot data = SummarySnapshot.SummaryDataPointSnapshot.newBuilder().build();
         Assert.assertEquals(0, data.getQuantiles().size());
         Assert.assertFalse(data.hasCount());
         Assert.assertFalse(data.hasSum());u}(j>x  (b8a9827d28794d2698f99e4124b8e3a0eb82a596jx  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javajx  modifiedjx  Kjx  Kjx  K
jx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  XQ	  @@ -12,7 +12,7 @@ public void testCompleteGoodCase() {
                 .withName("my_unknown_seconds")
                 .withHelp("something in seconds")
                 .withUnit(Unit.SECONDS)
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.3)
                         .withExemplar(Exemplar.newBuilder()
                                 .withValue(0.12)
@@ -24,7 +24,7 @@ public void testCompleteGoodCase() {
                                 .addLabel("env", "prod")
                                 .build())
                         .build()
-                ).addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                ).addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(0.29)
                         .withLabels(Labels.newBuilder()
                                 .addLabel("env", "dev")
@@ -34,7 +34,7 @@ public void testCompleteGoodCase() {
                 .build();
         SnapshotTestUtil.assertMetadata(snapshot, "my_unknown_seconds", "something in seconds", "seconds");
         Assert.assertEquals(2, snapshot.getData().size());
-        UnknownSnapshot.UnknownData data = snapshot.getData().get(1); // env="prod"
+        UnknownSnapshot.UnknownDataPointSnapshot data = snapshot.getData().get(1); // env="prod"
         Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
         Assert.assertEquals(0.3, data.getValue(), 0.0);
         Assert.assertEquals(0.12, data.getExemplar().getValue(), 0.0);
@@ -46,7 +46,7 @@ public void testCompleteGoodCase() {
     public void testMinimal() {
         UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
                 .withName("test")
-                .addUnknownData(UnknownSnapshot.UnknownData.newBuilder()
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
                         .withValue(1.0)
                         .build())
                 .build();
@@ -66,6 +66,6 @@ public void testNameMissing() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
-        UnknownSnapshot.UnknownData.newBuilder().build();
+        UnknownSnapshot.UnknownDataPointSnapshot.newBuilder().build();
     }
 }ui      }(j>x  (cadb934fd865b5ba4848ac688c8b5d016a8dace9jx  Mtmp_example/src/main/java/com/example/LongRunningNativeHistogramLoadTest.javajx  modifiedjx  Kjx  Kjx  Kjx  https://github.com/prometheus/client_java/blob/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajx  https://github.com/prometheus/client_java/raw/97add1a3faa5e10c3f1c8c2ea06cf765b692f045/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.javajx  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FLongRunningNativeHistogramLoadTest.java?ref=97add1a3faa5e10c3f1c8c2ea06cf765b692f045jx  X  @@ -49,7 +49,7 @@ public void run() throws InterruptedException {
                 System.out.println("# ---------------------------------");
                 textWriter.write(System.out, snapshots);
                 System.out.println(TextFormat.printer().shortDebugString(protobufData));
-                HistogramSnapshot.HistogramData data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
+                HistogramSnapshot.HistogramDataPointSnapshot data = ((HistogramSnapshot) snapshots.get(0)).getData().iterator().next();
                 System.out.println("Schema: " + data.getNativeSchema());
                 System.out.println("Number of buckets: " + data.getNativeBucketsForPositiveValues().size());
                 long duration = System.nanoTime() - start;ueu(bff53f292dbc9fa4182ca0979196700286856e12}(sha(bff53f292dbc9fa4182ca0979196700286856e12node_idEC_kwDOAHoJt9oAKGJmZjUzZjI5MmRiYzlmYTQxODJjYTA5NzkxOTY3MDAyODY4NTZlMTIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T20:50:40Zu	committer}(jy  Fabian Stäberjy  fabian@fstab.dejy  2023-08-27T20:50:40Zumessage2Add Summary support for the OpenTelemetry exportertree}(jy  (a059a2149a9bcce3caed1f3df26c20a953b9cb71urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/a059a2149a9bcce3caed1f3df26c20a953b9cb71ujy  hhttps://api.github.com/repos/prometheus/client_java/git/commits/bff53f292dbc9fa4182ca0979196700286856e12
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujy  dhttps://api.github.com/repos/prometheus/client_java/commits/bff53f292dbc9fa4182ca0979196700286856e12html_urlYhttps://github.com/prometheus/client_java/commit/bff53f292dbc9fa4182ca0979196700286856e12comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/bff53f292dbc9fa4182ca0979196700286856e12/commentsjy  }(loginfstabidJ' jy  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jy  "https://api.github.com/users/fstabjz  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujy  }(jz  fstabj	z  J' jy  MDQ6VXNlcjMzMDUzNQ==jz  2https://avatars.githubusercontent.com/u/330535?v=4j
z  h3jy  "https://api.github.com/users/fstabjz  https://github.com/fstabjz  ,https://api.github.com/users/fstab/followersjz  9https://api.github.com/users/fstab/following{/other_user}jz  2https://api.github.com/users/fstab/gists{/gist_id}jz  9https://api.github.com/users/fstab/starred{/owner}{/repo}jz  0https://api.github.com/users/fstab/subscriptionsjz  'https://api.github.com/users/fstab/orgsjz  (https://api.github.com/users/fstab/reposjz  3https://api.github.com/users/fstab/events{/privacy}j z  2https://api.github.com/users/fstab/received_eventsj"z  Userj$z  uparents]}(jy  (f0864ad165e16141099c4cdff9bf64e41a01bf29jy  dhttps://api.github.com/repos/prometheus/client_java/commits/f0864ad165e16141099c4cdff9bf64e41a01bf29jz  Yhttps://github.com/prometheus/client_java/commit/f0864ad165e16141099c4cdff9bf64e41a01bf29uastats}(totalK	additionsK	deletionsKufiles](}(jy  (7fd9ca7e55b72ce51285d58b7db52e8198294831filenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedj>z  Kj?z  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=bff53f292dbc9fa4182ca0979196700286856e12patchX  @@ -3,9 +3,11 @@
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
 import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Summary;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
 import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.proto.metrics.v1.internal.Sum;
 
 import java.util.Random;
 
@@ -59,6 +61,18 @@ public static void main(String[] args) throws Exception {
             classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
         }
 
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i=0; i<1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u}(jy  (ade5d8de62e7a5c3348980f73e0563fe445a613bjDz  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajFz  modifiedj>z  Kj?z  KjHz  KjIz  https://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajKz  https://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajMz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=bff53f292dbc9fa4182ca0979196700286856e12jOz  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
@@ -40,7 +41,11 @@ public Collection<MetricData> collectAllMetrics() {
             } else if (snapshot instanceof GaugeSnapshot) {
                 addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
             } else if (snapshot instanceof HistogramSnapshot) {
-                addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
             }
         }
         return result;u}(jy  (9e8bde539cfda1989a0b369ce9039ff0c86593d0jDz  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajFz  modifiedj>z  Kj?z  K jHz  KjIz  https://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajKz  https://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajMz  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=bff53f292dbc9fa4182ca0979196700286856e12jOz  X2  @@ -2,6 +2,7 @@
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
@@ -38,4 +39,8 @@ public MetricData create(HistogramSnapshot snapshot) {
         }
         return null;
     }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
 }u}(jy  (9b2f53c1255abbda709af7892125aa70ba69f819jDz  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javajFz  addedj>z  K+j?z  K jHz  K+jIz  https://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajKz  https://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajMz  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=bff53f292dbc9fa4182ca0979196700286856e12jOz  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(jy  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdjDz  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javajFz  addedj>z  K)j?z  K jHz  K)jIz  https://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajKz  https://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajMz  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=bff53f292dbc9fa4182ca0979196700286856e12jOz  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(jy  (fafc2be77024fc40abd2d2e78abe8864b891c438jDz  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javajFz  addedj>z  Kj?z  K jHz  KjIz  https://github.com/prometheus/client_java/blob/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajKz  https://github.com/prometheus/client_java/raw/bff53f292dbc9fa4182ca0979196700286856e12/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajMz  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=bff53f292dbc9fa4182ca0979196700286856e12jOz  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}ueu(0179958f2dd63ad4ac302a0b1617e0a66ef68099}(sha(0179958f2dd63ad4ac302a0b1617e0a66ef68099node_idEC_kwDOAHoJt9oAKDAxNzk5NThmMmRkNjNhZDRhYzMwMmEwYjE2MTdlMGE2NmVmNjgwOTkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-23T20:56:53Zu	committer}(jz  Fabian Stäberjz  fabian@fstab.dejz  2023-07-27T11:33:55Zumessage[Allow dots in metric names and label names

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j{z  (97d9358ac605a4bb6145b6a4a63736d6651b6aeburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/97d9358ac605a4bb6145b6a4a63736d6651b6aebujz  hhttps://api.github.com/repos/prometheus/client_java/git/commits/0179958f2dd63ad4ac302a0b1617e0a66ef68099
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujz  dhttps://api.github.com/repos/prometheus/client_java/commits/0179958f2dd63ad4ac302a0b1617e0a66ef68099html_urlYhttps://github.com/prometheus/client_java/commit/0179958f2dd63ad4ac302a0b1617e0a66ef68099comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/0179958f2dd63ad4ac302a0b1617e0a66ef68099/commentsjz  }(loginfstabidJ' j}z  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jz  "https://api.github.com/users/fstabjz  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujz  }(jz  fstabjz  J' j}z  MDQ6VXNlcjMzMDUzNQ==jz  2https://avatars.githubusercontent.com/u/330535?v=4jz  h3jz  "https://api.github.com/users/fstabjz  https://github.com/fstabjz  ,https://api.github.com/users/fstab/followersjz  9https://api.github.com/users/fstab/following{/other_user}jz  2https://api.github.com/users/fstab/gists{/gist_id}jz  9https://api.github.com/users/fstab/starred{/owner}{/repo}jz  0https://api.github.com/users/fstab/subscriptionsjz  'https://api.github.com/users/fstab/orgsjz  (https://api.github.com/users/fstab/reposjz  3https://api.github.com/users/fstab/events{/privacy}jz  2https://api.github.com/users/fstab/received_eventsjz  Userjz  uparents]}(j{z  (fd373459616d18126824b68d09c428b3613dd097jz  dhttps://api.github.com/repos/prometheus/client_java/commits/fd373459616d18126824b68d09c428b3613dd097jz  Yhttps://github.com/prometheus/client_java/commit/fd373459616d18126824b68d09c428b3613dd097uastats}(totalM	additionsMH	deletionsM=ufiles](}(j{z  (a1046e2a2cdfe14bf863778640d998f79536d655filenameexamples/example-exemplars-tail-sampling/example-greeting-service/src/main/java/io/prometheus/metrics/examples/otel_exemplars/greeting/GreetingServlet.javastatusmodifiedjz  Kjz  KchangesKblob_urlX  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javaraw_urlX
  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fgreeting%2FGreetingServlet.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099patchX  @@ -27,7 +27,7 @@ public GreetingServlet() {
             .withUnit(Unit.SECONDS)
             .withLabelNames("http_status")
             .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j{z  (cabedbce594acc78d89aaf5e6792997d4550fed4jz  examples/example-exemplars-tail-sampling/example-hello-world-app/src/main/java/io/prometheus/metrics/examples/otel_exemplars/app/HelloWorldServlet.javajz  modifiedjz  Kjz  Kjz  Kjz  X  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javajz  X  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.javajz  X  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fotel_exemplars%2Fapp%2FHelloWorldServlet.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -34,7 +34,7 @@ public HelloWorldServlet() {
                 .withUnit(Unit.SECONDS)
                 .withLabelNames("http_status")
                 .register();
-        histogram.withLabelValues("200");
+        histogram.initLabelValues("200");
     }
 
     @Overrideu}(j{z  (7a95e36da299e8ce780ea5f0d2f2751765754afcjz  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javajz  modifiedjz  Kjz  K jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajz  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-tomcat-servlet%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -32,6 +32,11 @@ public class HelloWorldServlet extends HttpServlet {
             .withLabelNames("http_status")
             .register();
 
+    public HelloWorldServlet() {
+        counter.initLabelValues("200");
+        histogram.initLabelValues("200");
+    }
+
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
         long start = System.nanoTime();u}(j{z  (95660a463e944851a5d6c7c83caa98e475ec2b84jz  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -58,7 +58,7 @@ public MetricsProperties getDefaultMetricProperties() {
      * May return {@code null} if no metric-specific properties are configured for a metric name.
      */
     public MetricsProperties getMetricProperties(String metricName) {
-        return metricProperties.get(metricName);
+        return metricProperties.get(metricName.replace(".", "_"));
     }
 
     public ExemplarsProperties getExemplarProperties() {u}(j{z  (58ddc2669a05f79f8a9d19dbfb3374280a720f28jz  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XE  @@ -39,6 +39,8 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
     // This will remove entries from properties when they are processed.
     private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
         Map<String, MetricsProperties> result = new HashMap<>();
+        // Note that the metric name in the properties file must be as exposed in the Prometheus exposition formats,
+        // i.e. all dots replaced with underscores.
         Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
         // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
         // because entries are removed when MetricsConfig.load(...) is called.
@@ -49,7 +51,7 @@ private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Obj
         for (String propertyName : propertyNames) {
             Matcher matcher = pattern.matcher(propertyName);
             if (matcher.find()) {
-                String metricName = matcher.group(1);
+                String metricName = matcher.group(1).replace(".", "_");
                 if (!result.containsKey(metricName)) {
                     result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
                 }u}(j{z  (caf2cf8548342e5fb17046a95acbb18e13bf2315jz  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XC  @@ -9,13 +9,16 @@
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Counter metric.
  * <p>
@@ -109,8 +112,8 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
         return new CounterSnapshot(getMetadata(), data);
     }
 
-    static String normalizeName(String name) {
-        if (name != null && name.endsWith("_total")) {
+    static String stripTotalSuffix(String name) {
+        if (name != null && (name.endsWith("_total") || name.endsWith(".total"))) {
             name = name.substring(0, name.length() - 6);
         }
         return name;
@@ -231,12 +234,12 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(normalizeName(name));
+            return super.withName(stripTotalSuffix(name));
         }
 
         @Overrideu}(j{z  (b4d7bc7619b07a80158b44f817a2e3b28e1c7f79jz  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X.  @@ -80,12 +80,12 @@ private Builder(PrometheusProperties properties) {
          * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            return super.withName(Counter.normalizeName(name));
+            return super.withName(Counter.stripTotalSuffix(name));
         }
 
         @Overrideu}(j{z  (5731e28435a190d82cd3ae1416fe81f7c301c29bjz  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javajz  modifiedjz  Kjz  K
jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X|  @@ -2,16 +2,16 @@
 
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Label;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Info metric. Example:
  * <pre>{@code
@@ -90,15 +90,12 @@ private Builder(PrometheusProperties config) {
          * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
          * <p>
          * Throws an {@link IllegalArgumentException} if
-         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * {@link io.prometheus.metrics.model.snapshots.PrometheusNaming#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
          * is {@code false}.
          */
         @Override
         public Builder withName(String name) {
-            if (name != null && name.endsWith("_info")) {
-                name = name.substring(0, name.length() - 5);
-            }
-            return super.withName(name);
+            return super.withName(stripInfoSuffix(name));
         }
 
         /**
@@ -112,16 +109,16 @@ public Builder withUnit(Unit unit) {
             return this;
         }
 
-        private static String normalizeName(String name) {
-            if (name != null && name.endsWith("_info")) {
+        private static String stripInfoSuffix(String name) {
+            if (name != null && (name.endsWith("_info") || name.endsWith(".info"))) {
                 name = name.substring(0, name.length() - 5);
             }
             return name;
         }
 
         @Override
         public Info build() {
-            return new Info(withName(normalizeName(name)));
+            return new Info(this);
         }
 
         @Overrideu}(j{z  (6f963c299dad6c6c2b8a733d876725960d0f03bejz  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X@  @@ -3,11 +3,14 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.util.Arrays;
 import java.util.List;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
  * <p>
@@ -31,9 +34,8 @@ protected MetricMetadata getMetadata() {
 
     private String makeName(String name, Unit unit) {
         if (unit != null) {
-            String suffix = "_" + unit;
-            if (!name.endsWith(suffix)) {
-                name = name + suffix;
+            if (!name.endsWith(unit.toString())) {
+                name = name + "_" + unit;
             }
         }
         return name;
@@ -51,7 +53,7 @@ protected Builder(List<String> illegalLabelNames, PrometheusProperties propertie
         }
 
         public B withName(String name) {
-            if (!MetricMetadata.isValidMetricName(name)) {
+            if (!PrometheusNaming.isValidMetricName(name)) {
                 throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
             }
             this.name = name;
@@ -70,7 +72,7 @@ public B withHelp(String help) {
 
         public B withLabelNames(String... labelNames) {
             for (String labelName : labelNames) {
-                if (!Labels.isValidLabelName(labelName)) {
+                if (!PrometheusNaming.isValidLabelName(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name");
                 }
                 if (illegalLabelNames.contains(labelName)) {u}(j{z  (7348c04101650d22ceae1186a8822f60e29ac846jz  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.config.MetricsProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
 
@@ -11,6 +12,8 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * StateSet metric. Example:
  * <pre>{@code
@@ -58,7 +61,7 @@ private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
         exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
         this.names = builder.names; // builder.names is already a validated copy
         for (String name : names) {
-            if (this.getMetadata().getName().equals(name)) {
+            if (this.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                 throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
             }
         }u}(j{z  (17d8da246cccd484c9d26753c930dfd67f3221c6jz  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XB  @@ -62,6 +62,34 @@ public MetricSnapshot collect() {
         return collect(labels, metricData);
     }
 
+    /**
+     * Initialize label values.
+     * <p>
+     * Example: Imagine you have a counter for payments as follows
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 7.0
+     * payment_transactions_total{payment_type="paypal"} 3.0
+     * </pre>
+     * Now, the data points for the {@code payment_type} label values get initialized when they are
+     * first used, i.e. the first time you call
+     * <pre>{@code
+     * counter.withLabelValues("paypal").inc();
+     * }</pre>
+     * the data point with label {@code payment_type="paypal"} will go from non-existent to having value {@code 1.0}.
+     * <p>
+     * In some cases this is confusing, and you want to have data points initialized on application start
+     * with an initial value of {@code 0.0}:
+     * <pre>
+     * payment_transactions_total{payment_type="credit card"} 0.0
+     * payment_transactions_total{payment_type="paypal"} 0.0
+     * </pre>
+     * {@code initLabelValues(...)} can be used to initialize label value, so that the data points
+     * show up in the exposition format with an initial value of zero.
+     */
+    public void initLabelValues(String... labelValues) {
+        withLabelValues(labelValues);
+    }
+
     public D withLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
             if (labelValues.length == 0) {
@@ -73,7 +101,6 @@ public D withLabelValues(String... labelValues) {
         return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
     }
 
-    // TODO: Remove automatically if label values have not been used in a while?
     public void remove(String... labelValues) {
         data.remove(Arrays.asList(labelValues));
     }u}(j{z  (a967a8d64a8b6693885910148cbdfb625550e06ajz  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  Xc  @@ -109,18 +109,18 @@ public void testLabels() {
 
     @Test
     public void testTotalStrippedFromName() {
-        Counter counter = Counter.newBuilder()
-                .withName("my_counter_total")
-                .withUnit(Unit.SECONDS)
-                .build();
-        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
-
-        counter = Counter.newBuilder()
-                .withName("my_counter")
-                .build();
-        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        for (String name : new String[]{
+                "my_counter_total", "my.counter.total",
+                "my_counter_seconds_total", "my.counter.seconds.total",
+                "my_counter", "my.counter",
+                "my_counter_seconds", "my.counter.seconds"}) {
+            Counter counter = Counter.newBuilder()
+                    .withName(name)
+                    .withUnit(Unit.SECONDS)
+                    .build();
+            Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+            assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+        }
     }
 
     @Testu}(j{z  (2af392097245eeec40fd622cb75b8403c561dab3jz  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -1,19 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
-import io.prometheus.metrics.tracer.common.SpanContext;
-import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -1043,19 +1043,9 @@ public void testIllegalLabelNamePrefix() {
                 .withLabelNames("__hello");
     }
 
-    @Test(expected = IllegalArgumentException.class)
-    public void testIllegalLabelNameDot() {
-        // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid.
-        // The reason is that you cannot use illegal label names in the Prometheus query language.
-        Histogram.newBuilder()
-                .withName("test")
-                .withLabelNames("http.status");
-    }
-
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalName() {
-        Histogram.newBuilder()
-                .withName("server.durations");
+        Histogram.newBuilder().withName("my_namespace/server.durations");
     }
 
     @Test(expected = IllegalArgumentException.class)u}(j{z  (5b1bbf991003f2e68f994ac87b8368d397691ce0jz  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javajz  modifiedjz  Kjz  Kjz  K!jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -1,23 +1,28 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.model.snapshots.InfoSnapshot;
-import io.prometheus.metrics.model.snapshots.Labels;
-import org.junit.Assert;
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+
 public class InfoTest {
 
     @Test
-    public void testIncrement() {
-        Info info = Info.newBuilder()
-                .withName("target_info")
-                .withLabelNames("key")
-                .build();
-        info.infoLabelValues("value");
-        InfoSnapshot snapshot = info.collect();
-        Assert.assertEquals("target", snapshot.getMetadata().getName());
-        Assert.assertEquals(1, snapshot.getData().size());
-        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
-        Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
+    public void testInfoStrippedFromName() {
+        for (String name : new String[]{
+                "jvm.runtime", "jvm_runtime",
+                "jvm.runtime.info", "jvm_runtime_info"}) {
+            for (String labelName : new String[]{"my.key", "my_key"}) {
+                Info info = Info.newBuilder()
+                        .withName(name)
+                        .withLabelNames(labelName)
+                        .build();
+                info.infoLabelValues("value");
+                Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
+                assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
+            }
+        }
     }
 }u}(j{z  (fa131335ef7fabb86de2a3b1ae5e5e3c3a9fc525jz  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XF"  @@ -29,6 +29,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
@@ -89,7 +90,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "counter", metadata);
         for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
             writeCreated(writer, metadata, data);
@@ -100,7 +101,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
                 writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -128,7 +129,7 @@ private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetad
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 Exemplar exemplar;
                 if (i == 0) {
@@ -176,7 +177,7 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
             // quantiles, all indexes modulo exemplars.length.
             int exemplarIndex = 1;
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
                     exemplarIndex = (exemplarIndex + 1) % exemplars.size();
@@ -195,7 +196,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "info", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndExemplar(writer, data, null);
         }
@@ -206,21 +207,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "stateset", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -238,7 +239,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "unknown", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             if (exemplarsOnAllMetricTypesEnabled) {
             writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
@@ -251,7 +252,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
     private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
         int exemplarIndex = 0;
         if (data.hasCount()) {
-            writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), countSuffix, data.getLabels());
             writeLong(writer, data.getCount());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -261,7 +262,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
             }
         }
         if (data.hasSum()) {
-            writeNameAndLabels(writer, metadata.getName(), sumSuffix, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), sumSuffix, data.getLabels());
             writeDouble(writer, data.getSum());
             if (exemplars.size() > 0) {
                 writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
@@ -273,7 +274,7 @@ private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata
 
     private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
         if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
-            writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
             writeTimestamp(writer, data.getCreatedTimestampMillis());
             if (data.hasScrapeTimestamp()) {
                 writer.write(' ');
@@ -319,20 +320,20 @@ private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPoin
 
     private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(metadata.getPrometheusName());
         writer.write(' ');
         writer.write(typeName);
         writer.write('\n');
         if (metadata.getUnit() != null) {
             writer.write("# UNIT ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getUnit().toString());
             writer.write('\n');
         }
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             writer.write(' ');
             writeEscapedLabelValue(writer, metadata.getHelp());
             writer.write('\n');u}(j{z  (6f4eb6e6756990ee3101a7afbcd095ba63c911d3jz  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X	  @@ -24,6 +24,7 @@
 import java.io.OutputStream;
 
 import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus protobuf format as defined in
@@ -103,7 +104,7 @@ public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
         } else if (snapshot instanceof StateSetSnapshot) {
             for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
                 for (int i = 0; i < data.size(); i++) {
-                    builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
+                    builder.addMetric(convert(data, snapshot.getMetadata().getPrometheusName(), i));
                 }
             }
             setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
@@ -121,9 +122,9 @@ private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, Metric
             return;
         }
         if (nameSuffix == null) {
-            builder.setName(metadata.getName());
+            builder.setName(metadata.getPrometheusName());
         } else {
-            builder.setName(metadata.getName() + nameSuffix);
+            builder.setName(metadata.getPrometheusName() + nameSuffix);
         }
         if (metadata.getHelp() != null) {
             builder.setHelp(metadata.getHelp());
@@ -335,7 +336,7 @@ private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot
     private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }
@@ -344,7 +345,7 @@ private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
     private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
         for (int i = 0; i < labels.size(); i++) {
             metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
-                    .setName(labels.getName(i))
+                    .setName(labels.getPrometheusName(i))
                     .setValue(labels.getValue(i))
                     .build());
         }u}(j{z  (bc187a88648e66fb17a2269fe11bcb0a9959a764jz  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajz  modifiedjz  Kjz  Kjz  K%jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java2     jz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X%  @@ -26,6 +26,7 @@
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
 import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
@@ -102,7 +103,7 @@ public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) thr
                         writeMetadata(writer, "_created", "gauge", metadata);
                         metadataWritten = true;
                     }
-                    writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_created", data.getLabels());
                     writeTimestamp(writer, data.getCreatedTimestampMillis());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -115,7 +116,7 @@ private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) t
             MetricMetadata metadata = snapshot.getMetadata();
             writeMetadata(writer, "_total", "counter", metadata);
             for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
-                writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_total", data.getLabels());
                 writeDouble(writer, data.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -126,7 +127,7 @@ private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throw
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "gauge", metadata);
         for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -140,18 +141,18 @@ private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapsho
             long cumulativeCount = 0;
             for (int i = 0; i < buckets.size(); i++) {
                 cumulativeCount += buckets.getCount(i);
-                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
                 writeLong(writer, cumulativeCount);
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (!snapshot.isGaugeHistogram()) {
                 if (data.hasCount()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                     writeLong(writer, data.getCount());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
                 if (data.hasSum()) {
-                    writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                    writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                     writeDouble(writer, data.getSum());
                     writeScrapeTimestampAndNewline(writer, data);
                 }
@@ -183,7 +184,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gcount", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gcount", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gcount", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -195,7 +196,7 @@ private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot sna
                     writeMetadata(writer, "_gsum", "gauge", metadata);
                     metadataWritten = true;
                 }
-                writeNameAndLabels(writer, metadata.getName(), "_gsum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_gsum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -214,17 +215,17 @@ private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) t
                 metadataWritten = true;
             }
             for (Quantile quantile : data.getQuantiles()) {
-                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels(), "quantile", quantile.getQuantile());
                 writeDouble(writer, quantile.getValue());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasCount()) {
-                writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_count", data.getLabels());
                 writeLong(writer, data.getCount());
                 writeScrapeTimestampAndNewline(writer, data);
             }
             if (data.hasSum()) {
-                writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                writeNameAndLabels(writer, metadata.getPrometheusName(), "_sum", data.getLabels());
                 writeDouble(writer, data.getSum());
                 writeScrapeTimestampAndNewline(writer, data);
             }
@@ -235,7 +236,7 @@ private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "_info", "gauge", metadata);
         for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), "_info", data.getLabels());
             writer.write("1");
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -246,21 +247,21 @@ private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot)
         writeMetadata(writer, "", "gauge", metadata);
         for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
             for (int i = 0; i < data.size(); i++) {
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write('{');
                 for (int j = 0; j < data.getLabels().size(); j++) {
                     if (j > 0) {
                         writer.write(",");
                     }
-                    writer.write(data.getLabels().getName(j));
+                    writer.write(data.getLabels().getPrometheusName(j));
                     writer.write("=\"");
                     writeEscapedLabelValue(writer, data.getLabels().getValue(j));
                     writer.write("\"");
                 }
                 if (!data.getLabels().isEmpty()) {
                     writer.write(",");
                 }
-                writer.write(metadata.getName());
+                writer.write(metadata.getPrometheusName());
                 writer.write("=\"");
                 writeEscapedLabelValue(writer, data.getName(i));
                 writer.write("\"} ");
@@ -278,7 +279,7 @@ private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) t
         MetricMetadata metadata = snapshot.getMetadata();
         writeMetadata(writer, "", "untyped", metadata);
         for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
-            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeNameAndLabels(writer, metadata.getPrometheusName(), null, data.getLabels());
             writeDouble(writer, data.getValue());
             writeScrapeTimestampAndNewline(writer, data);
         }
@@ -303,7 +304,7 @@ private void writeNameAndLabels(OutputStreamWriter writer, String name, String s
     private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
         if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
             writer.write("# HELP ");
-            writer.write(metadata.getName());
+            writer.write(metadata.getPrometheusName());
             if (suffix != null) {
                 writer.write(suffix);
             }
@@ -312,7 +313,7 @@ private void writeMetadata(OutputStreamWriter writer, String suffix, String type
             writer.write('\n');
         }
         writer.write("# TYPE ");
-        writer.write(metadata.getName());
+        writer.write(metadata.getPrometheusName());
         if (suffix != null) {
             writer.write(suffix);
         }u}(j{z  (423fa6692c6c56240886d572fe3adb3373168ddajz  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -6,6 +6,8 @@
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 public class TextFormatUtil {
 
     static void writeLong(OutputStreamWriter writer, long value) throws IOException {
@@ -61,7 +63,7 @@ static void writeLabels(OutputStreamWriter writer, Labels labels, String additio
             if (i > 0) {
                 writer.write(",");
             }
-            writer.write(labels.getName(i));
+            writer.write(labels.getPrometheusName(i));
             writer.write("=\"");
             writeEscapedLabelValue(writer, labels.getValue(i));
             writer.write("\"");u}(j{z  (7c9e714dfd905aa92e79a30c50ea424411a53bc5jz  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javajz  modifiedjz  Mcjz  K jz  Mcjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XS  @@ -23,6 +23,7 @@
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
 import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -32,6 +33,7 @@ public class ExpositionFormatsTest {
 
     private final String exemplar1String = "{env=\"prod\",span_id=\"12345\",trace_id=\"abcde\"} 1.7 1672850685.829";
     private final String exemplar2String = "{env=\"dev\",span_id=\"23456\",trace_id=\"bcdef\"} 2.4 1672850685.830";
+    private final String exemplarWithDotsString = "{some_exemplar_key=\"some value\"} 3.0 1690298864.383";
 
     private final String exemplar1protoString = "exemplar { " +
             "label { name: \"env\" value: \"prod\" } " +
@@ -47,6 +49,11 @@ public class ExpositionFormatsTest {
             "value: 2.4 " +
             "timestamp { seconds: 1672850685 nanos: 830000000 } }";
 
+    private final String exemplarWithDotsProtoString = "exemplar { " +
+            "label { name: \"some_exemplar_key\" value: \"some value\" } " +
+            "value: 3.0 " +
+            "timestamp { seconds: 1690298864 nanos: 383000000 } }";
+
     private final String createdTimestamp1s = "1672850385.800";
     private final long createdTimestamp1 = (long) (1000 * Double.parseDouble(createdTimestamp1s));
     private final String createdTimestamp2s = "1672850285.000";
@@ -72,6 +79,12 @@ public class ExpositionFormatsTest {
             .withTimestampMillis(1672850685830L)
             .build();
 
+    private final Exemplar exemplarWithDots = Exemplar.newBuilder()
+            .withLabels(Labels.of("some.exemplar.key", "some value"))
+            .withValue(3.0)
+            .withTimestampMillis(1690298864383L)
+            .build();
+
     @Test
     public void testCounterComplete() throws IOException {
         String openMetricsText = "" +
@@ -183,6 +196,42 @@ public void testCounterMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, counter);
     }
 
+    @Test
+    public void testCounterWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_count counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE my_request_count_total counter\n" +
+                "my_request_count_total{http_path=\"/hello\"} 3.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_count_total\" " +
+                "type: COUNTER " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "counter { " +
+                        "value: 3.0 " + exemplarWithDotsProtoString + " " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my.request.count")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(3.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
     @Test
     public void testGaugeComplete() throws IOException {
         String openMetricsText = "" +
@@ -264,6 +313,48 @@ public void testGaugeMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gauge);
     }
 
+    @Test
+    public void testGaugeWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "# UNIT my_temperature_celsius celsius\n" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_temperature_celsius Temperature\n" +
+                "# TYPE my_temperature_celsius gauge\n" +
+                "my_temperature_celsius{location_id=\"data-center-1\"} 23.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_temperature_celsius\" " +
+                "help: \"Temperature\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"location_id\" value: \"data-center-1\" } " +
+                    "gauge { " +
+                        "value: 23.0 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("my.temperature.celsius")
+                .withHelp("Temperature")
+                .withUnit(Unit.CELSIUS)
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(23.0)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("location.id", "data-center-1")
+                                .build())
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
     @Test
     public void testSummaryComplete() throws IOException {
         String openMetricsText = "" +
@@ -596,6 +687,49 @@ public void testSummaryEmptyAndNonEmpty() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, summary);
     }
 
+    @Test
+    public void testSummaryWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds summary\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 1\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.03\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "summary { sample_count: 1 sample_sum: 0.03 } " +
+                "}";
+                //@formatter:on
+
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(1)
+                        .withSum(0.03)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
     @Test
     public void testClassicHistogramComplete() throws Exception {
         String openMetricsText = "" +
@@ -1047,6 +1181,57 @@ public void testClassicGaugeHistogramCountAndSum() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
     }
 
+    @Test
+    public void testClassicHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 130\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 130\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 0.01\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "sample_sum: 0.01 " +
+                        "bucket { cumulative_count: 130 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(0.01)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
     @Test
     public void testNativeHistogramComplete() throws IOException {
         String openMetricsText = "" +
@@ -1244,6 +1429,64 @@ public void testNativeHistogramMinimal() throws IOException {
         assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
     }
 
+    @Test
+    public void testNativeHistogramWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "# UNIT my_request_duration_seconds seconds\n" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4 # " + exemplarWithDotsString + "\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_request_duration_seconds Request duration in seconds\n" +
+                "# TYPE my_request_duration_seconds histogram\n" +
+                "my_request_duration_seconds_bucket{http_path=\"/hello\",le=\"+Inf\"} 4\n" +
+                "my_request_duration_seconds_count{http_path=\"/hello\"} 4\n" +
+                "my_request_duration_seconds_sum{http_path=\"/hello\"} 3.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_request_duration_seconds\" " +
+                "help: \"Request duration in seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"http_path\" value: \"/hello\" } " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 4 upper_bound: Infinity " + exemplarWithDotsProtoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 1 " +
+                        "positive_span { offset: 2 length: 1 } " +
+                        "positive_delta: 3 " +
+                    "} " +
+                "}";
+                //@formatter:on
+
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("my.request.duration.seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("http.path", "/hello")
+                                .build())
+                        .withSum(3.2)
+                        .withNativeSchema(5)
+                        .withNativeZeroCount(1)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(2, 3)
+                                .build()
+                        )
+                        .withExemplars(Exemplars.of(exemplarWithDots))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
     // TODO: Gauge Native Histogram
 
     @Test
@@ -1270,6 +1513,39 @@ public void testInfo() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, info);
     }
 
+    @Test
+    public void testInfoWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE jvm_status info\n" +
+                "# HELP jvm_status JVM status info\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP jvm_status_info JVM status info\n" +
+                "# TYPE jvm_status_info gauge\n" +
+                "jvm_status_info{jvm_version=\"1.2.3\"} 1\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"jvm_status_info\" " +
+                "help: \"JVM status info\" " +
+                "type: GAUGE " +
+                "metric { " + "" +
+                    "label { name: \"jvm_version\" value: \"1.2.3\" } " +
+                    "gauge { value: 1.0 } " +
+                "}";
+                //@formatter:on
+        InfoSnapshot info = InfoSnapshot.newBuilder()
+                .withName("jvm.status")
+                .withHelp("JVM status info")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("jvm.version", "1.2.3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, info);
+        assertPrometheusText(prometheusText, info);
+        assertPrometheusProtobuf(prometheusProtobuf, info);
+    }
+
     @Test
     public void testStateSetComplete() throws IOException {
         String openMetrics = "" +
@@ -1333,6 +1609,48 @@ public void testStateSetMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, stateSet);
     }
 
+    @Test
+    public void testStateSetWithDots() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_application_state stateset\n" +
+                "# HELP my_application_state My application state\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP my_application_state My application state\n" +
+                "# TYPE my_application_state gauge\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"feature.enabled\"} 1\n" +
+                "my_application_state{data_center=\"us east\",my_application_state=\"is.alpha.version\"} 0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"my_application_state\" " +
+                "help: \"My application state\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"feature.enabled\" } " +
+                    "gauge { value: 1.0 } " +
+                "} metric { " +
+                    "label { name: \"data_center\" value: \"us east\" } " +
+                    "label { name: \"my_application_state\" value: \"is.alpha.version\" } " +
+                    "gauge { value: 0.0 } " +
+                "}";
+                //@formatter:on
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("my.application.state")
+                .withHelp("My application state")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("data.center", "us east"))
+                        .addState("feature.enabled", true)
+                        .addState("is.alpha.version", false)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, stateSet);
+        assertPrometheusText(prometheusText, stateSet);
+        assertPrometheusProtobuf(prometheusProtobuf, stateSet);
+    }
+
     @Test
     public void testUnknownComplete() throws IOException {
         String openMetrics = "" +
@@ -1391,6 +1709,43 @@ public void testUnknownMinimal() throws IOException {
         assertPrometheusTextWithoutCreated(prometheus, unknown);
     }
 
+    @Test
+    public void testUnknownWithDots() throws IOException {
+        String openMetrics = "" +
+                "# TYPE some_unknown_metric unknown\n" +
+                "# UNIT some_unknown_metric bytes\n" +
+                "# HELP some_unknown_metric help message\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7 # " + exemplarWithDotsString + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP some_unknown_metric help message\n" +
+                "# TYPE some_unknown_metric untyped\n" +
+                "some_unknown_metric{test_env=\"7\"} 0.7\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"some_unknown_metric\" " +
+                "help: \"help message\" " +
+                "type: UNTYPED " +
+                "metric { " +
+                    "label { name: \"test_env\" value: \"7\" } " +
+                    "untyped { value: 0.7 } " +
+                "}";
+                //@formatter:on
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("some.unknown.metric")
+                .withHelp("help message")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.of("test.env", "7"))
+                        .withExemplar(exemplarWithDots)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertPrometheusProtobuf(prometheusProtobuf, unknown);
+    }
+
     @Test
     public void testHelpEscape() throws IOException {
         String openMetrics = "" +u}(j{z  (349ebda602c544d46c02baee1d84ddc4694cc561jz  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajz  modifiedjz  Kjz  Kjz  K
jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -1,11 +1,11 @@
 package io.prometheus.metrics.model.registry;
 
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 
-import java.util.List;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * To be registered with the Prometheus collector registry.
  * See <i>Overall Structure</i> on
@@ -26,7 +26,7 @@ public interface Collector {
      */
     default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (includedNames.test(result.getMetadata().getName())) {
+        if (includedNames.test(result.getMetadata().getPrometheusName())) {
             return result;
         } else {
             return null;
@@ -36,7 +36,7 @@ default MetricSnapshot collect(Predicate<String> includedNames) {
     /**
      * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
      */
-    default String getName() {
-        return collect().getMetadata().getName();
+    default String getPrometheusName() {
+        return collect().getMetadata().getPrometheusName();
     }
 }u}(j{z  (8e5aff15f740e5e75a7a2e6119704cede91b5f5fjz  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XN  @@ -7,6 +7,8 @@
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Like {@link Collector}, but collecting multiple Snapshots at once.
  */
@@ -27,7 +29,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
         MetricSnapshots allSnapshots = collect();
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (MetricSnapshot snapshot : allSnapshots) {
-            if (includedNames.test(snapshot.getMetadata().getName())) {
+            if (includedNames.test(snapshot.getMetadata().getPrometheusName())) {
                 result.addMetricSnapshot(snapshot);
             }
         }
@@ -38,7 +40,7 @@ default MetricSnapshots collect(Predicate<String> includedNames) {
      * Override this and return an empty list if the MultiCollector does not return a constant list of names
      * (names may be added / removed between scrapes).
      */
-    default List<String> getNames() {
-        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    default List<String> getPrometheusNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getPrometheusName()).collect(Collectors.toList());
     }
 }u}(j{z  (373d32a89dc675a3b0fdb08c511c5b30b31bf9f6jz  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajz  modifiedjz  Kjz  Kjz  K-jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -9,50 +9,63 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Predicate;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 public class PrometheusRegistry {
 
     public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
 
-    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final Set<String> prometheusNames = ConcurrentHashMap.newKeySet();
     private final List<Collector> collectors = new CopyOnWriteArrayList<>();
     private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
 
     public void register(Collector collector) {
-        String name = collector.getName();
-        if (!names.add(name)) {
-            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        String prometheusName = collector.getPrometheusName();
+        if (prometheusName != null) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because a metric with that name is already registered.");
+            }
         }
         collectors.add(collector);
     }
 
     public void register(MultiCollector collector) {
-        for (String name : collector.getNames()) {
-            if (!names.add(name)) {
-                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        for (String prometheusName : collector.getPrometheusNames()) {
+            if (!prometheusNames.add(prometheusName)) {
+                throw new IllegalStateException("Can't register " + prometheusName + " because that name is already registered.");
             }
         }
         multiCollectors.add(collector);
     }
 
     public void unregister(Collector collector) {
         collectors.remove(collector);
-        names.remove(collector.getName());
+        prometheusNames.remove(collector.getPrometheusName());
     }
 
     public void unregister(MultiCollector collector) {
         multiCollectors.remove(collector);
-        for (String name : collector.getNames()) {
-            names.remove(name);
+        for (String prometheusName : collector.getPrometheusNames()) {
+            prometheusNames.remove(prometheusName(prometheusName));
         }
     }
 
     public MetricSnapshots scrape() {
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            result.addMetricSnapshot(collector.collect());
+            MetricSnapshot snapshot = collector.collect();
+            if (snapshot != null) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
+                }
+                result.addMetricSnapshot(snapshot);
+            }
         }
         for (MultiCollector collector : multiCollectors) {
             for (MetricSnapshot snapshot : collector.collect()) {
+                if (result.containsMetricName(snapshot.getMetadata().getName())) {
+                    throw new IllegalStateException(snapshot.getMetadata().getPrometheusName() + ": duplicate metric name.");
+                }
                 result.addMetricSnapshot(snapshot);
             }
         }
@@ -65,19 +78,19 @@ public MetricSnapshots scrape(Predicate<String> includedNames) {
         }
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
-            String name = collector.getName();
-            if (name == null || includedNames.test(name)) {
+            String prometheusName = collector.getPrometheusName();
+            if (prometheusName == null || includedNames.test(prometheusName)) {
                 MetricSnapshot snapshot = collector.collect(includedNames);
                 if (snapshot != null) {
                     result.addMetricSnapshot(snapshot);
                 }
             }
         }
         for (MultiCollector collector : multiCollectors) {
-            List<String> names = collector.getNames();
+            List<String> prometheusNames = collector.getPrometheusNames();
             boolean excluded = true; // the multi-collector is excluded unless at least one name matches
-            for (String name : names) {
-                if (includedNames.test(name)) {
+            for (String prometheusName : prometheusNames) {
+                if (includedNames.test(prometheusName)) {
                     excluded = false;
                     break;
                 }u}(j{z  (dac311004cf67ab2b1fa6f177c1b019244c138a6jz  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javajz  modifiedjz  K jz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -20,9 +20,6 @@ public final class InfoSnapshot extends MetricSnapshot {
      */
     public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
         super(metadata, data);
-        if (metadata.getName().endsWith("_info")) {
-            throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
-        }
         if (metadata.hasUnit()) {
             throw new IllegalArgumentException("An Info metric cannot have a unit.");
         }u}(j{z  (60b1b58be1cab789e16cfeaeba13d7d505fce545jz  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javajz  modifiedjz  Kxjz  K:jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X>  @@ -5,23 +5,37 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.regex.Pattern;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.isValidLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+
 /**
  * Immutable set of name/value pairs, sorted by name.
  */
 public class Labels implements Comparable<Labels>, Iterable<Label> {
 
-    public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
-    private static final Pattern LABEL_NAME_RE = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
+    public static final Labels EMPTY;
+
+    static {
+        String[] names = new String[]{};
+        String[] values = new String[]{};
+        EMPTY = new Labels(names, names, values);
+    }
 
-    private final String[] names; // sorted
+    // prometheusNames is the same as names, but dots are replaced with underscores.
+    // Labels is sorted by prometheusNames.
+    // If names[i] does not contain a dot, prometheusNames[i] references the same String as names[i]
+    // so that we don't have unnecessary duplicates of strings.
+    // If none of the names contains a dot, then prometheusNames references the same array as names
+    // so that we don't have unnecessary duplicate arrays.
+    private final String[] prometheusNames;
+    private final String[] names;
     private final String[] values;
 
-    private Labels(String[] names, String[] values) {
-        // names and values are already sorted and validated
+    private Labels(String[] names, String[] prometheusNames, String[] values) {
         this.names = names;
+        this.prometheusNames = prometheusNames;
         this.values = values;
     }
 
@@ -35,9 +49,9 @@ public boolean isEmpty() {
      * or you can use the {@link Labels#newBuilder()}.
      *
      * @param keyValuePairs as in {@code {name1, value1, name2, value2}}. Length must be even.
-     *                      {@link #isValidLabelName(String)} must be true for each name.
-     *                      Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid
-     *                      label names. Label names must be unique (no duplicate label names).
+     *                      {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *                      Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *                      to valid label names. Label names must be unique (no duplicate label names).
      */
     public static Labels of(String... keyValuePairs) {
         if (keyValuePairs.length % 2 != 0) {
@@ -52,18 +66,34 @@ public static Labels of(String... keyValuePairs) {
             names[i] = keyValuePairs[2 * i];
             values[i] = keyValuePairs[2 * i + 1];
         }
-        return Labels.of(names, values);
+        String[] prometheusNames = makePrometheusNames(names);
+        sortAndValidate(names, prometheusNames, values);
+        return new Labels(names, prometheusNames, values);
+    }
+
+    // package private for testing
+    static String[] makePrometheusNames(String[] names) {
+        String[] prometheusNames = names;
+        for (int i=0; i<names.length; i++) {
+            if (names[i].contains(".")) {
+                if (prometheusNames == names) {
+                    prometheusNames = Arrays.copyOf(names, names.length);
+                }
+                prometheusNames[i] = PrometheusNaming.prometheusName(names[i]);
+            }
+        }
+        return prometheusNames;
     }
 
     /**
      * Create a new Labels instance.
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.size() must be equal to values.size().
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.size()} must be equal to {@code values.size()}.
      */
     public static Labels of(List<String> names, List<String> values) {
         if (names.size() != values.size()) {
@@ -74,19 +104,20 @@ public static Labels of(List<String> names, List<String> values) {
         }
         String[] namesCopy = names.toArray(new String[0]);
         String[] valuesCopy = values.toArray(new String[0]);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
      * Create a new Labels instance.
      * You can either create Labels with one of the static {@code Labels.of(...)} methods,
      * or you can use the {@link Labels#newBuilder()}.
      *
-     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
-     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
-     *               Label names must be unique (no duplicate label names).
-     * @param values label values. names.length must be equal to values.length.
+     * @param names  label names. {@link PrometheusNaming#isValidLabelName(String)} must be true for each name.
+     *               Use {@link PrometheusNaming#sanitizeLabelName(String)} to convert arbitrary strings
+     *               to valid label names. Label names must be unique (no duplicate label names).
+     * @param values label values. {@code names.length} must be equal to {@code values.length}.
      */
     public static Labels of(String[] names, String[] values) {
         if (names.length != values.length) {
@@ -97,72 +128,67 @@ public static Labels of(String[] names, String[] values) {
         }
         String[] namesCopy = Arrays.copyOf(names, names.length);
         String[] valuesCopy = Arrays.copyOf(values, values.length);
-        sortAndValidate(namesCopy, valuesCopy);
-        return new Labels(namesCopy, valuesCopy);
+        String[] prometheusNames = makePrometheusNames(namesCopy);
+        sortAndValidate(namesCopy, prometheusNames, valuesCopy);
+        return new Labels(namesCopy, prometheusNames, valuesCopy);
     }
 
     /**
      * Test if these labels contain a specific label name.
+     * <p>
+     * Dots are treated as underscores, so {@code contains("my.label")} and {@code contains("my_label")} are the same.
      */
     public boolean contains(String labelName) {
-        for (String name : names) {
+        labelName = prometheusName(labelName);
+        for (String name : prometheusNames) {
             if (name.equals(labelName)) {
                 return true;
             }
         }
         return false;
     }
 
-    private static void sortAndValidate(String[] names, String[] values) {
-        sort(names, values);
-        validateNames(names);
+    private static void sortAndValidate(String[] names, String[] prometheusNames, String[] values) {
+        sort(names, prometheusNames, values);
+        validateNames(names, prometheusNames);
     }
 
-    private static void validateNames(String[] names) {
+    private static void validateNames(String[] names, String[] prometheusNames) {
         for (int i = 0; i < names.length; i++) {
             if (!isValidLabelName(names[i])) {
                 throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
             }
-            if (i > 0 && names[i - 1].equals(names[i])) {
+            // The arrays are sorted, so duplicates are next to each other
+            if (i > 0 && prometheusNames[i - 1].equals(prometheusNames[i])) {
                 throw new IllegalArgumentException(names[i] + ": duplicate label name");
             }
         }
     }
 
-    private static void sort(String[] names, String[] values) {
-        // bubblesort :)
-        int n = names.length;
+    private static void sort(String[] names, String[] prometheusNames, String[] values) {
+        // bubblesort
+        int n = prometheusNames.length;
         for (int i = 0; i < n - 1; i++) {
             for (int j = 0; j < n - i - 1; j++) {
-                if (names[j].compareTo(names[j + 1]) > 0) {
-                    swap(j, j + 1, names, values);
+                if (prometheusNames[j].compareTo(prometheusNames[j + 1]) > 0) {
+                    swap(j, j + 1, names, prometheusNames, values);
                 }
             }
         }
     }
 
-    private static void swap(int i, int j, String[] names, String[] values) {
+    private static void swap(int i, int j, String[] names, String[] prometheusNames, String[] values) {
         String tmp = names[j];
         names[j] = names[i];
         names[i] = tmp;
         tmp = values[j];
         values[j] = values[i];
         values[i] = tmp;
-    }
-
-    public static boolean isValidLabelName(String name) {
-        return LABEL_NAME_RE.matcher(name).matches() && !name.startsWith("__");
-    }
-
-    /**
-     * Convert arbitrary label names to valid Prometheus label names.
-     */
-    public static String sanitizeLabelName(String labelName) {
-        String result = MetricMetadata.sanitizeMetricName(labelName);
-        while (result.startsWith("__")) {
-            result = result.substring(1);
+        if (prometheusNames != names) {
+            tmp = prometheusNames[j];
+            prometheusNames[j] = prometheusNames[i];
+            prometheusNames[i] = tmp;
         }
-        return result;
     }
 
     @Override
@@ -182,6 +208,15 @@ public String getName(int i) {
         return names[i];
     }
 
+    /**
+     * Like {@link #getName(int)}, but dots are replaced with underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName(int i) {
+        return prometheusNames[i];
+    }
+
     public String getValue(int i) {
         return values[i];
     }
@@ -191,32 +226,54 @@ public String getValue(int i) {
      * This and other must not contain the same label name.
      */
     public Labels merge(Labels other) {
+        if (this.isEmpty()) {
+            return other;
+        }
+        if (other.isEmpty()) {
+            return this;
+        }
         String[] names = new String[this.names.length + other.names.length];
+        String[] prometheusNames = names;
+        if (this.names != this.prometheusNames || other.names != other.prometheusNames) {
+            prometheusNames = new String[names.length];
+        }
         String[] values = new String[names.length];
         int thisPos = 0;
         int otherPos = 0;
         while (thisPos + otherPos < names.length) {
             if (thisPos >= this.names.length) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else if (otherPos >= other.names.length) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) < 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) < 0) {
                 names[thisPos + otherPos] = this.names[thisPos];
                 values[thisPos + otherPos] = this.values[thisPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = this.prometheusNames[thisPos];
+                }
                 thisPos++;
-            } else if (this.names[thisPos].compareTo(other.names[otherPos]) > 0) {
+            } else if (this.prometheusNames[thisPos].compareTo(other.prometheusNames[otherPos]) > 0) {
                 names[thisPos + otherPos] = other.names[otherPos];
                 values[thisPos + otherPos] = other.values[otherPos];
+                if (prometheusNames != names) {
+                    prometheusNames[thisPos + otherPos] = other.prometheusNames[otherPos];
+                }
                 otherPos++;
             } else {
                 throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
             }
         }
-        return new Labels(names, values);
+        return new Labels(names, prometheusNames, values);
     }
 
     /**
@@ -241,12 +298,13 @@ public Labels merge(String[] names, String[] values) {
         System.arraycopy(this.values, 0, mergedValues, 0, this.values.length);
         System.arraycopy(names, 0, mergedNames, this.names.length, names.length);
         System.arraycopy(values, 0, mergedValues, this.values.length, values.length);
-        sortAndValidate(mergedNames, mergedValues);
-        return new Labels(mergedNames, mergedValues);
+        String[] prometheusNames = makePrometheusNames(mergedNames);
+        sortAndValidate(mergedNames, prometheusNames, mergedValues);
+        return new Labels(mergedNames, prometheusNames, mergedValues);
     }
 
     public boolean hasSameNames(Labels other) {
-        return Arrays.equals(names, other.names);
+        return Arrays.equals(prometheusNames, other.prometheusNames);
     }
 
     public boolean hasSameValues(Labels other) {
@@ -255,7 +313,7 @@ public boolean hasSameValues(Labels other) {
 
     @Override
     public int compareTo(Labels other) {
-        int result = compare(names, other.names);
+        int result = compare(prometheusNames, other.prometheusNames);
         if (result != 0) {
             return result;
         }
@@ -288,6 +346,11 @@ private List<Label> asList() {
         return Collections.unmodifiableList(result);
     }
 
+    /**
+     * This must not be used in Prometheus exposition formats because names may contain dots.
+     * <p>
+     * However, for debugging it's better to show the original names rather than the Prometheus names.
+     */
     @Override
     public String toString() {
         StringBuilder b = new StringBuilder();
@@ -324,18 +387,17 @@ private void appendEscapedLabelValue(StringBuilder b, String value) {
         }
     }
 
-    // as labels are sorted by name, equals is insensitive to the order
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         Labels labels = (Labels) o;
-        return Arrays.equals(names, labels.names) && Arrays.equals(values, labels.values);
+        return labels.hasSameNames(this) && labels.hasSameValues(this);
     }
 
     @Override
     public int hashCode() {
-        int result = Arrays.hashCode(names);
+        int result = Arrays.hashCode(prometheusNames);
         result = 31 * result + Arrays.hashCode(values);
         return result;
     }u}(j{z  (366805ddf9954e2b90078d43f8fdcadf4c88df76jz  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javajz  modifiedjz  K*jz  Kejz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XT!  @@ -1,28 +1,37 @@
 package io.prometheus.metrics.model.snapshots;
 
-import java.util.regex.Pattern;
-
 /**
  * Immutable container for metric metadata: name, help, unit.
  */
 public final class MetricMetadata {
-    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
-    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
-    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
-    // * Micrometer: jvm_buffer_count
-    // * OpenTelemetry: process_runtime_jvm_buffer_count
-    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
-    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
-    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
 
     /**
-     * Name is the name without suffix.
+     * Name without suffix.
+     * <p>
      * For example, the name for a counter "http_requests_total" is "http_requests".
-     * The name of an info called "target_info" is "target".
+     * The name of an info called "jvm_info" is "jvm".
+     * <p>
+     * We allow dots in label names. Dots are automatically replaced with underscores in Prometheus
+     * exposition formats. However, if metrics from this library are exposed in OpenTelemetry
+     * format dots are retained.
+     * <p>
      * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
      */
     private final String name;
+
+    /**
+     * Same as name, except if name contains dots, then the prometheusName is {@code name.replace(".", "_")}.
+     */
+    private final String prometheusName;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final String help;
+
+    /**
+     * optional, may be {@code null}.
+     */
     private final Unit unit;
 
     /**
@@ -40,28 +49,10 @@ public MetricMetadata(String name, String help) {
     }
 
     /**
-     * Naming conventions:
-     * <ul>
-     *     <li>The name MUST NOT include the {@code _total} suffix for counter metrics or the
-     *         {@code _info} suffix for info metrics.
-     *         If in doubt, use {@link #sanitizeMetricName(String)} to remove the suffix.</li>
-     *     <li>If name is {@code null}, a {@link NullPointerException} is thrown.</li>
-     *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
-     *         an {@link IllegalArgumentException} is thrown.
-     *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
-     *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
-     *         <pre>
-     *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
-     *         </pre>
-     *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
-     *     <li>The name MUST NOT contain the {@code _total} or {@code _created} suffixes for counters,
-     *         the {@code _count}, {@code _sum}, or {@code _created} suffixes for summaries,
-     *         the {@code _count}, {@code _sum}, {@code _bucket}, or {@code _created} suffixes for classic histograms,
-     *         the {@code _gcount}, {@code _gsum}, {@code _bucket} suffixes for classic gauge histograms,
-     *         or the {@code _info} suffix for info metrics.</li>
-     * </ul>
-     *
-     * @param name must follow the naming conventions described above.
+     * Constructor.
+     * @param name must not be {@code null}. {@link PrometheusNaming#isValidMetricName(String) isValidMetricName(name)}
+     *             must be {@code true}. Use {@link PrometheusNaming#sanitizeMetricName(String)} to convert arbitrary
+     *             strings into valid names.
      * @param help optional. May be {@code null}.
      * @param unit optional. May be {@code null}.
      */
@@ -70,16 +61,29 @@ public MetricMetadata(String name, String help, Unit unit) {
         this.help = help;
         this.unit = unit;
         validate();
+        this.prometheusName = name.contains(".") ? PrometheusNaming.prometheusName(name) : name;
     }
 
     /**
      * The name does not include the {@code _total} suffix for counter metrics
      * or the {@code _info} suffix for Info metrics.
+     * <p>
+     * The name may contain dots. Use {@link #getPrometheusName()} to get the name in Prometheus format,
+     * i.e. with dots replaced by underscores.
      */
     public String getName() {
         return name;
     }
 
+    /**
+     * Same as {@link #getName()} but with dots replaced by underscores.
+     * <p>
+     * This is used by Prometheus exposition formats.
+     */
+    public String getPrometheusName() {
+        return prometheusName;
+    }
+
     public String getHelp() {
         return help;
     }
@@ -96,73 +100,10 @@ private void validate() {
         if (name == null) {
             throw new IllegalArgumentException("Missing required field: name is null");
         }
-        if (!isValidMetricName(name)) {
-            throw new IllegalArgumentException("'" + name + "': illegal metric name");
-        }
-    }
-
-    /**
-     * Test if a metric name is valid. Rules:
-     * <ul>
-     * <li>The name must match {@link #METRIC_NAME_RE}.</li>
-     * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
-     * </ul>
-     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
-     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but this library does not enforce Unit
-     * suffixes).
-     * <p>
-     * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
-     * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
-     * values: {@code processing_time_seconds_total} for the counter value, and the optional
-     * {@code processing_time_seconds_created} timestamp.
-     * <p>
-     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
-     */
-    public static boolean isValidMetricName(String name) {
-        for (String reservedSuffix : RESERVED_SUFFIXES) {
-            if (name.endsWith(reservedSuffix)) {
-                return false;
-            }
-        }
-        return METRIC_NAME_RE.matcher(name).matches();
-    }
-
-    /**
-     * Convert arbitrary metric names to valid Prometheus metric names.
-     */
-    public static String sanitizeMetricName(String metricName) {
-        if (metricName.isEmpty()) {
-            throw new IllegalArgumentException("Cannot convert an empty string into a valid metric name.");
-        }
-        int length = metricName.length();
-        char[] sanitized = new char[length];
-        for (int i = 0; i < length; i++) {
-            char ch = metricName.charAt(i);
-            if (ch == ':' ||
-                    (ch >= 'a' && ch <= 'z') ||
-                    (ch >= 'A' && ch <= 'Z') ||
-                    (i > 0 && ch >= '0' && ch <= '9')) {
-                sanitized[i] = ch;
-            } else {
-                sanitized[i] = '_';
-            }
-        }
-        String sanitizedString = new String(sanitized);
-        boolean modified = true;
-        while (modified) {
-            modified = false;
-            for (String reservedSuffix : RESERVED_SUFFIXES) {
-                if (sanitizedString.equals(reservedSuffix)) {
-                    // This is for the corner case when you call sanitizeMetricName("_total").
-                    // In that case the result will be "total".
-                    return reservedSuffix.substring(1);
-                }
-                if (sanitizedString.endsWith(reservedSuffix)) {
-                    sanitizedString = sanitizedString.substring(0, sanitizedString.length() - reservedSuffix.length());
-                    modified = true;
-                }
-            }
+        String error = PrometheusNaming.validateMetricName(name);
+        if (error != null) {
+            throw new IllegalArgumentException("'" + name + "': Illegal metric name. " + error
+                    + " Call " + PrometheusNaming.class.getSimpleName() + ".sanitizeMetricName(name) to avoid this error.");
         }
-        return sanitizedString;
     }
 }uj      }(j{z  (7faaa63998c19f3127cb26208547237fdd5548bfjz  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javajz  modifiedjz  Kjz  Kjz  K	jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -20,10 +20,13 @@ protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
     }
 
     protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
-        this.metadata = metadata;
+        if (metadata == null) {
+            throw new NullPointerException("metadata");
+        }
         if (data == null) {
-            throw new NullPointerException();
+            throw new NullPointerException("data");
         }
+        this.metadata = metadata;
         List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
         dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
         this.data = Collections.unmodifiableList(dataCopy);
@@ -56,7 +59,7 @@ public static abstract class Builder<T extends Builder<T>> {
         /**
          * The name is required.
          * If the name is missing or invalid, {@code build()} will throw an {@link IllegalArgumentException}.
-         * See {@link MetricMetadata#isValidMetricName(String)} for info on valid metric names.
+         * See {@link PrometheusNaming#isValidMetricName(String)} for info on valid metric names.
          */
         public T withName(String name) {
             this.name = name;u}(j{z  (5308e6f9822dbf2060d3bc890378147102554514jz  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javajz  modifiedjz  Kjz  Kjz  K	jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XM  @@ -7,6 +7,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
 import static java.util.Collections.unmodifiableList;
 import static java.util.Comparator.comparing;
 
@@ -36,10 +37,10 @@ public MetricSnapshots(MetricSnapshot... snapshots) {
      */
     public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
         List<MetricSnapshot> list = new ArrayList<>(snapshots);
-        list.sort(comparing(s -> s.getMetadata().getName()));
+        list.sort(comparing(s -> s.getMetadata().getPrometheusName()));
         for (int i = 0; i < snapshots.size() - 1; i++) {
-            if (list.get(i).getMetadata().getName().equals(list.get(i + 1).getMetadata().getName())) {
-                throw new IllegalArgumentException(list.get(i).getMetadata().getName() + ": duplicate metric name");
+            if (list.get(i).getMetadata().getPrometheusName().equals(list.get(i + 1).getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException(list.get(i).getMetadata().getPrometheusName() + ": duplicate metric name");
             }
         }
         this.snapshots = unmodifiableList(list);
@@ -79,7 +80,7 @@ private Builder() {
 
         public boolean containsMetricName(String name) {
             for (MetricSnapshot snapshot : snapshots) {
-                if (snapshot.getMetadata().getName().equals(name)) {
+                if (snapshot.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                     return true;
                 }
             }u}(j{z  (58de0c814385d31a732df26926a3fe56d2377a9ejz  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/PrometheusNaming.javajz  addedjz  Kjz  K jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNaming.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  XU  @@ -0,0 +1,178 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.regex.Pattern;
+
+/**
+ * Utility for Prometheus Metric and Label naming.
+ * <p>
+ * Note that this library allows dots in metric and label names. Dots will automatically be replaced with underscores
+ * in Prometheus exposition formats. However, if metrics are exposed in OpenTelemetry format the dots are retained.
+ */
+public class PrometheusNaming {
+
+    /**
+     * Legal characters for metric names, including dot.
+     */
+    private static final Pattern METRIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.:][a-zA-Z0-9_.:]+$");
+
+    /**
+     * Legal characters for label names, including dot.
+     */
+    private static final Pattern LABEL_NAME_PATTERN = Pattern.compile("^[a-zA-Z_.][a-zA-Z0-9_.]*$");
+
+    /**
+     * According to OpenMetrics {@code _count} and {@code _sum} (and {@code _gcount}, {@code _gsum}) should also be
+     * reserved metric name suffixes. However, popular instrumentation libraries have Gauges with names
+     * ending in {@code _count}.
+     * Examples:
+     * <ul>
+     * <li>Micrometer: {@code jvm_buffer_count}</li>
+     * <li>OpenTelemetry: {@code process_runtime_jvm_buffer_count}</li>
+     * </ul>
+     * We do not treat {@code _count} and {@code _sum} as reserved suffixes here for compatibility with these libraries.
+     * However, there is a risk of name conflict if someone creates a gauge named {@code my_data_count} and a
+     * histogram or summary named {@code my_data}, because the histogram or summary will implicitly have a sample
+     * named {@code my_data_count}.
+     */
+    private static final String[] RESERVED_METRIC_NAME_SUFFIXES = {
+            "_total", "_created", "_bucket", "_info",
+            ".total", ".created", ".bucket", ".info"
+    };
+
+    /**
+     * Test if a metric name is valid. Rules:
+     * <ul>
+     * <li>The name must match {@link #METRIC_NAME_PATTERN}.</li>
+     * <li>The name MUST NOT end with one of the {@link #RESERVED_METRIC_NAME_SUFFIXES}.</li>
+     * </ul>
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix.
+     * Note that <a href="https://openmetrics.io/">OpenMetrics</a> requires metric names to have their unit as suffix,
+     * and we implement this in {@code prometheus-metrics-core}. However, {@code prometheus-metrics-model}
+     * does not enforce Unit suffixes.
+     * <p>
+     * Example: If you create a Counter for a processing time with Unit {@link Unit#SECONDS SECONDS},
+     * the name should be {@code processing_time_seconds}. When exposed in OpenMetrics Text format,
+     * this will be represented as two values: {@code processing_time_seconds_total} for the counter value,
+     * and the optional {@code processing_time_seconds_created} timestamp.
+     * <p>
+     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
+     */
+    public static boolean isValidMetricName(String name) {
+        return validateMetricName(name) == null;
+    }
+
+    /**
+     * Same as {@link #isValidMetricName(String)}, but produces an error message.
+     * <p>
+     * The name is valid if the error message is {@code null}.
+     */
+    static String validateMetricName(String name) {
+        for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+            if (name.endsWith(reservedSuffix)) {
+                return "The metric name must not include the '" + reservedSuffix + "' suffix.";
+            }
+        }
+        if (!METRIC_NAME_PATTERN.matcher(name).matches()) {
+            return "The metric name contains unsupported characters";
+        }
+        return null;
+    }
+
+    public static boolean isValidLabelName(String name) {
+        return LABEL_NAME_PATTERN.matcher(name).matches() &&
+                !(name.startsWith("__") || name.startsWith("._") || name.startsWith("..") || name.startsWith("_."));
+    }
+
+    /**
+     * Get the metric or label name that is used in Prometheus exposition format.
+     *
+     * @param name must be a valid metric or label name,
+     *             i.e. {@link #isValidMetricName(String) isValidMetricName(name)}
+     *             or {@link #isValidLabelName(String) isValidLabelName(name)}  must be true.
+     * @return the name with dots replaced by underscores.
+     */
+    public static String prometheusName(String name) {
+        return name.replace(".", "_");
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidMetricName(String) isValidMetricName(name)} is true.
+     */
+    public static String sanitizeMetricName(String metricName) {
+        if (metricName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid metric name.");
+        }
+        String sanitizedName = replaceIllegalCharsInMetricName(metricName);
+        boolean modified = true;
+        while (modified) {
+            modified = false;
+            for (String reservedSuffix : RESERVED_METRIC_NAME_SUFFIXES) {
+                if (sanitizedName.equals(reservedSuffix)) {
+                    // This is for the corner case when you call sanitizeMetricName("_total").
+                    // In that case the result will be "total".
+                    return reservedSuffix.substring(1);
+                }
+                if (sanitizedName.endsWith(reservedSuffix)) {
+                    sanitizedName = sanitizedName.substring(0, sanitizedName.length() - reservedSuffix.length());
+                    modified = true;
+                }
+            }
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Convert an arbitrary string to a name where {@link #isValidLabelName(String) isValidLabelName(name)} is true.
+     */
+    public static String sanitizeLabelName(String labelName) {
+        if (labelName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string to a valid label name.");
+        }
+        String sanitizedName = replaceIllegalCharsInLabelName(labelName);
+        while (sanitizedName.startsWith("__") || sanitizedName.startsWith("_.") || sanitizedName.startsWith("._") || sanitizedName.startsWith("..")) {
+            sanitizedName = sanitizedName.substring(1);
+        }
+        return sanitizedName;
+    }
+
+    /**
+     * Returns a string that matches {@link #METRIC_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInMetricName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == ':' ||
+                    ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+
+    /**
+     * Returns a string that matches {@link #LABEL_NAME_PATTERN}.
+     */
+    private static String replaceIllegalCharsInLabelName(String name) {
+        int length = name.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (ch == '.' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        return new String(sanitized);
+    }
+}u}(j{z  (9b0c4f07d7f0601545a394b4f9082ec3194aeeebjz  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javajz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  Xt  @@ -30,8 +30,8 @@ private void validate() {
             throw new IllegalArgumentException("An state set metric cannot have a unit.");
         }
         for (StateSetDataPointSnapshot entry : getData()) {
-            if (entry.getLabels().contains(getMetadata().getName())) {
-                throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
+            if (entry.getLabels().contains(getMetadata().getPrometheusName())) {
+                throw new IllegalArgumentException("Label name " + getMetadata().getPrometheusName() + " is reserved.");
             }
         }
     }u}(j{z  (8519f5f277ee317712db90c768f587c3091c09d6jz  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/PrometheusRegistryTest.javajz  addedjz  KRjz  K jz  KRjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistryTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PrometheusRegistryTest {
+
+    Collector noName = new Collector() {
+        @Override
+        public MetricSnapshot collect() {
+            return GaugeSnapshot.newBuilder()
+                    .withName("no_name_gauge")
+                    .build();
+        }
+
+        @Override
+        public String getPrometheusName() {
+            return null;
+        }
+    };
+
+    Collector counterA1 = () -> CounterSnapshot.newBuilder()
+            .withName("counter_a")
+            .build();
+
+    Collector counterA2 = () -> CounterSnapshot.newBuilder()
+            .withName("counter.a")
+            .build();
+
+    Collector counterB = () -> CounterSnapshot.newBuilder()
+            .withName("counter_b")
+            .build();
+
+    Collector gaugeA = () -> GaugeSnapshot.newBuilder()
+            .withName("gauge_a")
+            .build();
+
+    @Test
+    public void registerNoName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        // If the collector does not have a name at registration time, there is no conflict during registration.
+        registry.register(noName);
+        registry.register(noName);
+        // However, at scrape time the collector has to provide a metric name, and then we'll get a duplicat name error.
+        try {
+            registry.scrape();
+        } catch (IllegalStateException e) {
+            Assert.assertTrue(e.getMessage().contains("duplicate") && e.getMessage().contains("no_name_gauge"));
+            return;
+        }
+        Assert.fail("Expected duplicate name exception");
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void registerDuplicateName() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterA2);
+    }
+
+    @Test
+    public void registerOk() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        registry.register(counterA1);
+        registry.register(counterB);
+        registry.register(gaugeA);
+        MetricSnapshots snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+
+        registry.unregister(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(2, snapshots.size());
+
+        registry.register(counterB);
+        snapshots = registry.scrape();
+        Assert.assertEquals(3, snapshots.size());
+    }
+}u}(j{z  (d4e2fec337b69b021e674354003ad0e993df4004jz  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javajz  modifiedjz  Kjz  K jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -87,6 +87,11 @@ public void testTotalSuffixPresent() {
         CounterSnapshot.newBuilder().withName("test_total").build();
     }
 
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresentDot() {
+        CounterSnapshot.newBuilder().withName("test.total").build();
+    }
+
     @Test(expected = IllegalArgumentException.class)
     public void testValueMissing() {
         CounterDataPointSnapshot.newBuilder().build();u}(j{z  (c2fd2af6365247fec4b6c4754aff692efdefb35fjz  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javajz  modifiedjz  Kjz  K jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X#  @@ -43,4 +43,18 @@ public void testDataImmutable() {
         iterator.next();
         iterator.remove();
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffix() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm_info")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMustNotIncludeSuffixDot() {
+        InfoSnapshot.newBuilder()
+                .withName("jvm.info")
+                .build();
+    }
 }u}(j{z  (d7a3e8b3e4bca4ac75de0f7b9a390dc602ce10bfjz  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javajz  modifiedjz  K8jz  Kjz  K=jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  Xx
  @@ -2,8 +2,10 @@
 
 import io.prometheus.metrics.model.snapshots.Labels;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
 import static org.junit.Assert.assertNotEquals;
 
 public class LabelsTest {
@@ -47,6 +49,20 @@ public void testCompareDifferentNumberOfLabels() {
         assertNotEquals(labels2, labels1);
     }
 
+    @Test
+    public void testComparePrometheusNames() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.b", "val");
+        assertLessThan(labels1, labels2); // this is true because it compares "my_a" to "my_b".
+    }
+
+    @Test
+    public void testEqualsHashcodeDots() {
+        Labels labels1 = Labels.of("my_a", "val");
+        Labels labels2 = Labels.of("my.a", "val");
+        Assert.assertEquals(labels1, labels2);
+        Assert.assertEquals(labels1.hashCode(), labels2.hashCode());
+    }
 
     @Test
     public void testCompareEquals() {
@@ -60,21 +76,56 @@ public void testCompareEquals() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalLabelName() {
-        Labels.of("http.status_code", "200");
+        Labels.of("my_service/status", "200");
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testReservedLabelName() {
         Labels.of("__name__", "requests_total");
     }
 
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabelName() {
+        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    }
+
     @Test
-    public void testSanitizeLabelName() {
-        Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
+    public void testMakePrometheusNames() {
+        String[] names = new String[]{};
+        String[] prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"no_dots", "at_all"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertSame(names, prometheusNames);
+
+        names = new String[]{"dots", "here.it.is"};
+        prometheusNames = Labels.makePrometheusNames(names);
+        Assert.assertNotSame(names, prometheusNames);
+        Assert.assertSame(names[0], prometheusNames[0]);
+        Assert.assertEquals("here.it.is", names[1]);
+        Assert.assertEquals("here_it_is", prometheusNames[1]);
+    }
+
+    @Test
+    public void testMerge() {
+        Labels labels1 = Labels.of("key.1", "value 1", "key.3", "value 3");
+        Labels labels2 = Labels.of("key_2", "value 2");
+        Labels merged = labels2.merge(labels1);
+        Assert.assertEquals("key.1", merged.getName(0));
+        Assert.assertEquals("key_2", merged.getName(1));
+        Assert.assertEquals("key.3", merged.getName(2));
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void testDuplicateLabelName() {
-        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    public void testMergeDuplicateName() {
+        Labels labels1 = Labels.of("key_one", "v1");
+        Labels labels2 = Labels.of("key.one", "v2");
+        labels2.merge(labels1);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateName() {
+        Labels.of("key_one", "v1", "key.one", "v2");
     }
 }u}(j{z  (6e76f724a29dcaadcae96d15cf691cae4b8f302fjz  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javajz  modifiedjz  Kjz  K	jz  Kjz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X
  @@ -1,10 +1,11 @@
 package io.prometheus.metrics.model.snapshots;
 
-import io.prometheus.metrics.model.snapshots.MetricMetadata;
-import io.prometheus.metrics.model.snapshots.Unit;
 import org.junit.Assert;
 import org.junit.Test;
 
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
 public class MetricMetadataTest {
 
     @Test(expected = IllegalArgumentException.class)
@@ -19,37 +20,38 @@ public void testNullName() {
 
     @Test(expected = IllegalArgumentException.class)
     public void testIllegalName() {
-        new MetricMetadata("http.server.duration");
+        new MetricMetadata("my_namespace/http_server_duration"); // let's see when we decide to allow slashes :)
     }
 
     @Test
     public void testSanitizationIllegalCharacters() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
-        Assert.assertEquals("http_server_duration", metadata.getName());
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_namespace/http.server.duration"), "help string", Unit.SECONDS);
+        Assert.assertEquals("my_namespace_http.server.duration", metadata.getName());
+        Assert.assertEquals("my_namespace_http_server_duration", metadata.getPrometheusName());
         Assert.assertEquals("help string", metadata.getHelp());
         Assert.assertEquals("seconds", metadata.getUnit().toString());
     }
 
     @Test
     public void testSanitizationCounter() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("my_events_total"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("my_events_total"));
         Assert.assertEquals("my_events", metadata.getName());
     }
 
     @Test
     public void testSanitizationInfo() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("target_info"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("target_info"));
         Assert.assertEquals("target", metadata.getName());
     }
 
     @Test
     public void testSanitizationWeirdCornerCase() {
-        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("_total_created"));
+        MetricMetadata metadata = new MetricMetadata(sanitizeMetricName("_total_created"));
         Assert.assertEquals("total", metadata.getName());
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testSanitizeEmptyString() {
-        MetricMetadata.sanitizeMetricName("");
+        sanitizeMetricName("");
     }
 }u}(j{z  (d9ba9339d77c244a3837b1c8b50806899b02ce38jz  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/PrometheusNamingTest.javajz  addedjz  K"jz  K jz  K"jz  https://github.com/prometheus/client_java/blob/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javajz  https://github.com/prometheus/client_java/raw/0179958f2dd63ad4ac302a0b1617e0a66ef68099/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.javajz  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FPrometheusNamingTest.java?ref=0179958f2dd63ad4ac302a0b1617e0a66ef68099jz  X  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeLabelName;
+import static io.prometheus.metrics.model.snapshots.PrometheusNaming.sanitizeMetricName;
+
+public class PrometheusNamingTest {
+
+    @Test
+    public void testSanitizeMetricName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeMetricName("0abc.def")));
+        Assert.assertEquals("___ab_:c0", prometheusName(sanitizeMetricName("___ab.:c0")));
+        Assert.assertEquals("my_prefix_my_metric", sanitizeMetricName("my_prefix/my_metric"));
+        Assert.assertEquals("my_counter", prometheusName(sanitizeMetricName("my_counter_total")));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm_info"));
+        Assert.assertEquals("jvm", sanitizeMetricName("jvm.info"));
+        Assert.assertEquals("a.b", sanitizeMetricName("a.b"));
+    }
+
+    @Test
+    public void testSanitizeLabelName() {
+        Assert.assertEquals("_abc_def", prometheusName(sanitizeLabelName("0abc.def")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("__abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("___abc")));
+        Assert.assertEquals("_abc", prometheusName(sanitizeLabelName("_.abc")));
+        Assert.assertEquals("abc.def", sanitizeLabelName("abc.def"));
+        Assert.assertEquals("abc.def2", sanitizeLabelName("abc.def2"));
+    }
+}ueu(0a60cf57fc42522d9b435f5718fcb1bfb306e2c1}(sha(0a60cf57fc42522d9b435f5718fcb1bfb306e2c1node_idEC_kwDOAHoJt9oAKDBhNjBjZjU3ZmM0MjUyMmQ5YjQzNWY1NzE4ZmNiMWJmYjMwNmUyYzEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-06T15:26:34Zu	committer}(j|  Fabian Stäberj
|  fabian@fstab.dej|  2023-08-06T15:26:34Zumessage(Integration tests for exporters completetree}(j |  (7ed1f79aad8bca545ebbbc6829c1250b70e5dff4urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/7ed1f79aad8bca545ebbbc6829c1250b70e5dff4uj|  hhttps://api.github.com/repos/prometheus/client_java/git/commits/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj|  dhttps://api.github.com/repos/prometheus/client_java/commits/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1html_urlYhttps://github.com/prometheus/client_java/commit/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/commentsj|  }(loginfstabidJ' j|  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j|  "https://api.github.com/users/fstabj$|  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj|  }(j)|  fstabj+|  J' j|  MDQ6VXNlcjMzMDUzNQ==j-|  2https://avatars.githubusercontent.com/u/330535?v=4j/|  h3j|  "https://api.github.com/users/fstabj$|  https://github.com/fstabj2|  ,https://api.github.com/users/fstab/followersj4|  9https://api.github.com/users/fstab/following{/other_user}j6|  2https://api.github.com/users/fstab/gists{/gist_id}j8|  9https://api.github.com/users/fstab/starred{/owner}{/repo}j:|  0https://api.github.com/users/fstab/subscriptionsj<|  'https://api.github.com/users/fstab/orgsj>|  (https://api.github.com/users/fstab/reposj@|  3https://api.github.com/users/fstab/events{/privacy}jB|  2https://api.github.com/users/fstab/received_eventsjD|  UserjF|  uparents]}(j |  (ee5a9c04e4419edad57b7512063db999cff39b03j|  dhttps://api.github.com/repos/prometheus/client_java/commits/ee5a9c04e4419edad57b7512063db999cff39b03j$|  Yhttps://github.com/prometheus/client_java/commit/ee5a9c04e4419edad57b7512063db999cff39b03uastats}(totalM	additionsMZ	deletionsKMufiles](}(j |  (e3d41b2579bd2c976472d7976026fa7a6093a764filenameintegration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javastatusmodifiedj`|  Kja|  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaraw_urlhttps://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1patchX  @@ -1,14 +1,15 @@
 package io.prometheus.metrics.it.exporter.httpserver;
 
 import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.model.registry.Collector;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
 
 import java.io.IOException;
-import java.sql.SQLOutput;
 
 public class HTTPServerSample {
 
@@ -33,6 +34,23 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("total number of seconds since this application was started")
                 .withUnit(Unit.SECONDS)
                 .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("httpserver-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
 
         if (mode == Mode.error) {
             Collector failingCollector = new Collector() {
@@ -56,11 +74,6 @@ public MetricSnapshot collect() {
                 .build();
 
         System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
-
-        while (true) {
-            Thread.sleep(1000);
-            counter.inc();
-        }
     }
 
     private static int parsePortOrExit(String port) {u}(j |  (2d43548f089f655382940341e2dedf0b1a96117fjf|  integration-tests/it-exporter/it-exporter-servlet-jakarta-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jakarta/JakartaServletSample.javajh|  modifiedj`|  Kja|  Kjj|  Kjk|  X  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.javajm|  X  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.javajo|  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jakarta-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjakarta%2FJakartaServletSample.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X  @@ -1,6 +1,8 @@
 package io.prometheus.metrics.it.exporter.servlet.jakarta;
 
 import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Info;
 import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
 import io.prometheus.metrics.model.registry.Collector;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
@@ -35,11 +37,28 @@ public static void main(String[] args) throws LifecycleException, IOException {
         int port = parsePortOrExit(args[0]);
         Mode mode = parseModeOrExit(args[1]);
 
-        Counter.newBuilder()
+        Counter counter = Counter.newBuilder()
                 .withName("uptime_seconds_total")
                 .withHelp("total number of seconds since this application was started")
                 .withUnit(Unit.SECONDS)
                 .register();
+        counter.inc(17);
+
+        Info info = Info.newBuilder()
+                .withName("integration_test_info")
+                .withHelp("Info metric on this integration test")
+                .withLabelNames("test_name")
+                .register();
+        info.infoLabelValues("servlet-jakarta-sample");
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("Temperature in Celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+        gauge.withLabelValues("inside").set(23.0);
+        gauge.withLabelValues("outside").set(27.0);
 
         if (mode == Mode.error) {
             Collector failingCollector = new Collector() {u}(j |  (8d7404585288239abecdd5265b2984d493cb0628jf|  6integration-tests/it-exporter/it-exporter-test/pom.xmljh|  modifiedj`|  Kja|  K jj|  Kjk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljo|  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X}  @@ -33,6 +33,11 @@
     </developers>
 
     <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>u}(j |  (3373f7019ea97dadd2612aa75f136cd62aeaf698jf|  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javajh|  modifiedj`|  Kja|  K	jj|  Kjk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javajo|  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X<  @@ -2,6 +2,7 @@
 
 import io.prometheus.client.it.common.LogConsumer;
 import io.prometheus.client.it.common.Volume;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import org.apache.commons.io.IOUtils;
 import org.junit.After;
 import org.junit.Assert;
@@ -11,14 +12,22 @@
 import org.testcontainers.containers.BindMode;
 import org.testcontainers.containers.GenericContainer;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
+import java.util.zip.GZIPInputStream;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
 
 @RunWith(Parameterized.class)
 public class ExporterIT {
@@ -57,12 +66,17 @@ public void testOpenMetricsTextFormat() throws IOException {
         sampleAppContainer
                 .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
                 .start();
-        Response response = scrape("Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
         Assert.assertEquals(200, response.status);
         assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
         Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
         String bodyString = new String(response.body);
-        Assert.assertTrue(bodyString.contains("uptime_seconds_total 0.0"));
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
         // OpenMetrics text format has a UNIT.
         Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
     }
@@ -72,33 +86,222 @@ public void testPrometheusTextFormat() throws IOException {
         sampleAppContainer
                 .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
                 .start();
-        Response response = scrape();
+        Response response = scrape("GET", "");
         Assert.assertEquals(200, response.status);
         assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
         Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
         String bodyString = new String(response.body);
-        Assert.assertTrue(bodyString.contains("uptime_seconds_total 0.0"));
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"inside\"} 23.0"));
+        Assert.assertTrue(bodyString.contains("temperature_celsius{location=\"outside\"} 27.0"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
         // Prometheus text format does not have a UNIT.
         Assert.assertFalse(bodyString.contains("# UNIT uptime_seconds seconds"));
     }
 
+    @Test
+    public void testPrometheusProtobufFormat() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertNull(response.getHeader("Content-Encoding"));
+        Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        List<Metrics.MetricFamily> metrics = new ArrayList<>();
+        InputStream in = new ByteArrayInputStream(response.body);
+        while (in.available() > 0) {
+            metrics.add(Metrics.MetricFamily.parseDelimitedFrom(in));
+        }
+        Assert.assertEquals(3, metrics.size());
+        // metrics are sorted by name
+        Assert.assertEquals("integration_test_info", metrics.get(0).getName());
+        Assert.assertEquals("temperature_celsius", metrics.get(1).getName());
+        Assert.assertEquals("uptime_seconds_total", metrics.get(2).getName());
+    }
+
+    @Test
+    public void testCompression() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "",
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        if (response.getHeader("Content-Length") != null) {
+            // The servlet container might set a content length as the body is very small.
+            Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+            Assert.assertNull(response.getHeader("Transfer-Encoding"));
+        } else {
+            // If no content length is set, transfer-encoding chunked must be used.
+            Assert.assertEquals("chunked", response.getHeader("Transfer-Encoding"));
+        }
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertTrue(body.contains("uptime_seconds_total 17.0"));
+    }
+
+    @Test
+    public void testErrorHandling() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "error")
+                .start();
+        Response response = scrape("GET", "", "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(500, response.status);
+        Assert.assertTrue(new String(response.body, UTF_8).contains("Simulating an error."));
+    }
+
+    @Test
+    public void testHeadRequest() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response fullResponse = scrape("GET", "");
+        int size = fullResponse.body.length;
+        Assert.assertTrue(size > 0);
+        Response headResponse = scrape("HEAD", "");
+        Assert.assertEquals(200, headResponse.status);
+        Assert.assertEquals(Integer.toString(size), headResponse.getHeader("Content-Length"));
+        Assert.assertEquals(0, headResponse.body.length);
+    }
+
+    @Test
+    public void testDebug() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=openmetrics");
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertTrue(bodyString.contains("# UNIT uptime_seconds seconds"));
+    }
+
+    @Test
+    public void testNameFilter() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("integration_test_info") + "&" + nameParam("uptime_seconds_total"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        String bodyString = new String(response.body, UTF_8);
+        Assert.assertTrue(bodyString.contains("integration_test_info{test_name=\"" + sampleApp + "\"} 1"));
+        Assert.assertTrue(bodyString.contains("uptime_seconds_total 17.0"));
+        Assert.assertFalse(bodyString.contains("temperature_celsius"));
+    }
+
+    @Test
+    public void testEmptyResponseOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/openmetrics-text; version=1.0.0; charset=utf-8", response.getHeader("Content-Type"));
+        Assert.assertEquals(Integer.toString(response.body.length), response.getHeader("Content-Length"));
+        Assert.assertEquals("# EOF\n", new String(response.body, UTF_8));
+    }
+
+    @Test
+    public void testEmptyResponseText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"));
+        Assert.assertEquals(200, response.status);
+        assertContentType("text/plain; version=0.0.4; charset=utf-8", response.getHeader("Content-Type"));
+        if (response.getHeader("Content-Length") != null) { // HTTPServer does not send a zero content length, which is ok
+            Assert.assertEquals("0", response.getHeader("Content-Length"));
+        }
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseProtobuf() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited");
+        Assert.assertEquals(200, response.status);
+        assertContentType("application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited", response.getHeader("Content-Type"));
+        Assert.assertEquals(0, response.body.length);
+    }
+
+    @Test
+    public void testEmptyResponseGzipOpenMetrics() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept", "application/openmetrics-text; version=1.0.0; charset=utf-8",
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals("# EOF\n", body);
+    }
+
+    @Test
+    public void testEmptyResponseGzipText() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", nameParam("none_existing"),
+                "Accept-Encoding", "gzip");
+        Assert.assertEquals(200, response.status);
+        Assert.assertEquals("gzip", response.getHeader("Content-Encoding"));
+        String body = new String(IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(response.body))), UTF_8);
+        Assert.assertEquals(0, body.length());
+    }
+
+    private String nameParam(String name) throws UnsupportedEncodingException {
+        return URLEncoder.encode("name[]", UTF_8.name()) + "=" + URLEncoder.encode(name, UTF_8.name());
+    }
+
+    @Test
+    public void testDebugUnknown() throws IOException {
+        sampleAppContainer
+                .withCommand("java", "-jar", "/app/" + sampleApp + ".jar", "9400", "success")
+                .start();
+        Response response = scrape("GET", "debug=unknown");
+        Assert.assertEquals(500, response.status);
+        assertContentType("text/plain; charset=utf-8", response.getHeader("Content-Type"));
+    }
+
     private void assertContentType(String expected, String actual) {
-        Assert.assertTrue(expected.equals(actual) || expected.replace(" ", "").equals(actual));
+        if (!expected.replace(" ", "").equals(actual)) {
+            Assert.assertEquals(expected, actual);
+        }
     }
 
-    private Response scrape(String... requestHeaders) throws IOException {
+    private Response scrape(String method, String queryString, String... requestHeaders) throws IOException {
         long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
-        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics");
+        URL url = new URL("http://localhost:" + sampleAppContainer.getMappedPort(9400) + "/metrics?" + queryString);
         HttpURLConnection con = (HttpURLConnection) url.openConnection();
-        con.setRequestMethod("GET");
+        con.setRequestMethod(method);
         for (int i = 0; i < requestHeaders.length; i += 2) {
             con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
         }
         long start = System.currentTimeMillis();
         Exception exception = null;
         while (System.currentTimeMillis() - start < timeoutMillis) {
             try {
-                return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                if (con.getResponseCode() == 200) {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getInputStream()));
+                } else {
+                    return new Response(con.getResponseCode(), con.getHeaderFields(), IOUtils.toByteArray(con.getErrorStream()));
+                }
             } catch (Exception e) {
                 exception = e;
                 try {u}(j |  (4e3db6955fe7fbf010877f9faef50315ac489eedjf|  rprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.javajh|  modifiedj`|  Kja|  Kjj|  Kjk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.javajo|  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusHttpResponse.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X  @@ -5,19 +5,14 @@
 
 public interface PrometheusHttpResponse {
 
-
     /**
      * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
      */
     void setHeader(String name, String value);
 
     /**
-     * See {@code jakarta.servlet.http.HttpServletResponse.setStatus(int)}
-     */
-    void setStatus(int statusCode);
-
-    /**
-     * See {@code jakarta.servlet.ServletResponse.getOutputStream()}
+     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
+     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
      */
-    OutputStream getOutputStream() throws IOException;
+    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
 }u}(j |  (ff97bfbdbd77acbd34af73ba8ddc687f59722c4fjf|  sprometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandler.javajh|  modifiedj`|  Kja|  Kjj|  K-jk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.javajo|  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fcommon%2FPrometheusScrapeHandler.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X  @@ -12,9 +12,9 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Predicate;
 import java.util.zip.GZIPOutputStream;
 
@@ -60,20 +60,23 @@ public void handleRequest(PrometheusHttpExchange exchange) throws IOException {
             writer.write(responseBuffer, snapshots);
             lastResponseSize.set(responseBuffer.size());
             response.setHeader("Content-Type", writer.getContentType());
-            response.setStatus(200);
 
             if (shouldUseCompression(request)) {
                 response.setHeader("Content-Encoding", "gzip");
-                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.getOutputStream())) {
+                try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(response.sendHeadersAndGetBody(200, 0))) {
                     responseBuffer.writeTo(gzipOutputStream);
                 }
             } else {
-                long contentLength = responseBuffer.size();
-                if (contentLength > 0 && !request.getMethod().equals("HEAD")) {
+                int contentLength = responseBuffer.size();
+                if (contentLength > 0) {
                     response.setHeader("Content-Length", String.valueOf(contentLength));
                 }
-                try (OutputStream outputStream = response.getOutputStream()) {
-                    if (!request.getMethod().equals("HEAD")) {
+                if (request.getMethod().equals("HEAD")) {
+                    // The HTTPServer implementation will throw an Exception if we close the output stream
+                    // without sending a response body, so let's not close the output stream in case of a HEAD response.
+                    response.sendHeadersAndGetBody(200, -1);
+                } else {
+                    try (OutputStream outputStream = response.sendHeadersAndGetBody(200, contentLength)) {
                         responseBuffer.writeTo(outputStream);
                     }
                 }
@@ -125,24 +128,30 @@ private Predicate<String> makeNameFilter(String[] includedNames) {
     private boolean writeDebugResponse(MetricSnapshots snapshots, PrometheusHttpExchange exchange) throws IOException {
         String debugParam = exchange.getRequest().getParameter("debug");
         PrometheusHttpResponse response = exchange.getResponse();
-        if (debugParam != null) {
+        if (debugParam == null) {
+            return false;
+        } else {
+            response.setHeader("Content-Type", "text/plain; charset=utf-8");
+            boolean supportedFormat = Arrays.asList("openmetrics", "text", "prometheus-protobuf").contains(debugParam);
+            int responseStatus = supportedFormat ? 200 : 500;
+            OutputStream body = response.sendHeadersAndGetBody(responseStatus, 0);
             switch (debugParam) {
                 case "openmetrics":
-                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
-                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), snapshots);
-                    return true;
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(body, snapshots);
+                    break;
                 case "text":
-                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
-                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), snapshots);
-                    return true;
+                    expositionFormats.getPrometheusTextFormatWriter().write(body, snapshots);
+                    break;
                 case "prometheus-protobuf":
-                    response.setHeader("Content-Type", "text/plain; charset=UTF-8");
                     String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(snapshots);
-                    response.getOutputStream().write(debugString.getBytes(StandardCharsets.UTF_8));
-                    return true;
+                    body.write(debugString.getBytes(StandardCharsets.UTF_8));
+                    break;
+                default:
+                    body.write(("debug=" + debugParam + ": Unsupported query parameter. Valid values are 'openmetrics', 'text', and 'prometheus-protobuf'.").getBytes(StandardCharsets.UTF_8));
+                    break;
             }
+            return true;
         }
-        return false;
     }
 
     private boolean shouldUseCompression(PrometheusHttpRequest request) {u}(j |  (e8a54e0cf687d16358a139f83d42f5960106395ajf|  rprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.java     jh|  modifiedj`|  Kja|  Kjj|  Kjk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.javajo|  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FDefaultHandler.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  X  @@ -20,7 +20,36 @@ public DefaultHandler() {
                 "<head><title>Prometheus Java Client</title></head>\n" +
                 "<body>\n" +
                 "<h1>Prometheus Java Client</h1>\n" +
-                "<p><a href=\"/metrics\">Metrics</a></p>\n" +
+                "<h2>Metrics Path</h2>\n" +
+                "The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
+                "<h2>Name Filter</h2>\n" +
+                "If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
+                "</ul>\n" +
+                "You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
+                "</ul>\n" +
+                "The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
+                "<pre>\n" +
+                "params:\n" +
+                "    name[]:\n" +
+                "        - my_metric_a\n" +
+                "        - my_metric_b\n" +
+                "</pre>\n" +
+                "<h2>Debug Parameter</h2>\n" +
+                "The Prometheus Java metrics library supports multiple exposition formats.\n" +
+                "The Prometheus server sends the <tt>Accept</tt> header to indicate which format it accepts.\n" +
+                "By default, the Prometheus server accepts OpenMetrics text format, unless the Prometheus server is started with feature flag <tt>--enable-feature=native-histograms</tt>,\n" +
+                "in which case the default is Prometheus protobuf.\n" +
+                "The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
+                "<ul>\n" +
+                "<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
+                "<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
+                "<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
+                "</ul>\n" +
+                "Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
                 "</body>\n" +
                 "</html>\n";
         this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8);u}(j |  (4f1b4f63a7e59feb619963afc5d901560bc83e08jf|  wprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HttpExchangeAdapter.javajh|  modifiedj`|  Kja|  Kjj|  K7jk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.javajo|  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHttpExchangeAdapter.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  XT  @@ -21,6 +21,7 @@ public class HttpExchangeAdapter implements PrometheusHttpExchange {
     private final HttpExchange httpExchange;
     private final HttpRequest request = new HttpRequest();
     private final HttpResponse response = new HttpResponse();
+    private volatile boolean responseSent = false;
 
     public HttpExchangeAdapter(HttpExchange httpExchange) {
         this.httpExchange = httpExchange;
@@ -51,28 +52,18 @@ public String getMethod() {
 
     public class HttpResponse implements PrometheusHttpResponse {
 
-        private int status = 0;
-
         @Override
         public void setHeader(String name, String value) {
             httpExchange.getResponseHeaders().set(name, value);
         }
 
         @Override
-        public void setStatus(int statusCode) {
-            this.status = statusCode;
-        }
-
-        @Override
-        public OutputStream getOutputStream() throws IOException {
-            // This implementation assumes that getOutputStream() is called exactly once,
-            // and setStatus() is called prior to that.
-            List<String> contentLengthHeaders = httpExchange.getResponseHeaders().get("Content-Length");
-            if (contentLengthHeaders == null || contentLengthHeaders.size() == 0) {
-                httpExchange.sendResponseHeaders(status, 0);
-            } else {
-                httpExchange.sendResponseHeaders(status, Long.parseLong(contentLengthHeaders.get(0)));
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (responseSent) {
+                throw new IOException("Cannot send multiple HTTP responses for a single HTTP exchange.");
             }
+            responseSent = true;
+            httpExchange.sendResponseHeaders(statusCode, contentLength);
             return httpExchange.getResponseBody();
         }
     }
@@ -98,20 +89,26 @@ public void handleException(RuntimeException e) {
     }
 
     private void sendErrorResponseWithStackTrace(Exception requestHandlerException) {
-        try {
-            StringWriter stringWriter = new StringWriter();
-            PrintWriter printWriter = new PrintWriter(stringWriter);
-            printWriter.write("An Exception occurred while scraping metrics: ");
-            requestHandlerException.printStackTrace(new PrintWriter(printWriter));
-            byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
-            httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
-            httpExchange.sendResponseHeaders(500, stackTrace.length);
-            httpExchange.getResponseBody().write(stackTrace);
-        } catch (Exception errorWriterException) {
-            // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
-            // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
-            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
-            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the scrape error:", requestHandlerException);
+        if (!responseSent) {
+            responseSent = true;
+            try {
+                StringWriter stringWriter = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(stringWriter);
+                printWriter.write("An Exception occurred while scraping metrics: ");
+                requestHandlerException.printStackTrace(new PrintWriter(printWriter));
+                byte[] stackTrace = stringWriter.toString().getBytes(StandardCharsets.UTF_8);
+                httpExchange.getResponseHeaders().set("Content-Type", "text/plain; charset=utf-8");
+                httpExchange.sendResponseHeaders(500, stackTrace.length);
+                httpExchange.getResponseBody().write(stackTrace);
+            } catch (Exception errorWriterException) {
+                // We want to avoid logging so that we don't mess with application logs when the HTTPServer is used in a Java agent.
+                // However, if we can't even send an error response to the client there's nothing we can do but logging a message.
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception during scrape and failed to send an error response to the client.", errorWriterException);
+                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Original Exception that caused the Prometheus scrape error:", requestHandlerException);
+            }
+        } else {
+            // If the exception occurs after response headers have been sent, it's too late to respond with HTTP 500.
+            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "The Prometheus metrics HTTPServer caught an Exception while trying to send the metrics response.", requestHandlerException);
         }
     }
 u}(j |  (656d661ebddd423ba12fc58b1dbd136062e5a282jf|  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/HttpExchangeAdapter.javajh|  modifiedj`|  Kja|  Kjj|  K	jk|  https://github.com/prometheus/client_java/blob/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajm|  https://github.com/prometheus/client_java/raw/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.javajo|  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FHttpExchangeAdapter.java?ref=0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jq|  Xu  @@ -83,12 +83,11 @@ public void setHeader(String name, String value) {
         }
 
         @Override
-        public void setStatus(int statusCode) {
+        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {
+            if (response.getHeader("Content-Length") == null && contentLength > 0) {
+                response.setContentLength(contentLength);
+            }
             response.setStatus(statusCode);
-        }
-
-        @Override
-        public OutputStream getOutputStream() throws IOException {
             return response.getOutputStream();
         }
     }ueu(f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56}(sha(f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56node_idEC_kwDOAHoJt9oAKGY0ZjJmYTQ3NjljODc2YmFiMTg5M2JiZjNmZGY5ZTNjNGU2MmVlNTYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-10T21:58:00Zu	committer}(j|  Fabian Stäberj|  fabian@fstab.dej|  2023-07-10T21:58:00Zumessagejavax -> jakartatree}(j|  (b15fb386588ff148434217ba6e9ade716b178d31urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/b15fb386588ff148434217ba6e9ade716b178d31uj|  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj|  dhttps://api.github.com/repos/prometheus/client_java/commits/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56html_urlYhttps://github.com/prometheus/client_java/commit/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/commentsj|  }(loginfstabidJ' j|  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j|  "https://api.github.com/users/fstabj|  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj|  }(j|  fstabj|  J' j|  MDQ6VXNlcjMzMDUzNQ==j|  2https://avatars.githubusercontent.com/u/330535?v=4j|  h3j|  "https://api.github.com/users/fstabj|  https://github.com/fstabj|  ,https://api.github.com/users/fstab/followersj|  9https://api.github.com/users/fstab/following{/other_user}j|  2https://api.github.com/users/fstab/gists{/gist_id}j|  9https://api.github.com/users/fstab/starred{/owner}{/repo}j|  0https://api.github.com/users/fstab/subscriptionsj|  'https://api.github.com/users/fstab/orgsj|  (https://api.github.com/users/fstab/reposj|  3https://api.github.com/users/fstab/events{/privacy}j|  2https://api.github.com/users/fstab/received_eventsj|  Userj|  uparents]}(j|  (1f26a70f85273fda368514fac5e96be9f1c17859j|  dhttps://api.github.com/repos/prometheus/client_java/commits/1f26a70f85273fda368514fac5e96be9f1c17859j|  Yhttps://github.com/prometheus/client_java/commit/1f26a70f85273fda368514fac5e96be9f1c17859uastats}(totalK	additionsK		deletionsK	ufiles](}(j|  (6f4407b5b29ec6875fc7222cb9e7962b327618c7filenamepom.xmlstatusmodifiedj}  Kj}  KchangesKblob_url_https://github.com/prometheus/client_java/blob/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56patchX  @@ -45,7 +45,7 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
-        <module>prometheus-metrics-exporter-servlet-javax</module>
+        <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>tmp_example</module>
 
         <module>simpleclient</module>u}(j|  (6613fccc1dfba570a02f34d93dead26f3358cf0cj}  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj}  renamedj}  Kj}  Kj}  K
j }  https://github.com/prometheus/client_java/blob/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj"}  https://github.com/prometheus/client_java/raw/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj$}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56j&}  X  @@ -8,10 +8,10 @@
         <version>0.16.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>prometheus-metrics-exporter-servlet-javax</artifactId>
+    <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
     <packaging>bundle</packaging>
 
-    <name>Prometheus Java Simpleclient Servlet - Javax</name>
+    <name>Prometheus Java Simpleclient Servlet - Jakarta</name>
     <description>
         HTTP servlet exporter for the simpleclient.
     </description>
@@ -40,9 +40,9 @@
             <version>0.16.1-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <version>4.0.1</version>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
+            <version>6.0.0</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>previous_filename1prometheus-metrics-exporter-servlet-javax/pom.xmlu}(j|  (4f163000ee3d5467a59da1f08415d1463cc21285j}  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/javax/PrometheusMetricsServlet.javaj}  renamedj}  Kj}  Kj}  Kj }  https://github.com/prometheus/client_java/blob/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.javaj"}  https://github.com/prometheus/client_java/raw/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.javaj$}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.java?ref=f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56j&}  X/  @@ -6,10 +6,10 @@
 import io.prometheus.metrics.expositionformats.ExpositionFormats;
 import io.prometheus.metrics.model.registry.MetricNameFilter;
 import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
 
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.function.Predicate;
 j0}  prometheus-metrics-exporter-servlet-javax/src/main/java/io/prometheus/metrics/exporter/servlet/javax/PrometheusMetricsServlet.javau}(j|  (318e865f55bdd893d762a5f4e759a502e8bbc983j}  =prometheus-metrics-exporter-servlet-jakarta/version-rules.xmlj}  renamedj}  K j}  K j}  K j }  https://github.com/prometheus/client_java/blob/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmlj"}  https://github.com/prometheus/client_java/raw/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmlj$}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xml?ref=f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56j0}  ;prometheus-metrics-exporter-servlet-javax/version-rules.xmlueu(b323d620ce6455eaefa949b81317f6e1715b5e2f}(sha(b323d620ce6455eaefa949b81317f6e1715b5e2fnode_idEC_kwDOAHoJt9oAKGIzMjNkNjIwY2U2NDU1ZWFlZmE5NDliODEzMTdmNmUxNzE1YjVlMmYcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:14:25Zu	committer}(jM}  Fabian StäberjO}  fabian@fstab.dejQ}  2023-07-16T21:43:22ZumessagePrepare 1.0.0-alpha-1 versiontree}(jE}  (8a40a6bedf64525a4a8320078dc689c0620e30eburlfhttps://api.github.com/repos/prometheus/client_java/git/trees/8a40a6bedf64525a4a8320078dc689c0620e30ebuj]}  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b323d620ce6455eaefa949b81317f6e1715b5e2f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj]}  dhttps://api.github.com/repos/prometheus/client_java/commits/b323d620ce6455eaefa949b81317f6e1715b5e2fhtml_urlYhttps://github.com/prometheus/client_java/commit/b323d620ce6455eaefa949b81317f6e1715b5e2fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b323d620ce6455eaefa949b81317f6e1715b5e2f/commentsjK}  }(loginfstabidJ' jG}  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j]}  "https://api.github.com/users/fstabji}  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujS}  }(jn}  fstabjp}  J' jG}  MDQ6VXNlcjMzMDUzNQ==jr}  2https://avatars.githubusercontent.com/u/330535?v=4jt}  h3j]}  "https://api.github.com/users/fstabji}  https://github.com/fstabjw}  ,https://api.github.com/users/fstab/followersjy}  9https://api.github.com/users/fstab/following{/other_user}j{}  2https://api.github.com/users/fstab/gists{/gist_id}j}}  9https://api.github.com/users/fstab/starred{/owner}{/repo}j}  0https://api.github.com/users/fstab/subscriptionsj}  'https://api.github.com/users/fstab/orgsj}  (https://api.github.com/users/fstab/reposj}  3https://api.github.com/users/fstab/events{/privacy}j}  2https://api.github.com/users/fstab/received_eventsj}  Userj}  uparents]}(jE}  (b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54j]}  dhttps://api.github.com/repos/prometheus/client_java/commits/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54ji}  Yhttps://github.com/prometheus/client_java/commit/b23d428bbb52146bd27f3e5b5b5bdf8f04d1fe54uastats}(totalK	additionsK[	deletionsKSufiles](}(jE}  (db455570b12cd7b9ff47bbf1afeb9e0cdd38584ffilenamebenchmarks/pom.xmlstatusmodifiedj}  Kj}  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jE}  (a4f33846cfe05d4dff030425d26bfe2c34f2e2f6j}  examples/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  jhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/examples%2Fpom.xmlj}  ihttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/examples%2Fpom.xmlj}  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jE}  (778d917a8fd4c95360b5f5d8f3d5a7a8d9a90387j}  examples/tomcat-servlet/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  {https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/examples%2Ftomcat-servlet%2Fpom.xmlj}  zhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/examples%2Ftomcat-servlet%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>tomcat-servlet</artifactId>u}(jE}  (44758744c4f0ad45f6722d4d54792c1ddad04f5fj}  #integration_tests/it_common/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_common%2Fpom.xmlj}  ~https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_common%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jE}  (80a97e549f0ce7481a2d485584c655245de3358dj}  1integration_tests/it_exemplars_otel_agent/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jE}  (90c99c15596b192de324a53de84b880afe94dec7j}  /integration_tests/it_exemplars_otel_sdk/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jE}  (64441aee0be4d8e126583ea74ca23cb67dddfeefj}  *integration_tests/it_java_versions/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_java_versions%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_java_versions%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jE}  (3090704cdb55be24a678bc5725c15ba5fbff8fbej}  #integration_tests/it_log4j2/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_log4j2%2Fpom.xmlj}  ~https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_log4j2%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jE}  (aa17740a1a38769a29bdff94c1e4a80af68f5053j}  (integration_tests/it_pushgateway/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_pushgateway%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_pushgateway%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jE}  (487dba31d5597ce66a658992b8b9977871160b73j}  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jE}  (05a56956fc66fe059485a69aef350171c78564c1j}  integration_tests/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  shttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fpom.xmlj}  rhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/integration_tests%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jE}  (49a6cc19b6905ac7e4858c5f5ecd3122fa177380j}  pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  _https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/pom.xmlj}  ^https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/pom.xmlj}  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
 
     <name>Prometheus Java Suite</name>
     <url>http://github.com/prometheus/client_java</url>u}(jE}  (38701ed2329f5405a4165671ac01e0d6a1b22951j}  !prometheus-metrics-config/pom.xmlj}  modifiedj}  K	j}  Kj}  K
j}  {https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-config%2Fpom.xmlj}  zhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-config%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xo  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>
@@ -25,6 +25,14 @@
         </license>
     </licenses>
 
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@prometheus.io</email>
+        </developer>
+    </developers>
+
     <dependencies>
         <dependency>
             <groupId>junit</groupId>u}(jE}  (392db3ef2308ebcbe6fa164451c119a650aa5fe4j}  prometheus-metrics-core/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  yhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-core%2Fpom.xmlj}  xhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-core%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jE}  (a17ac2192b78213d59a250b8359b9e0d83abbd1ej}  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
@@ -32,12 +32,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-model</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-exposition-formats</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u}(jE}  (3762989e68974aaff111f401d0f6259365363915j}  -prometheus-metrics-exposition-formats/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-exposition-formats%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-exposition-formats%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X)  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jE}  (5e703261bf3ae8eb6084ee454c33eb0d69c469f5j}   prometheus-metrics-model/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  zhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-model%2Fpom.xmlj}  yhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-model%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jE}  (6efc105585b8fdd5c9188d7a8363e15d0628a397j}  !prometheus-metrics-tracer/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  {https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fpom.xmlj}  zhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jE}  (f76eb2158c7ea7afcdd69c53e62a79b13814462ej}  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jE}  (41121915b041b7a234634d1146e4f3d70027bc9bj}  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X!  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jE}  (e628e1310a495bbe5bafbd26ed38aa692d3932c6j}  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jE}  (a96adc6e44206185c0d4f877543caee19e8e21c6j}  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jE}  (42cb34138a9bcae4a594f094ca5b771b62de4105j}  protobuf-shaded/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  qhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/protobuf-shaded%2Fpom.xmlj}  phttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/protobuf-shaded%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(jE}  (16dd46d4f12193c14bd4e485174a5f901371da77j}  simpleclient/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  nhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient%2Fpom.xmlj}  mhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jE}  (e54830a6d8004739ebd6991e57fd90a5beed57a7j}  simpleclient_bom/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  rhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_bom%2Fpom.xmlj}  qhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_bom%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jE}  (d6a195f49944134cbdc277d3620eb507f86d084aj}  simpleclient_caffeine/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  whttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_caffeine%2Fpom.xmlj}  vhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_caffeine%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xp  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.github.ben-manes.caffeine</groupId>u}(jE}  (67c05bbcdb4cfcc4484d06f4cc7f16a8cc72f879j}  simpleclient_common/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  uhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_common%2Fpom.xmlj}  thttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_common%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X[  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(jE}  (f6aeabbe558cdbbad5a448317ae3b5624730c48fj}  simpleclient_dropwizard/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  yhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_dropwizard%2Fpom.xmlj}  xhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_dropwizard%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xj  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.dropwizard.metrics</groupId>u}(jE}  (862ebd4c8c54a97ac08b108cdb0673034b871b5fj}  $simpleclient_graphite_bridge/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  ~https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_graphite_bridge%2Fpom.xmlj}  }https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_graphite_bridge%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xd  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(jE}  (9ddb2f231b13ab06a81fee63bf3ce105540776a6j}  simpleclient_guava/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  thttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_guava%2Fpom.xmlj}  shttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_guava%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X`  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>u}(jE}  (58695646606877516cc68a13832e3830a3dc0431j}  simpleclient_hibernate/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  xhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_hibernate%2Fpom.xmlj}  whttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_hibernate%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  XV  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- We support Hibernate versions >= 4.2 -->u}(jE}  (30c3f5ed79f448501246b4ccf971599110d3f4ddj}  simpleclient_hotspot/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  vhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_hotspot%2Fpom.xmlj}  uhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_hotspot%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>
@@ -36,14 +36,14 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         
         <!-- Test Dependencies Follow -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>u}(jE}  (693bc9dccf3d1a2ba3122faac0d34adedd68abf7j}  simpleclient_httpserver/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  yhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_httpserver%2Fpom.xmlj}  xhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_httpserver%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  XY  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>
@@ -36,12 +36,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(jE}  (44a8dd332c8e21c85465dfbad45772b717946825j}  simpleclient_jetty/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  thttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_jetty%2Fpom.xmlj}  shttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_jetty%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xa  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>
@@ -38,7 +38,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(jE}  (5ed130a89db28eacdf2731f36bddf89ce170575dj}  simpleclient_jetty_jdk8/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  yhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_jetty_jdk8%2Fpom.xmlj}  xhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_jetty_jdk8%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xf  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(jE}  (67d294ff7eb58eac134c447445ed586e96f3187aj}  simpleclient_log4j/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  thttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_log4j%2Fpom.xmlj}  shttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_log4j%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xh  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(jE}  (13af55105af26d0bd311e939da3b9ea151802d1ej}  simpleclient_log4j2/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  uhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_log4j2%2Fpom.xmlj}  thttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_log4j2%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xi  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(jE}  (51aaa5cdef9bfb4fb37bbab8474740d88337bd64j}  simpleclient_logback/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  vhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_logback%2Fpom.xmlj}  uhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_logback%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X`  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>u}(jE}  (6197919d58ef87fd8f6f05fbb6c108d4f764cc01j}   simpleclient_pushgateway/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  zhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_pushgateway%2Fpom.xmlj}  yhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_pushgateway%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X^  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>
@@ -37,12 +37,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>u}(jE}  (2e2033e41547903e43a9998f0332fd406ba3c524j}  simpleclient_servlet/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  vhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet%2Fpom.xmlj}  uhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  XY  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>u}(jE}  (df5068323a33744892e30f236a3492dead6de827j}  #simpleclient_servlet_common/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  }https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet_common%2Fpom.xmlj}  |https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet_common%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X]  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>
@@ -40,12 +40,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(jE}  (ede162091d55ab298c96343edf8eb8fce6d0cfc2j}  $simpleclient_servlet_jakarta/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  ~https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet_jakarta%2Fpom.xmlj}  }https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_servlet_jakarta%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xc  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u_     }(jE}  (0f8e40208fbe5c3b4c6d8bedf8cdf56412086909j}   simpleclient_spring_boot/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  zhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_spring_boot%2Fpom.xmlj}  yhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_spring_boot%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_boot%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X\  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_boot</artifactId>
@@ -51,17 +51,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
           <groupId>io.prometheus</groupId>
           <artifactId>simpleclient_spring_web</artifactId>
-          <version>0.16.1-SNAPSHOT</version>
+          <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>u}(jE}  (982d8f2274b88bde88935de1130cf2809a51bcd0j}  simpleclient_spring_web/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  yhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_spring_web%2Fpom.xmlj}  xhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_spring_web%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  Xb  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>
@@ -51,12 +51,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>u}(jE}  (92f806f61fb61bf54e492975125275928f19b4d3j}  simpleclient_tracer/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  uhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fpom.xmlj}  thttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jE}  (5536dfe89887ce6789f09401e63da87ae32151f2j}  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jE}  (dedf920421314c40bb06d69a6bc12f41bd3b466aj}  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jE}  (488b3db0a344f652b735f1e9be805287ba74f1d5j}  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  https://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj}  https://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jE}  (dd3fba81c862be1074d9a8a3e31c8203eb4be9f7j}  simpleclient_vertx/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  thttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_vertx%2Fpom.xmlj}  shttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_vertx%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jE}  (5ddc9f56747dfeb609a44f7e93908da7549d775fj}  simpleclient_vertx4/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  uhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_vertx4%2Fpom.xmlj}  thttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/simpleclient_vertx4%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>u}(jE}  (59dda206f3b26c5025ba10b482f2e25e3f5561ffj}  tmp_example/pom.xmlj}  modifiedj}  Kj}  Kj}  Kj}  mhttps://github.com/prometheus/client_java/blob/b323d620ce6455eaefa949b81317f6e1715b5e2f/tmp_example%2Fpom.xmlj}  lhttps://github.com/prometheus/client_java/raw/b323d620ce6455eaefa949b81317f6e1715b5e2f/tmp_example%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=b323d620ce6455eaefa949b81317f6e1715b5e2fj}  X  @@ -6,7 +6,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>tmp_example</artifactId>ueu(61d3f495b47818f91e51ac6fd82b517ceff43ec9}(sha(61d3f495b47818f91e51ac6fd82b517ceff43ec9node_idEC_kwDOAHoJt9oAKDYxZDNmNDk1YjQ3ODE4ZjkxZTUxYWM2ZmQ4MmI1MTdjZWZmNDNlYzkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-07T12:35:42Zu	committer}(jR  Fabian StäberjT  fabian@fstab.dejV  2023-06-07T12:35:42Zumessage Refactoring the exemplar samplertree}(jJ  (8bddbf3fa11c12f255488fb1eeb3434ee9801db2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/8bddbf3fa11c12f255488fb1eeb3434ee9801db2ujb  hhttps://api.github.com/repos/prometheus/client_java/git/commits/61d3f495b47818f91e51ac6fd82b517ceff43ec9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujb  dhttps://api.github.com/repos/prometheus/client_java/commits/61d3f495b47818f91e51ac6fd82b517ceff43ec9html_urlYhttps://github.com/prometheus/client_java/commit/61d3f495b47818f91e51ac6fd82b517ceff43ec9comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/61d3f495b47818f91e51ac6fd82b517ceff43ec9/commentsjP  }(loginfstabidJ' jL  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jb  "https://api.github.com/users/fstabjn  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujX  }(js  fstabju  J' jL  MDQ6VXNlcjMzMDUzNQ==jw  2https://avatars.githubusercontent.com/u/330535?v=4jy  h3jb  "https://api.github.com/users/fstabjn  https://github.com/fstabj|  ,https://api.github.com/users/fstab/followersj~  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jJ  (d2d3cf48a5c04bad61d793c469cd37d483d12618jb  dhttps://api.github.com/repos/prometheus/client_java/commits/d2d3cf48a5c04bad61d793c469cd37d483d12618jn  Yhttps://github.com/prometheus/client_java/commit/d2d3cf48a5c04bad61d793c469cd37d483d12618uastats}(totalM		additionsMV	deletionsMyufiles](}(jJ  (497cf77d8212b1aa048bcba105a25c30a044abc1filenamepom.xmlstatusmodifiedj  Kj  KchangesKblob_url_https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9patchX  @@ -43,7 +43,8 @@
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
-        <module>prometheus-exposition-formats</module>
+        <module>prometheus-metrics-tracer</module>
+        <module>prometheus-metrics-exposition-formats</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>u}(jJ  (325e41319d1b2fc56aa9e32506724af1a1f56b72j  \prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarProperties.javaj  modifiedj  Kj  K
j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarProperties.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -10,22 +10,18 @@ public class ExemplarProperties {
     private static final String MIN_RETENTION_PERIOD_SECONDS = "minRetentionPeriodSeconds";
     private static final String MAX_RETENTION_PERIOD_SECONDS = "maxRetentionPeriodSeconds";
     private static final String SAMPLE_INTERVAL_MILLISECONDS = "sampleIntervalMilliseconds";
-    private static final String NUMBER_OF_EXEMPLARS = "numberOfExemplars";
 
     private final Integer minRetentionPeriodSeconds;
     private final Integer maxRetentionPeriodSeconds;
     private final Integer sampleIntervalMilliseconds;
-    private final Integer numberOfExemplars;
 
     public ExemplarProperties(
             Integer minRetentionPeriodSeconds,
             Integer maxRetentionPeriodSeconds,
-            Integer sampleIntervalMilliseconds,
-            Integer numberOfExemplars) {
+            Integer sampleIntervalMilliseconds) {
         this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
         this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
         this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
-        this.numberOfExemplars = numberOfExemplars;
     }
 
     public Integer getMinRetentionPeriodSeconds() {
@@ -40,20 +36,14 @@ public Integer getSampleIntervalMilliseconds() {
         return sampleIntervalMilliseconds;
     }
 
-    public Integer getNumberOfExemplars() {
-        return numberOfExemplars;
-    }
-
     static ExemplarProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
         Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
         Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
         Integer sampleIntervalMilliseconds = Util.loadInteger(prefix + "." + SAMPLE_INTERVAL_MILLISECONDS, properties);
-        Integer numberOfExemplars = Util.loadInteger(prefix + "." + NUMBER_OF_EXEMPLARS, properties);
 
         Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MIN_RETENTION_PERIOD_SECONDS);
         Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MAX_RETENTION_PERIOD_SECONDS);
         Util.assertValue(sampleIntervalMilliseconds, t -> t > 0, "Expecting value > 0.", prefix, SAMPLE_INTERVAL_MILLISECONDS);
-        Util.assertValue(numberOfExemplars, n -> n > 0, "Expecting value > 0.", prefix, NUMBER_OF_EXEMPLARS);
 
         if (minRetentionPeriodSeconds != null && maxRetentionPeriodSeconds != null) {
             if (minRetentionPeriodSeconds > maxRetentionPeriodSeconds) {
@@ -64,8 +54,7 @@ static ExemplarProperties load(String prefix, Map<Object, Object> properties) th
         return new ExemplarProperties(
                 minRetentionPeriodSeconds,
                 maxRetentionPeriodSeconds,
-                sampleIntervalMilliseconds,
-                numberOfExemplars
+                sampleIntervalMilliseconds
         );
     }
 }u}(jJ  (bd7bc7e7d5daca371076ebbf30b6b18be0386d2cj  prometheus-metrics-core/pom.xmlj  modifiedj  Kj  Kj  K	j  yhttps://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  XU  @@ -50,17 +50,12 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>simpleclient_tracer_otel</artifactId>
+            <artifactId>prometheus-metrics-tracer-initializer</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>simpleclient_tracer_otel_agent</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.prometheus</groupId>
-            <artifactId>prometheus-exposition-formats</artifactId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>u}(jJ  (3da2e1a5810dc823383aeb2a0436abd139281522j  Mprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Counter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounter.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X8  @@ -2,6 +2,8 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exemplars.ExemplarSampler;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Labels;
@@ -16,11 +18,17 @@
 public class Counter extends ObservingMetric<DiscreteEventObserver, Counter.CounterData> implements DiscreteEventObserver {
 
     private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
 
     private Counter(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
         MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
         exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
     }
 
     @Override
@@ -41,13 +49,17 @@ public void incWithExemplar(double amount, Labels labels) {
 
     @Override
     protected CounterData newMetricData() {
-        return new CounterData();
+        if (isExemplarsEnabled()) {
+            return new CounterData(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new CounterData(null);
+        }
     }
 
     @Override
     protected CounterSnapshot collect(List<Labels> labels, List<CounterData> metricData) {
         List<CounterSnapshot.CounterData> data = new ArrayList<>(labels.size());
-        for (int i=0; i<labels.size(); i++) {
+        for (int i = 0; i < labels.size(); i++) {
             data.add(metricData.get(i).collect(labels.get(i)));
         }
         return new CounterSnapshot(getMetadata(), data);
@@ -77,12 +89,16 @@ class CounterData extends MetricData<DiscreteEventObserver> implements DiscreteE
 
         private final DoubleAdder value = new DoubleAdder();
         private final long createdTimeMillis = System.currentTimeMillis();
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private CounterData(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
 
         @Override
         public void inc(double amount) {
             validateAndAdd(amount);
-            if (isExemplarsEnabled() && hasSpanContextSupplier()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
+            if (isExemplarsEnabled()) {
                 exemplarSampler.observe(amount);
             }
         }
@@ -91,7 +107,6 @@ public void inc(double amount) {
         public void incWithExemplar(double amount, Labels labels) {
             validateAndAdd(amount);
             if (isExemplarsEnabled()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
                 exemplarSampler.observeWithExemplar(amount, labels);
             }
         }
@@ -167,7 +182,7 @@ public CounterSnapshot collect() {
             )));
         }
 
-       public static class Builder extends Metric.Builder<io.prometheus.metrics.core.Counter.FromCallback.Builder, io.prometheus.metrics.core.Counter.FromCallback> {
+        public static class Builder extends Metric.Builder<io.prometheus.metrics.core.Counter.FromCallback.Builder, io.prometheus.metrics.core.Counter.FromCallback> {
 
             private DoubleSupplier callback;
 u}(jJ  (47a13ac03e1b27e2c73ef917805c5607dbf7ee47j  Kprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Gauge.javaj  modifiedj  Kj  K
j  K(j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGauge.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -2,6 +2,8 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exemplars.ExemplarSampler;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;
@@ -16,11 +18,17 @@
 public class Gauge extends ObservingMetric<GaugingObserver, Gauge.GaugeData> implements GaugingObserver {
 
     private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
 
     private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
         super(builder);
         MetricProperties[] properties = getMetricProperties(builder, prometheusProperties);
         exemplarsEnabled = getConfigProperty(properties, MetricProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarConfig(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
     }
 
     @Override
@@ -50,16 +58,20 @@ public GaugeSnapshot collect() {
 
     @Override
     protected GaugeSnapshot collect(List<Labels> labels, List<GaugeData> metricData) {
-            List<GaugeSnapshot.GaugeData> data = new ArrayList<>(labels.size());
-            for (int i=0; i<labels.size(); i++) {
-                data.add(metricData.get(i).collect(labels.get(i)));
-            }
-            return new GaugeSnapshot(getMetadata(), data);
+        List<GaugeSnapshot.GaugeData> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
         }
+        return new GaugeSnapshot(getMetadata(), data);
+    }
 
     @Override
     protected GaugeData newMetricData() {
-        return new GaugeData();
+        if (isExemplarsEnabled()) {
+            return new GaugeData(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new GaugeData(null);
+        }
     }
 
     @Override
@@ -69,13 +81,18 @@ protected boolean isExemplarsEnabled() {
 
     class GaugeData extends MetricData<GaugingObserver> implements GaugingObserver {
 
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private GaugeData(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
+
         private final AtomicLong value = new AtomicLong(Double.doubleToRawLongBits(0));
 
         @Override
         public void inc(double amount) {
             long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
-            if (isExemplarsEnabled() && hasSpanContextSupplier()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
+            if (isExemplarsEnabled()) {
                 exemplarSampler.observe(Double.longBitsToDouble(next));
             }
         }
@@ -84,16 +101,14 @@ public void inc(double amount) {
         public void incWithExemplar(double amount, Labels labels) {
             long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
             if (isExemplarsEnabled()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
                 exemplarSampler.observeWithExemplar(Double.longBitsToDouble(next), labels);
             }
         }
 
         @Override
         public void set(double value) {
             this.value.set(Double.doubleToRawLongBits(value));
-            if (isExemplarsEnabled() && hasSpanContextSupplier()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
+            if (isExemplarsEnabled()) {
                 exemplarSampler.observe(value);
             }
         }
@@ -102,7 +117,6 @@ public void set(double value) {
         public void setWithExemplar(double value, Labels labels) {
             this.value.set(Double.doubleToRawLongBits(value));
             if (isExemplarsEnabled()) {
-                lazyInitExemplarSampler(exemplarConfig, 1, null);
                 exemplarSampler.observeWithExemplar(value, labels);
             }
         }
@@ -113,7 +127,7 @@ private GaugeSnapshot.GaugeData collect(Labels labels) {
             // If there are multiple Exemplars (by default it's just one), use the oldest
             // so that we don't violate min age.
             Exemplar oldest = null;
-            if (exemplarSampler != null) {
+            if (isExemplarsEnabled()) {
                 for (Exemplar exemplar : exemplarSampler.collect()) {
                     if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
                         oldest = exemplar;u}(jJ  (ed1c66efd17278ffb7fc8910b796fb829dd3129ej  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/Histogram.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogram.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -1,7 +1,10 @@
 package io.prometheus.metrics.core;
 
+import io.prometheus.metrics.config.ExemplarProperties;
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exemplars.ExemplarSampler;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.HistogramSnapshot;
@@ -47,6 +50,7 @@ public class Histogram extends ObservingMetric<DistributionObserver, Histogram.H
     private static final double[][] NATIVE_BOUNDS;
 
     private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
 
     // Upper bounds for the classic histogram buckets. Contains at least +Inf.
     // An empty array indicates that this is a native histogram only.
@@ -125,6 +129,10 @@ private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProp
         nativeMinZeroThreshold = Math.min(min, nativeMaxZeroThreshold);
         nativeMaxBuckets = getConfigProperty(properties, MetricProperties::getHistogramNativeMaxNumberOfBuckets);
         nativeResetDurationSeconds = getConfigProperty(properties, MetricProperties::getHistogramNativeResetDurationSeconds);
+        ExemplarProperties exemplarProperties = prometheusProperties.getExemplarConfig();
+        exemplarSamplerConfig = classicUpperBounds.length == 0 ?
+                new ExemplarSamplerConfig(exemplarProperties, 4) :
+                new ExemplarSamplerConfig(exemplarProperties, classicUpperBounds);
     }
 
     @Override
@@ -144,8 +152,14 @@ public class HistogramData extends MetricData<DistributionObserver> implements D
         private volatile long createdTimeMillis = System.currentTimeMillis();
         private final Buffer<HistogramSnapshot.HistogramData> buffer = new Buffer<>();
         private volatile boolean resetDurationExpired = false;
+        private final ExemplarSampler exemplarSampler;
 
         private HistogramData() {
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
             classicBuckets = new LongAdder[classicUpperBounds.length];
             for (int i = 0; i < classicUpperBounds.length; i++) {
                 classicBuckets[i] = new LongAdder();
@@ -162,8 +176,7 @@ public void observe(double amount) {
             if (!buffer.append(amount)) {
                 doObserve(amount);
             }
-            if (isExemplarsEnabled() && hasSpanContextSupplier()) {
-                lazyInitExemplarSampler(exemplarConfig, null, classicUpperBounds);
+            if (isExemplarsEnabled()) {
                 exemplarSampler.observe(amount);
             }
         }
@@ -178,7 +191,6 @@ public void observeWithExemplar(double value, Labels labels) {
                 doObserve(value);
             }
             if (isExemplarsEnabled()) {
-                lazyInitExemplarSampler(exemplarConfig, null, classicUpperBounds);
                 exemplarSampler.observeWithExemplar(value, labels);
             }
         }u}(jJ  (ffed293ef08845f8da7785a89352df2eed134701j  Pprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/MetricData.javaj  modifiedj  K j  K"j  K"j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetricData.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetricData.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FMetricData.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -1,43 +1,9 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.metrics.exemplars.DefaultExemplarSampler;
-import io.prometheus.metrics.exemplars.ExemplarConfig;
-import io.prometheus.metrics.exemplars.ExemplarSampler;
 import io.prometheus.metrics.observer.Observer;
 
 // package private
 abstract class MetricData<T extends Observer> {
 
-    protected volatile ExemplarSampler exemplarSampler;
-
     abstract T toObserver();
-
-    // Some metrics might be statically initialized (static final Counter myCounter = ...).
-    // However, some tracers (like Micrometer) may not be available at static initialization time.
-    // Therefore, exemplarSampler must be lazily configured so that it will still be initialized if
-    // a tracer is added later at runtime.
-    // However, if no tracing is used or exemplars are disabled, this code should have almost zero overhead.
-    // TODO: This is partly copy-and-paste
-    protected void lazyInitExemplarSampler(ExemplarConfig config, Integer defaultNumberOfExemplars, double[] defaultBuckets) {
-        if (exemplarSampler == null) {
-            synchronized (this) {
-                if (exemplarSampler == null) {
-                    ExemplarConfig.Builder configBuilder;
-                    if (config == null) {
-                        configBuilder = ExemplarConfig.newBuilder();
-                    } else {
-                        configBuilder = config.toBuilder();
-                    }
-                    if (!configBuilder.hasBuckets() && !configBuilder.hasNumberOfExemplars()) {
-                        if (defaultNumberOfExemplars != null) {
-                            configBuilder.withNumberOfExemplars(defaultNumberOfExemplars);
-                        } else if (defaultBuckets != null) {
-                            configBuilder.withBuckets(defaultBuckets);
-                        }
-                        exemplarSampler = DefaultExemplarSampler.newInstance(configBuilder.build());
-                    }
-                }
-            }
-        }
-    }
 }u}(jJ  (58cf71063240724c5589cfc1e8d02ebe0c90c51dj  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/ObservingMetric.javaj  modifiedj  Kj  K
j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FObservingMetric.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -2,8 +2,6 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
-import io.prometheus.metrics.exemplars.DefaultExemplarConfig;
-import io.prometheus.metrics.exemplars.ExemplarConfig;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.MetricSnapshot;
 import io.prometheus.metrics.observer.Observer;
@@ -21,7 +19,6 @@
 public abstract class ObservingMetric<O extends Observer, V extends MetricData<O>> extends Metric {
     private final String[] labelNames;
     //private final Boolean exemplarsEnabled;
-    protected final ExemplarConfig exemplarConfig;
 
     /**
      * Map from variableLabelValues to MetricData.
@@ -37,7 +34,7 @@ protected ObservingMetric(Builder<?, ?> builder) {
         super(builder);
         this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
         //this.exemplarsEnabled = builder.exemplarsEnabled;
-        this.exemplarConfig = builder.exemplarConfig;
+        //this.exemplarConfig = builder.exemplarConfig;
     }
 
     /**
@@ -122,14 +119,15 @@ protected boolean isExemplarsEnabled() {
     }
      */
 
+    /*
     protected boolean hasSpanContextSupplier() {
         return exemplarConfig != null ? exemplarConfig.hasSpanContextSupplier() : DefaultExemplarConfig.hasSpanContextSupplier();
     }
+     */
 
     static abstract class Builder<B extends Builder<B, M>, M extends ObservingMetric<?,?>> extends Metric.Builder<B, M> {
         private String[] labelNames = new String[0];
         protected Boolean exemplarsEnabled;
-        private ExemplarConfig exemplarConfig;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties config) {
             super(illegalLabelNames, config);
@@ -169,13 +167,5 @@ public MetricProperties getDefaultProperties() {
                     .withExemplarsEnabled(true)
                     .build();
         }
-
-        /**
-         * Enable exemplars and provide an {@link ExemplarConfig}.
-         */
-        public B withExemplarConfig(ExemplarConfig exemplarConfig) {
-            this.exemplarConfig = exemplarConfig;
-            return withExemplars();
-        }
     }
 }u}(jJ  (0b1b60e8c804d1308f037105737a789f754e370aj  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/CounterExemplarSampler.javaj  removedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FCounterExemplarSampler.javaj  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FCounterExemplarSampler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FCounterExemplarSampler.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  Xo  @@ -1,17 +0,0 @@
-package io.prometheus.metrics.exemplars;
-
-import io.prometheus.metrics.model.Exemplar;
-
-/**
- * Exemplar sampler for counter metrics.
- */
-public interface CounterExemplarSampler {
-
-  /**
-   * @param increment the value added to the counter on this event
-   * @param previous  the previously sampled exemplar, or {@code null} if there is none.
-   * @return an Exemplar to be sampled, or {@code null} if the previous exemplar does not need to be updated.
-   * Returning {@code null} and returning {@code previous} is equivalent.
-   */
-  Exemplar sample(double increment, Exemplar previous);
-}u}(jJ  (e234fc3b886340120f1a721427630a8795ab64b4j  `prometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/DefaultExemplarConfig.javaj  removedj  K j  Kgj  Kgj  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarConfig.javaj  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarConfig.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarConfig.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  X  @@ -1,103 +0,0 @@
-package io.prometheus.metrics.exemplars;
-
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
-import io.prometheus.client.exemplars.tracer.otel.OpenTelemetrySpanContextSupplier;
-import io.prometheus.client.exemplars.tracer.otel_agent.OpenTelemetryAgentSpanContextSupplier;
-
-import java.util.concurrent.TimeUnit;
-
-import static java.util.concurrent.TimeUnit.SECONDS;
-
-public class DefaultExemplarConfig {
-
-    private static volatile boolean exemplarsEnabledByDefault = true;
-    private static volatile Object spanContextSupplier = findSpanContextSupplier();
-    private static volatile long minAgeMillis = SECONDS.toMillis(7);
-    private static volatile long maxAgeMillis = SECONDS.toMillis(70);
-    private static volatile long sampleIntervalMillis = 20;
-    private static final int numberOfExemplars = 4;
-
-    public static void disableExemplarsByDefault() {
-        exemplarsEnabledByDefault = false;
-    }
-
-    public static void enableExemplarsByDefault() {
-        exemplarsEnabledByDefault = true;
-    }
-
-    public static boolean isEnabledByDefault() {
-        // TODO: Allow disabling via system property or environment variable
-        return exemplarsEnabledByDefault;
-    }
-
-    public static boolean hasSpanContextSupplier() {
-        return spanContextSupplier != null;
-    }
-
-    // Avoid SpanContextSupplier in the method signature so that we can handle the NoClassDefFoundError
-    // even if the user excluded simpleclient_tracer_common from the classpath.
-    public static void setSpanContextSupplier(Object spanContextSupplier) {
-        if (!(spanContextSupplier instanceof SpanContextSupplier)) {
-            // This will throw a NullPointerException if spanContextSupplier is null.
-            throw new IllegalArgumentException(spanContextSupplier.getClass().getSimpleName() + " does not implement SpanContextSupplier");
-        }
-        DefaultExemplarConfig.spanContextSupplier = spanContextSupplier;
-    }
-
-    /**
-     * Will <i>not</i> return {@code null} after {@link #hasSpanContextSupplier()} returned {@code true}.
-     */
-    public static Object getSpanContextSupplier() {
-        return spanContextSupplier;
-    }
-
-    public static void setMinAge(long minAge, TimeUnit unit) {
-       DefaultExemplarConfig.minAgeMillis = unit.toMillis(minAge);
-    }
-
-    public static long getMinAgeMillis() {
-        return minAgeMillis;
-    }
-
-    public static void setMaxAge(long maxAge, TimeUnit unit) {
-        DefaultExemplarConfig.maxAgeMillis = unit.toMillis(maxAge);
-    }
-
-    public static long getMaxAgeMillis() {
-        return maxAgeMillis;
-    }
-
-    public static void setSampleInterval(long sampleInterval, TimeUnit unit) {
-        DefaultExemplarConfig.sampleIntervalMillis = unit.toMillis(sampleInterval);
-    }
-
-    public static long getSampleIntervalMillis() {
-        return sampleIntervalMillis;
-    }
-
-    public static int getNumberOfExemplars() {
-        return numberOfExemplars;
-    }
-
-    private static Object findSpanContextSupplier() {
-        try {
-            if (OpenTelemetrySpanContextSupplier.isAvailable()) {
-                return new OpenTelemetrySpanContextSupplier();
-            }
-        } catch (NoClassDefFoundError ignored) {
-            // tracer_otel dependency not found
-        } catch (UnsupportedClassVersionError ignored) {
-            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
-        }
-        try {
-            if (OpenTelemetryAgentSpanContextSupplier.isAvailable()) {
-                return new OpenTelemetryAgentSpanContextSupplier();
-            }
-        } catch (NoClassDefFoundError ignored) {
-            // tracer_otel_agent dependency not found
-        } catch (UnsupportedClassVersionError ignored) {
-            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
-        }
-        return null;
-    }
-}u}(jJ  (828f88dc59e66164a542d559440276b2450d2635j  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/DefaultExemplarSampler.javaj  removedj  K j  M]j  M]j  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarSampler.javaj  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarSampler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FDefaultExemplarSampler.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  X8  @@ -1,349 +0,0 @@
-package io.prometheus.metrics.exemplars;
-
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
-import io.prometheus.metrics.model.Exemplar;
-import io.prometheus.metrics.model.Exemplars;
-import io.prometheus.metrics.model.Labels;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.function.LongSupplier;
-
-public class DefaultExemplarSampler implements ExemplarSampler {
-
-    private final ExemplarConfig config;
-    protected final Exemplar[] exemplars;
-    protected final Exemplar[] customExemplars; // Separate from exemplars, because we don't want custom exemplars
-    // to be overwritten by automatic exemplar sampling. exemplars.lengt == customExemplars.length
-    protected final AtomicBoolean acceptingNewExemplars = new AtomicBoolean(true);
-    protected final AtomicBoolean acceptingNewCustomExemplars = new AtomicBoolean(true);
-
-    /**
-     * We want to keep each Exemplar for <tt>minAgeMillis</tt> milliseconds before we replace it with the next one
-     * (see "rate-limited sampling" above). There are two ways to implement this:
-     * <ol>
-     *     <li>Call {@link System#currentTimeMillis()} for each observation to check the age of the current Exemplar.</li>
-     *     <li>Run a background thread to schedule Exemplar updates.</li>
-     * </ol>
-     * The performance impact of {@link System#currentTimeMillis()} may be significant, for example if this is run
-     * each time a counter metric is incremented. Therefore, we run a background thread.
-     */
-    private static final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
-
-    private DefaultExemplarSampler(ExemplarConfig config) {
-        this.config = config;
-        double[] upperBounds = config.getUpperBounds();
-        int numberOfExemplars = upperBounds != null && upperBounds.length > 1 ? upperBounds.length : config.getNumberOfExemplars();
-        this.exemplars = new Exemplar[numberOfExemplars];
-        this.customExemplars = new Exemplar[numberOfExemplars];
-    }
-
-
-    @Override
-    public void reset() {
-        for (int i=0; i<exemplars.length; i++) {
-            exemplars[i] = null;
-            customExemplars[i] = null;
-        }
-    }
-
-    /**
-     * Collect up to nExemplars exemplars, preferably custom exemplars.
-     */
-    @Override
-    public Exemplars collect() {
-        // this might run in parallel with observe()
-        long now = System.currentTimeMillis();
-        List<Exemplar> result = new ArrayList<>(exemplars.length);
-        for (int i = 0; i < customExemplars.length; i++) {
-            Exemplar exemplar = customExemplars[i];
-            if (exemplar != null) {
-                if (now - exemplar.getTimestampMillis() > config.getMaxAgeMillis()) {
-                    customExemplars[i] = null;
-                } else {
-                    result.add(exemplar);
-                }
-            }
-        }
-        for (int i = 0; i < exemplars.length && result.size() < exemplars.length; i++) {
-            Exemplar exemplar = exemplars[i];
-            if (exemplar != null) {
-                if (now - exemplar.getTimestampMillis() > config.getMaxAgeMillis()) {
-                    exemplars[i] = null;
-                } else {
-                    result.add(exemplar);
-                }
-            }
-        }
-        return Exemplars.of(result); // TODO
-    }
-
-    @Override
-    public void observe(double value) {
-        if (!acceptingNewExemplars.get()) {
-            // This is the hot path. This should be as efficient as possible.
-            return;
-        }
-        rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));
-    }
-
-    @Override
-    public void observeWithExemplar(double value, Labels labels) {
-        if (!acceptingNewCustomExemplars.get()) {
-            // This is the hot path. This should be as efficient as possible.
-            return;
-        }
-        rateLimitedObserve(acceptingNewCustomExemplars, value, customExemplars, () -> doObserveWithExemplar(value, labels));
-    }
-
-
-    private long doObserve(double value) {
-        if (exemplars.length == 1) {
-            return doObserveSingleExemplar(value);
-        } else if (config.getUpperBounds() != null) {
-            return doObserveWithUpperBounds(value, config.getUpperBounds());
-        } else {
-            return doObserveWithoutUpperBounds(value);
-        }
-    }
-
-    private long doObserveSingleExemplar(double value) {
-        long now = System.currentTimeMillis();
-        Exemplar current = exemplars[0];
-        if (current == null || now - current.getTimestampMillis() > config.getMinAgeMillis()) {
-            return updateExemplar(0, value, now);
-        }
-        return 0;
-    }
-
-    private long doObserveWithUpperBounds(double value, double[] upperBounds) {
-        long now = System.currentTimeMillis();
-        for (int i=0; i<upperBounds.length; i++) {
-            if (upperBounds[i] >= value) {
-                Exemplar previous = exemplars[i];
-                if (previous == null || now - previous.getTimestampMillis() > config.getMinAgeMillis()) {
-                    return updateExemplar(i, value, now);
-                } else {
-                    return 0;
-                }
-            }
-        }
-        return 0; // will never happen, as upperBounds contains +Inf
-    }
-
-    private long doObserveWithoutUpperBounds(double value) {
-        final long now = System.currentTimeMillis();
-        Exemplar smallest = null;
-        int smallestIndex = -1;
-        Exemplar largest = null;
-        int largestIndex = -1;
-        int nullIndex = -1;
-        for (int i = exemplars.length - 1; i >= 0; i--) {
-            Exemplar exemplar = exemplars[i];
-            if (exemplar == null) {
-                nullIndex = i;
-            } else if (now - exemplar.getTimestampMillis() > config.getMaxAgeMillis()) {
-                exemplars[i] = null;
-                nullIndex = i;
-            } else {
-                if (smallest == null || exemplar.getValue() < smallest.getValue()) {
-                    smallest = exemplar;
-                    smallestIndex = i;
-                }
-                if (largest == null || exemplar.getValue() > largest.getValue()) {
-                    largest = exemplar;
-                    largestIndex = i;
-                }
-            }
-        }
-        if (nullIndex >= 0) {
-            return updateExemplar(nullIndex, value, now);
-        }
-        if (now - smallest.getTimestampMillis() > config.getMinAgeMillis() && value < smallest.getValue()) {
-            return updateExemplar(smallestIndex, value, now);
-        }
-        if (now - largest.getTimestampMillis() > config.getMinAgeMillis() && value > largest.getValue()) {
-            return updateExemplar(largestIndex, value, now);
-        }
-        long oldestTimestamp = 0;
-        int oldestIndex = -1;
-        for (int i = 0; i < exemplars.length; i++) {
-            Exemplar exemplar = exemplars[i];
-            if (exemplar != null && exemplar != smallest && exemplar != largest) {
-                if (oldestTimestamp == 0 || exemplar.getTimestampMillis() < oldestTimestamp) {
-                    oldestTimestamp = exemplar.getTimestampMillis();
-                    oldestIndex = i;
-                }
-            }
-        }
-        if (oldestIndex != -1 && now - oldestTimestamp > config.getMinAgeMillis()) {
-            return updateExemplar(oldestIndex, value, now);
-        }
-        return 0;
-    }
-
-    // Returns the timestamp of the newly added Exemplar (which is System.currentTimeMillis())
-    // or 0 if no Exemplar was added.
-    private long doObserveWithExemplar(double amount, Labels labels) {
-        if (customExemplars.length == 1) {
-            return doObserveSingleExemplar(amount, labels);
-        } else if (config.getUpperBounds() != null) {
-            return doObserveWithExemplarWithUpperBounds(amount, labels, config.getUpperBounds());
-        } else {
-            return doObserveWithExemplarWithoutUpperBounds(amount, labels);
-        }
-    }
-
-    private long doObserveSingleExemplar(double amount, Labels labels) {
-        long now = System.currentTimeMillis();
-        Exemplar current = customExemplars[0];
-        if (current == null || now - current.getTimestampMillis() > config.getMinAgeMillis()) {
-            return updateCustomExemplar(0, amount, labels, now);
-        }
-        return 0;
-    }
-
-    private long doObserveWithExemplarWithUpperBounds(double value, Labels labels, double[] upperBounds) {
-        long now = System.currentTimeMillis();
-        for (int i=0; i<upperBounds.length; i++) {
-            if (upperBounds[i] > value) {
-                Exemplar previous = customExemplars[i];
-                if (previous == null || now - previous.getTimestampMillis() > config.getMinAgeMillis()) {
-                    return updateCustomExemplar(i, value, labels, now);
-                } else {
-                    return 0;
-                }
-            }
-        }
-        // TODO will happen for +Inf observations
-        return 0; // will never happen, as upperBounds contains +Inf
-    }
-
-    private long doObserveWithExemplarWithoutUpperBounds(double amount, Labels labels) {
-        final long now = System.currentTimeMillis();
-        int nullPos = -1;
-        int oldestPos = -1;
-        Exemplar oldest = null;
-        for (int i = customExemplars.length - 1; i >= 0; i--) {
-            Exemplar exemplar = customExemplars[i];
-            if (exemplar == null) {
-                nullPos = i;
-            } else if (now - exemplar.getTimestampMillis() > config.getMaxAgeMillis()) {
-                customExemplars[i] = null;
-                nullPos = i;
-            } else {
-                if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
-                    oldest = exemplar;
-                    oldestPos = i;
-                }
-            }
-        }
-        if (nullPos != -1) {
-            return updateCustomExemplar(nullPos, amount, labels, now);
-        } else if (now - oldest.getTimestampMillis() > config.getMinAgeMillis()) {
-            return updateCustomExemplar(oldestPos, amount, labels, now);
-        } else {
-            return 0;
-        }
-    }
-
-    private void rateLimitedObserve(AtomicBoolean accepting, double value, Exemplar[] exemplars, LongSupplier observeFunc) {
-        if (Double.isNaN(value)) {
-            return;
-        }
-        if (!accepting.compareAndSet(true, false)) {
-            return;
-        }
-        // observeFunc returns the timestamp of the newly added Exemplar (which is System.currentTimeMillis())
-        // or 0 if no Exemplar was added.
-        long now = observeFunc.getAsLong();
-        long delayMillis = config.getSampleIntervalMillis();
-        if (now != 0) {
-            // An Exemplar was updated. Find the age of the oldest Exemplar and set the delay accordingly.
-            long oldestTimestamp = now;
-            for (Exemplar exemplar : exemplars) {
-                if (exemplar == null) {
-                    oldestTimestamp = 0;
-                } else if (exemplar.getTimestampMillis() < oldestTimestamp) {
-                    oldestTimestamp = exemplar.getTimestampMillis();
-                }
-            }
-            long oldestAge = now - oldestTimestamp;
-            if (oldestAge < config.getMinAgeMillis()) {
-                delayMillis = config.getMinAgeMillis() - oldestAge;
-            }
-        }
-        executor.schedule(() -> accepting.compareAndSet(false, true), delayMillis, TimeUnit.MILLISECONDS);
-    }
-
-    protected long updateCustomExemplar(int index, double value, Labels labels, long now) {
-        if (!labels.contains(Exemplar.TRACE_ID) && !labels.contains(Exemplar.SPAN_ID)) {
-            labels = labels.merge(newTraceLabels());
-        }
-        customExemplars[index] = Exemplar.newBuilder()
-                .withValue(value)
-                .withLabels(labels)
-                .withTimestampMillis(now)
-                .build();
-        return now;
-    }
-
-    protected long updateExemplar(int index, double value, long now) {
-        Labels traceLabels = newTraceLabels();
-        if (!traceLabels.isEmpty()) {
-            exemplars[index] = Exemplar.newBuilder()
-                    .withValue(value)
-                    .withLabels(traceLabels)
-                    .withTimestampMillis(now)
-                    .build();
-            return now;
-        } else {
-            return 0;
-        }
-    }
-
-    private Labels newTraceLabels() {
-        Object spanContextSupplierObject = config.getSpanContextSupplier();
-        if (spanContextSupplierObject != null) {
-            try {
-                SpanContextSupplier spanContextSupplier = (SpanContextSupplier) spanContextSupplierObject;
-                if (spanContextSupplier.isSampled()) {
-                    String spanId = spanContextSupplier.getSpanId();
-                    String traceId = spanContextSupplier.getTraceId();
-                    if (spanId != null && traceId != null) {
-                        return Labels.of(Exemplar.TRACE_ID, traceId, Exemplar.SPAN_ID, spanId);
-                    }
-                }
-            } catch (NoClassDefFoundError ignored) {
-            }
-        }
-        return Labels.EMPTY;
-    }
-
-    /**
-     * For unit test.
-     */
-    void awaitInitialization() throws InterruptedException {
-        CountDownLatch latch = new CountDownLatch(1);
-        executor.schedule(latch::countDown, 0, TimeUnit.MILLISECONDS);
-        latch.await();
-    }
-
-    private static class DaemonThreadFactory implements ThreadFactory {
-        public Thread newThread(Runnable runnable) {
-            Thread thread = new Thread(runnable);
-            thread.setDaemon(true);
-            return thread;
-        }
-    }
-
-    public static ExemplarSampler newInstance(ExemplarConfig config) {
-        return new DefaultExemplarSampler(config);
-    }
-}u}(jJ  (4d8d86aa9d92c3b9e073fc8ffb6924dd08f40fc7j  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/ExemplarConfig.javaj  removedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarConfig.javaj  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarConfig.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarConfig.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  XR  @@ -1,206 +0,0 @@
-package io.prometheus.metrics.exemplars;
-
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
-
-import java.util.concurrent.TimeUnit;
-import java.util.stream.DoubleStream;
-
-import static java.util.stream.DoubleStream.concat;
-
-
-/**
- * {@link ExemplarConfig} can be used to overwrite the {@link DefaultExemplarConfig}.
- */
-public class ExemplarConfig {
-
-    private final Object spanContextSupplier;
-    private final Long minAgeMillis;
-    private final Long maxAgeMillis;
-    private final Long sampleIntervalMillis;
-    private final Integer nExemplars;
-    private final double[] upperBounds;
-
-    private ExemplarConfig(Object spanContextSupplier, double[] upperBounds, Integer nExemplars,
-                           Long minAgeMillis, Long maxAgeMillis, Long sampleIntervalMillis) {
-        this.spanContextSupplier = spanContextSupplier;
-        this.upperBounds = upperBounds; // upperBounds is already a sorted copy including +Inf.
-        this.nExemplars = nExemplars;
-        this.minAgeMillis = minAgeMillis;
-        this.maxAgeMillis = maxAgeMillis;
-        this.sampleIntervalMillis = sampleIntervalMillis;
-    }
-
-    public boolean hasSpanContextSupplier() {
-        return spanContextSupplier != null || DefaultExemplarConfig.hasSpanContextSupplier();
-    }
-
-
-    public Object getSpanContextSupplier() {
-        return spanContextSupplier != null ? spanContextSupplier : DefaultExemplarConfig.getSpanContextSupplier();
-    }
-
-    public long getMinAgeMillis() {
-        return minAgeMillis != null ? minAgeMillis : DefaultExemplarConfig.getMinAgeMillis();
-    }
-
-    public long getMaxAgeMillis() {
-        return maxAgeMillis != null ? maxAgeMillis : DefaultExemplarConfig.getMaxAgeMillis();
-    }
-
-    public long getSampleIntervalMillis() {
-        return sampleIntervalMillis != null ? sampleIntervalMillis : DefaultExemplarConfig.getSampleIntervalMillis();
-    }
-
-    public Integer getNumberOfExemplars() {
-        return nExemplars != null ? nExemplars : DefaultExemplarConfig.getNumberOfExemplars();
-    }
-
-    public double[] getUpperBounds() {
-        return upperBounds;
-    }
-
-    public static Builder newBuilder() {
-        return new Builder();
-    }
-
-    public Builder toBuilder() {
-        Builder result = newBuilder();
-        if (spanContextSupplier != null) {
-            result.withSpanContextSupplier(spanContextSupplier);
-        }
-        if (nExemplars != null) {
-            result.withNumberOfExemplars(nExemplars);
-        }
-        if (upperBounds != null) {
-            result.withBuckets(upperBounds);
-        }
-        if (minAgeMillis != null) {
-            result.withMinAge(minAgeMillis, TimeUnit.MILLISECONDS);
-        }
-        if (maxAgeMillis != null) {
-            result.withMaxAge(maxAgeMillis, TimeUnit.MILLISECONDS);
-        }
-        if (sampleIntervalMillis != null) {
-            result.withSampleInterval(sampleIntervalMillis, TimeUnit.MILLISECONDS);
-        }
-        return result;
-    }
-
-    public static class Builder {
-
-        private Object spanContextSupplier;
-        private Integer nExemplars;
-        private double[] upperBounds;
-        private Long minAgeMillis;
-        private Long maxAgeMillis;
-        private Long sampleIntervalMillis;
-
-        private Builder() {
-        }
-
-        /**
-         * Set a custom {@link SpanContextSupplier}. Default is {@link ExemplarConfig#getSpanContextSupplier()}.
-         *
-         * @param spanContextSupplier must be an instance of {@link SpanContextSupplier}. The reason why the
-         *                            type is {@link Object} is that users may remove the Exemplars dependencies
-         *                            from the classpath.
-         */
-        public Builder withSpanContextSupplier(Object spanContextSupplier) {
-            if (!(spanContextSupplier instanceof SpanContextSupplier)) {
-                throw new IllegalArgumentException(spanContextSupplier.getClass().getSimpleName() + " does not implement SpanContextSupplier");
-            }
-            this.spanContextSupplier = spanContextSupplier;
-            return this;
-        }
-
-        /**
-         * Number of Exemplars. Default is 4.
-         * <p>
-         * If {@link #withBuckets(double...)} is set the number of Exemplars will be the number of buckets,
-         * and {@link #withNumberOfExemplars(int)} will be ignored.
-         */
-        public Builder withNumberOfExemplars(int nExemplars) {
-            if (nExemplars <= 0) {
-                throw new IllegalArgumentException(nExemplars + ": nExemplars must be > 0");
-            }
-            this.nExemplars = nExemplars;
-            return this;
-        }
-
-        public boolean hasNumberOfExemplars() {
-            return nExemplars != null;
-        }
-
-        /**
-         * In classic histograms there is one Exemplar per bucket.
-         * <p>
-         * Use {@code withBuckets(double...)} to create an {@link ExemplarConfig} for a classic histogram.
-         */
-        public Builder withBuckets(double... upperBounds) {
-            this.upperBounds = concat(DoubleStream.of(upperBounds), DoubleStream.of(Double.POSITIVE_INFINITY))
-                            .distinct()
-                            .sorted()
-                            .toArray();
-            return this;
-        }
-
-        public boolean hasBuckets() {
-            return upperBounds != null;
-        }
-
-        /**
-         * Minimum retention time for Exemplars, i.e. Exemplars will be kept at least until the reach minAge.
-         * <p>
-         * Should be a bit less than the scrape interval. Default is 7 seconds.
-         */
-        public Builder withMinAge(long minAge, TimeUnit unit) {
-            if (minAge <= 0) {
-                throw new IllegalArgumentException(minAge + ": minAge must be >= 0");
-            }
-            this.minAgeMillis = unit.toMillis(minAge);
-            if (maxAgeMillis != null) {
-                if (maxAgeMillis < minAgeMillis) {
-                    throw new IllegalArgumentException(minAge + ": minAge must be <= maxAge");
-                }
-            }
-            return this;
-        }
-
-        /**
-         * Maximum retention time for Exemplars: After maxAge Exemplars will be discarded.
-         * <p>
-         * Default is 70 seconds.
-         */
-        public Builder withMaxAge(long maxAge, TimeUnit unit) {
-            if (maxAge <= 0) {
-                throw new IllegalArgumentException(maxAge + ": maxAge must be > 0");
-            }
-            this.maxAgeMillis = unit.toMillis(maxAge);
-            if (minAgeMillis != null) {
-                if (minAgeMillis > maxAgeMillis) {
-                    throw new IllegalArgumentException(maxAge + ": maxAge must be => minAge");
-                }
-            }
-            return this;
-        }
-
-        /**
-         * Sample interval. Default is 20 milliseconds.
-         * <p>
-         * The exemplar sampler is rate limited, i.e. Exemplars are updated at most every n milliseconds.
-         */
-        public Builder withSampleInterval(long sampleInterval, TimeUnit unit) {
-            if (sampleInterval <= 0) {
-                throw new IllegalArgumentException(sampleInterval + ": sampleInterval must be > 0");
-            }
-            this.sampleIntervalMillis = unit.toMillis(sampleInterval);
-            return this;
-        }
-
-        public ExemplarConfig build() {
-            return new ExemplarConfig(spanContextSupplier, upperBounds, nExemplars,
-                    minAgeMillis, maxAgeMillis, sampleIntervalMillis);
-        }
-
-    }
-}uY     }(jJ  (aba2eff31162c2ed89c7b6eb446b74907d1617d4j  Zprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/ExemplarSampler.javaj  modifiedj  M0j  Kj  M6j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSampler.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSampler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSampler.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X3  @@ -1,14 +1,312 @@
 package io.prometheus.metrics.exemplars;
 
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Labels;
+import io.prometheus.metrics.util.Scheduler;
 
-import java.util.Collection;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.LongSupplier;
 
-public interface ExemplarSampler {
-    void reset();
-    Exemplars collect();
-    void observe(double value);
-    void observeWithExemplar(double value, Labels labels);
+public class ExemplarSampler {
+
+    private final ExemplarSamplerConfig config;
+    private final Exemplar[] exemplars;
+    private final Exemplar[] customExemplars; // Separate from exemplars, because we don't want custom exemplars
+    // to be overwritten by automatic exemplar sampling. exemplars.lengt == customExemplars.length
+    private final AtomicBoolean acceptingNewExemplars = new AtomicBoolean(true);
+    private final AtomicBoolean acceptingNewCustomExemplars = new AtomicBoolean(true);
+
+    public ExemplarSampler(ExemplarSamplerConfig config) {
+        this.config = config;
+        this.exemplars = new Exemplar[config.getNumberOfExemplars()];
+        this.customExemplars = new Exemplar[exemplars.length];
+    }
+
+    public Exemplars collect() {
+        // this may run in parallel with observe()
+        long now = System.currentTimeMillis();
+        List<Exemplar> result = new ArrayList<>(exemplars.length);
+        for (int i = 0; i < customExemplars.length; i++) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    customExemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        for (int i = 0; i < exemplars.length && result.size() < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    exemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        return Exemplars.of(result);
+    }
+
+    public void reset() {
+        for (int i = 0; i < exemplars.length; i++) {
+            exemplars[i] = null;
+            customExemplars[i] = null;
+        }
+    }
+
+    public void observe(double value) {
+        if (!acceptingNewExemplars.get()) {
+            // This is the hot path. This should be as efficient as possible.
+            return;
+        }
+        rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));
+    }
+
+    public void observeWithExemplar(double value, Labels labels) {
+        if (!acceptingNewCustomExemplars.get()) {
+            // This is the hot path. This should be as efficient as possible.
+            return;
+        }
+        rateLimitedObserve(acceptingNewCustomExemplars, value, customExemplars, () -> doObserveWithExemplar(value, labels));
+    }
+
+    private long doObserve(double value) {
+        if (exemplars.length == 1) {
+            return doObserveSingleExemplar(value);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithUpperBounds(value);
+        } else {
+            return doObserveWithoutUpperBounds(value);
+        }
+    }
+
+    private long doObserveSingleExemplar(double value) {
+        long now = System.currentTimeMillis();
+        Exemplar current = exemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(0, value, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithUpperBounds(double value) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (upperBounds[i] >= value) {
+                Exemplar previous = exemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateExemplar(i, value, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithoutUpperBounds(double value) {
+        final long now = System.currentTimeMillis();
+        Exemplar smallest = null;
+        int smallestIndex = -1;
+        Exemplar largest = null;
+        int largestIndex = -1;
+        int nullIndex = -1;
+        for (int i = exemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar == null) {
+                nullIndex = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                exemplars[i] = null;
+                nullIndex = i;
+            } else {
+                if (smallest == null || exemplar.getValue() < smallest.getValue()) {
+                    smallest = exemplar;
+                    smallestIndex = i;
+                }
+                if (largest == null || exemplar.getValue() > largest.getValue()) {
+                    largest = exemplar;
+                    largestIndex = i;
+                }
+            }
+        }
+        if (nullIndex >= 0) {
+            return updateExemplar(nullIndex, value, now);
+        }
+        if (now - smallest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value < smallest.getValue()) {
+            return updateExemplar(smallestIndex, value, now);
+        }
+        if (now - largest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value > largest.getValue()) {
+            return updateExemplar(largestIndex, value, now);
+        }
+        long oldestTimestamp = 0;
+        int oldestIndex = -1;
+        for (int i = 0; i < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null && exemplar != smallest && exemplar != largest) {
+                if (oldestTimestamp == 0 || exemplar.getTimestampMillis() < oldestTimestamp) {
+                    oldestTimestamp = exemplar.getTimestampMillis();
+                    oldestIndex = i;
+                }
+            }
+        }
+        if (oldestIndex != -1 && now - oldestTimestamp > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(oldestIndex, value, now);
+        }
+        return 0;
+    }
+
+    // Returns the timestamp of the newly added Exemplar (which is System.currentTimeMillis())
+    // or 0 if no Exemplar was added.
+    private long doObserveWithExemplar(double amount, Labels labels) {
+        if (customExemplars.length == 1) {
+            return doObserveSingleExemplar(amount, labels);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithExemplarWithUpperBounds(amount, labels);
+        } else {
+            return doObserveWithExemplarWithoutUpperBounds(amount, labels);
+        }
+    }
+
+    private long doObserveSingleExemplar(double amount, Labels labels) {
+        long now = System.currentTimeMillis();
+        Exemplar current = customExemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(0, amount, labels, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithExemplarWithUpperBounds(double value, Labels labels) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (upperBounds[i] > value) {
+                Exemplar previous = customExemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateCustomExemplar(i, value, labels, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        // TODO will happen for +Inf observations
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithExemplarWithoutUpperBounds(double amount, Labels labels) {
+        final long now = System.currentTimeMillis();
+        int nullPos = -1;
+        int oldestPos = -1;
+        Exemplar oldest = null;
+        for (int i = customExemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar == null) {
+                nullPos = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                customExemplars[i] = null;
+                nullPos = i;
+            } else {
+                if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
+                    oldest = exemplar;
+                    oldestPos = i;
+                }
+            }
+        }
+        if (nullPos != -1) {
+            return updateCustomExemplar(nullPos, amount, labels, now);
+        } else if (now - oldest.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(oldestPos, amount, labels, now);
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Observing requires a system call to {@link System#currentTimeMillis()},
+     * and it requires iterating over the existing exemplars to check if one of the existing
+     * exemplars can be replaced.
+     * <p>
+     * To avoid performance issues, we rate limit observing exemplars to
+     * {@link ExemplarSamplerConfig#getSampleIntervalMillis()} milliseconds.
+     */
+    private void rateLimitedObserve(AtomicBoolean accepting, double value, Exemplar[] exemplars, LongSupplier observeFunc) {
+        if (Double.isNaN(value)) {
+            return;
+        }
+        if (!accepting.compareAndSet(true, false)) {
+            return;
+        }
+        // observeFunc returns the current timestamp or 0 if no Exemplar was added.
+        long now = observeFunc.getAsLong();
+        long sleepTime = now == 0 ? config.getSampleIntervalMillis() : durationUntilNextExemplarExpires(now);
+        Scheduler.schedule(() -> accepting.compareAndSet(false, true), sleepTime, TimeUnit.MILLISECONDS);
+    }
+
+    private long durationUntilNextExemplarExpires(long now) {
+        long oldestTimestamp = now;
+        for (Exemplar exemplar : exemplars) {
+            if (exemplar == null) {
+                return config.getSampleIntervalMillis();
+            } else if (exemplar.getTimestampMillis() < oldestTimestamp) {
+                oldestTimestamp = exemplar.getTimestampMillis();
+            }
+        }
+        long oldestAge = now - oldestTimestamp;
+        if (oldestAge < config.getMinRetentionPeriodMillis()) {
+            return config.getMinRetentionPeriodMillis() - oldestAge;
+        }
+        return config.getSampleIntervalMillis();
+    }
+
+    private long updateCustomExemplar(int index, double value, Labels labels, long now) {
+        if (!labels.contains(Exemplar.TRACE_ID) && !labels.contains(Exemplar.SPAN_ID)) {
+            labels = labels.merge(newTraceLabels());
+        }
+        customExemplars[index] = Exemplar.newBuilder()
+                .withValue(value)
+                .withLabels(labels)
+                .withTimestampMillis(now)
+                .build();
+        return now;
+    }
+
+    private long updateExemplar(int index, double value, long now) {
+        Labels traceLabels = newTraceLabels();
+        if (!traceLabels.isEmpty()) {
+            exemplars[index] = Exemplar.newBuilder()
+                    .withValue(value)
+                    .withLabels(traceLabels)
+                    .withTimestampMillis(now)
+                    .build();
+            return now;
+        } else {
+            return 0;
+        }
+    }
+
+    private Labels newTraceLabels() {
+        try {
+            SpanContext spanContext = SpanContextSupplier.getSpanContext();
+            if (spanContext != null) {
+                if (spanContext.isCurrentSpanSampled()) {
+                    String spanId = spanContext.getCurrentSpanId();
+                    String traceId = spanContext.getCurrentTraceId();
+                    if (spanId != null && traceId != null) {
+                        return Labels.of(Exemplar.TRACE_ID, traceId, Exemplar.SPAN_ID, spanId);
+                    }
+                }
+            }
+        } catch (NoClassDefFoundError ignored) {
+        }
+        return Labels.EMPTY;
+    }
 }u}(jJ  (235969bb5f9b9c7318872e1ab6bcf36758369444j  `prometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/ExemplarSamplerConfig.javaj  addedj  Kpj  K j  Kpj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfig.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfig.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfig.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,112 @@
+package io.prometheus.metrics.exemplars;
+
+import io.prometheus.metrics.config.ExemplarProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+import java.util.concurrent.TimeUnit;
+
+public class ExemplarSamplerConfig {
+
+    public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDS = 7;
+    public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDS = 70;
+    private static final int DEFAULT_SAMPLE_INTERVAL_MILLISECONDS = 90;
+
+    private final long minRetentionPeriodMillis;
+    private final long maxRetentionPeriodMillis;
+    private final long sampleIntervalMillis;
+    private final double[] histogramClassicUpperBounds; // null unless used in a classic histogram
+    private final int numberOfExemplars; // if histogramClassicUpperBounds != null, then numberOfExemplars == histogramClassicUpperBounds.length
+
+    /**
+     * Constructor for all metric types except classic histograms.
+     *
+     * @param properties        Coming from {@link PrometheusProperties#getExemplarConfig()}.
+     * @param numberOfExemplars Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default.
+     *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarProperties, double[])}.
+     */
+    public ExemplarSamplerConfig(ExemplarProperties properties, int numberOfExemplars) {
+        this(properties, numberOfExemplars, null);
+    }
+
+    /**
+     * Constructor for classic histogram metrics.
+     *
+     * @param properties                  Coming from {@link PrometheusProperties#getExemplarConfig()}.
+     * @param histogramClassicUpperBounds the ExemplarSampler will provide one Exemplar per histogram bucket.
+     *                                    Must be sorted, and must include the +Inf bucket.
+     */
+    public ExemplarSamplerConfig(ExemplarProperties properties, double[] histogramClassicUpperBounds) {
+        this(properties, histogramClassicUpperBounds.length, histogramClassicUpperBounds);
+    }
+
+    private ExemplarSamplerConfig(ExemplarProperties properties, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this(
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMinRetentionPeriodSeconds(), DEFAULT_MIN_RETENTION_PERIOD_SECONDS)),
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMaxRetentionPeriodSeconds(), DEFAULT_MAX_RETENTION_PERIOD_SECONDS)),
+                getOrDefault(properties.getSampleIntervalMilliseconds(), DEFAULT_SAMPLE_INTERVAL_MILLISECONDS),
+                numberOfExemplars,
+                histogramClassicUpperBounds);
+    }
+
+    ExemplarSamplerConfig(long minRetentionPeriodMillis, long maxRetentionPeriodMillis, long sampleIntervalMillis, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this.minRetentionPeriodMillis = minRetentionPeriodMillis;
+        this.maxRetentionPeriodMillis = maxRetentionPeriodMillis;
+        this.sampleIntervalMillis = sampleIntervalMillis;
+        this.numberOfExemplars = numberOfExemplars;
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+        validate();
+    }
+
+    private void validate() {
+        if (minRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(minRetentionPeriodMillis + ": minRetentionPeriod must be > 0.");
+        }
+        if (maxRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(maxRetentionPeriodMillis + ": maxRetentionPeriod must be > 0.");
+        }
+        if (histogramClassicUpperBounds != null) {
+            if (histogramClassicUpperBounds.length == 0 || histogramClassicUpperBounds[histogramClassicUpperBounds.length - 1] != Double.POSITIVE_INFINITY) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds must contain the +Inf bucket.");
+            }
+            if (histogramClassicUpperBounds.length != numberOfExemplars) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds.length must be equal to numberOfExemplars.");
+            }
+            double bound = histogramClassicUpperBounds[0];
+            for (int i = 1; i < histogramClassicUpperBounds.length; i++) {
+                if (bound >= histogramClassicUpperBounds[i]) {
+                    throw new IllegalArgumentException("histogramClassicUpperBounds must be sorted and must not contain duplicates.");
+                }
+            }
+        }
+        if (numberOfExemplars <= 0) {
+            throw new IllegalArgumentException(numberOfExemplars + ": numberOfExemplars must be > 0.");
+        }
+    }
+
+    private static <T> T getOrDefault(T result, T defaultValue) {
+        return result != null ? result : defaultValue;
+    }
+
+    /**
+     * May be {@code null}.
+     */
+    public double[] getHistogramClassicUpperBounds() {
+        return histogramClassicUpperBounds;
+    }
+
+    public long getMinRetentionPeriodMillis() {
+        return minRetentionPeriodMillis;
+    }
+
+    public long getMaxRetentionPeriodMillis() {
+        return maxRetentionPeriodMillis;
+    }
+
+    public long getSampleIntervalMillis() {
+        return sampleIntervalMillis;
+    }
+
+    public int getNumberOfExemplars() {
+        return numberOfExemplars;
+    }
+}u}(jJ  (de775d1d7db174c0ef3c6f1089b7ea5e8d6b1411j  cprometheus-metrics-core/src/main/java/io/prometheus/metrics/exemplars/HistogramExemplarSampler.javaj  removedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FHistogramExemplarSampler.javaj  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FHistogramExemplarSampler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FHistogramExemplarSampler.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  X  @@ -1,20 +0,0 @@
-package io.prometheus.metrics.exemplars;
-
-import io.prometheus.metrics.model.Exemplar;
-
-/**
- * Exemplar sampler for histogram metrics.
- */
-public interface HistogramExemplarSampler {
-  /**
-   * @param value      the value to be observed.
-   * @param bucketFrom upper boundary of the previous bucket in the histogram.
-   *                   Will be {@link Double#NEGATIVE_INFINITY} if there is no previous bucket.
-   * @param bucketTo   upper boundary of this histogram bucket.
-   *                   Will be {@link Double#POSITIVE_INFINITY} if this is the last bucket.
-   * @param previous   the previously sampled exemplar, or {@code null} if there is none.
-   * @return an Exemplar to be sampled, or {@code null} if the previous exemplar does not need to be updated.
-   * Returning {@code null} and returning {@code previous} is equivalent.
-   */
-  Exemplar sample(double value, double bucketFrom, double bucketTo, Exemplar previous);
-}u}(jJ  (5e2f5874aa453cb58dcbe2359aec636d03af2d7cj  Oprometheus-metrics-core/src/main/java/io/prometheus/metrics/util/Scheduler.javaj  modifiedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Futil%2FScheduler.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Futil%2FScheduler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Futil%2FScheduler.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -1,5 +1,6 @@
 package io.prometheus.metrics.util;
 
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
@@ -23,4 +24,13 @@ public Thread newThread(Runnable runnable) {
     public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
         return executor.schedule(command, delay, unit);
     }
+
+    /**
+     * For unit test. Wait until the executor Thread is running.
+     */
+    public static void awaitInitialization() throws InterruptedException {
+        CountDownLatch latch = new CountDownLatch(1);
+        Scheduler.schedule(latch::countDown, 0, TimeUnit.MILLISECONDS);
+        latch.await();
+    }
 }u}(jJ  (49a50148daa9fac8682cf03e895b847da9901d8cj  Qprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/CounterTest.javaj  modifiedj  Mj  Mj  Mj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FCounterTest.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  XW  @@ -1,288 +1,300 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.expositionformat.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.exemplars.DefaultExemplarConfig;
-import io.prometheus.metrics.exemplars.ExemplarConfig;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.model.Unit;
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
 import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
 
 import static io.prometheus.metrics.core.TestUtil.assertExemplarEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.rules.ExpectedException.none;
 
 public class CounterTest {
 
-  Counter noLabels;
-  Counter labels;
-  private static final long exemplarSampleIntervalMillis = 10;
-  private static final long exemplarMinAgeMillis = 100;
-
-  @Rule
-  public final ExpectedException thrown = none();
-
-  @BeforeClass
-  public static void beforeClass() {
-    DefaultExemplarConfig.setSampleInterval(exemplarSampleIntervalMillis, TimeUnit.MILLISECONDS);
-    DefaultExemplarConfig.setMinAge(exemplarMinAgeMillis, TimeUnit.MILLISECONDS);
-  }
-
-  @Before
-  public void setUp() {
-    noLabels = Counter.newBuilder().withName("nolabels").build();
-    labels = Counter.newBuilder().withName("labels")
-            .withHelp("help")
-            .withUnit(Unit.SECONDS)
-            .withLabelNames("l")
-            .build();
-  }
-
-  private CounterSnapshot.CounterData getData(Counter counter, String... labels) {
-    return counter.collect().getData().stream()
-            .filter(d -> d.getLabels().equals(Labels.of(labels)))
-            .findAny()
-            .orElseThrow(() -> new RuntimeException("counter with labels " + labels + " not found"));
-  }
-
-  private double getValue(Counter counter, String... labels) {
-    return getData(counter, labels).getValue();
-  }
-
-
-  private int getNumberOfLabels(Counter counter) {
-    return ((CounterSnapshot) counter.collect()).getData().size();
-  }
-
-  @Test
-  public void testIncrement() {
-    noLabels.inc();
-    assertEquals(1.0, getValue(noLabels), .001);
-    noLabels.inc(2);
-    assertEquals(3.0, getValue(noLabels), .001);
-    noLabels.withLabels().inc(4);
-    assertEquals(7.0, getValue(noLabels), .001);
-    noLabels.withLabels().inc();
-    assertEquals(8.0, getValue(noLabels), .001);
-  }
-    
-  @Test
-  public void testNegativeIncrementFails() {
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("Negative increment -1.0 is illegal for Counter metrics.");
-    noLabels.inc(-1);
-  }
-  
-  @Test
-  public void testEmptyCountersHaveNoLabels() {
-    assertEquals(1, getNumberOfLabels(noLabels));
-    assertEquals(0, getNumberOfLabels(labels));
-  }
-
-  @Test
-  public void testLabels() {
-    assertEquals(0, getNumberOfLabels(labels));
-    labels.withLabels("a").inc();
-    assertEquals(1, getNumberOfLabels(labels));
-    assertEquals(1.0, getValue(labels, "l", "a"), .001);
-    labels.withLabels("b").inc(3);
-    assertEquals(2, getNumberOfLabels(labels));
-    assertEquals(1.0, getValue(labels, "l", "a"), .001);
-    assertEquals(3.0, getValue(labels, "l", "b"), .001);
-  }
-
-  @Test
-  public void testTotalStrippedFromName() {
-    Counter counter = Counter.newBuilder()
-            .withName("my_counter_total")
-            .withUnit(Unit.SECONDS)
-            .build();
-    Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-    assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
-
-    counter = Counter.newBuilder()
-            .withName("my_counter")
-            .build();
-    protobufData = new PrometheusProtobufWriter().convert(counter.collect());
-    assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
-  }
-
-  @Test
-  public void testSnapshotComplete() {
-    long before = System.currentTimeMillis();
-    Counter counter = Counter.newBuilder()
-            .withName("test_seconds_total")
-            .withUnit(Unit.SECONDS)
-            .withHelp("help message")
-            .withConstLabels(Labels.of("const1name", "const1value", "const2name", "const2value"))
-            .withLabelNames("path", "status")
-            .build();
-    counter.withLabels("/", "200").inc(2);
-    counter.withLabels("/", "500").inc();
-    CounterSnapshot snapshot = (CounterSnapshot) counter.collect();
-    Assert.assertEquals("test_seconds", snapshot.getMetadata().getName());
-    Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
-    Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
-    Assert.assertEquals(2, snapshot.getData().size());
-    Iterator<CounterSnapshot.CounterData> iter = snapshot.getData().iterator();
-    // data is ordered by labels, so 200 comes before 500
-    CounterSnapshot.CounterData data = iter.next();
-    Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
-    Assert.assertEquals(2, data.getValue(), 0.0001);
-    Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
-    Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
-    // 500
-    data = iter.next();
-    Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "500"), data.getLabels());
-    Assert.assertEquals(1, data.getValue(), 0.0001);
-    Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
-    Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
-  }
-
-  @Test
-  public void testIncWithExemplar() throws Exception {
-    noLabels.incWithExemplar(Labels.of("key", "value"));
-    assertExemplar(noLabels, 1.0, "key", "value");
-
-    Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
-
-    noLabels.incWithExemplar(Labels.EMPTY);
-    assertExemplar(noLabels, 1.0);
-
-    Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
-
-    noLabels.incWithExemplar(3, Labels.of("key1", "value1", "key2", "value2"));
-    assertExemplar(noLabels, 3, "key1", "value1", "key2", "value2");
-  }
-
-  private void assertExemplar(Counter counter, double value, String... labels) {
-    Exemplar exemplar = getData(counter).getExemplar();
-    Assert.assertEquals(value, exemplar.getValue(), 0.0001);
-    assertEquals(Labels.of(labels), exemplar.getLabels());
-  }
-
-  @Test
-  public void testExemplarSampler() throws Exception {
-    final Exemplar exemplar1 = Exemplar.newBuilder()
-            .withValue(2.0)
-            .withTraceId("abc")
-            .withSpanId("123")
-            .build();
-    final Exemplar exemplar2 = Exemplar.newBuilder()
-            .withValue(1.0)
-            .withTraceId("def")
-            .withSpanId("456")
-            .build();
-    final Exemplar exemplar3 = Exemplar.newBuilder()
-            .withValue(1.0)
-            .withTraceId("123")
-            .withSpanId("abc")
-            .build();
-    final Exemplar customExemplar = Exemplar.newBuilder()
-            .withValue(1.0)
-            .withTraceId("bab")
-            .withSpanId("cdc")
-            .withLabels(Labels.of("test", "test"))
-            .build();
-    SpanContextSupplier scs = new SpanContextSupplier() {
-      private int callNumber = 0;
-      @Override
-      public String getTraceId() {
-        switch (callNumber) {
-          case 1:
-            return "abc";
-          case 3:
-            return "def";
-          case 4:
-            return "123";
-          case 5:
-            return "bab";
-          default:
-            throw new RuntimeException("unexpected call");
-        }
-      }
-
-      @Override
-      public String getSpanId() {
-        switch (callNumber) {
-          case 1:
-            return "123";
-          case 3:
-            return "456";
-          case 4:
-            return "abc";
-          case 5:
-            return "cdc";
-          default:
-            throw new RuntimeException("unexpected call");
-        }
-      }
-
-      @Override
-      public boolean isSampled() {
-        callNumber++;
-        if (callNumber == 2) {
-          return false;
-        }
-        return true;
-      }
-    };
-    Counter counter = Counter.newBuilder()
-            .withExemplarConfig(ExemplarConfig.newBuilder().withSpanContextSupplier(scs).build())
-            .withName("count_total")
-            .build();
-
-    counter.inc(2.0);
-    assertExemplarEquals(exemplar1, getData(counter).getExemplar());
-
-    Thread.sleep(2 * exemplarSampleIntervalMillis);
-
-    counter.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
-    assertExemplarEquals(exemplar1, getData(counter).getExemplar());
-
-    Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
-
-    counter.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
-    assertExemplarEquals(exemplar1, getData(counter).getExemplar());
-
-    Thread.sleep(2 * exemplarSampleIntervalMillis);
-
-    counter.inc(1.0); // sampled
-    assertExemplarEquals(exemplar2, getData(counter).getExemplar());
-
-    Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
-
-    counter.inc(1.0); // sampled
-    assertExemplarEquals(exemplar3, getData(counter).getExemplar());
-
-    Thread.sleep(2 * exemplarSampleIntervalMillis);
-
-    counter.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
-    assertExemplarEquals(customExemplar, getData(counter).getExemplar());
-  }
-
-  @Test
-  public void testExemplarSamplerDisabled() {
-    Counter counter = Counter.newBuilder()
-            //.withExemplarSampler((inc, prev) -> {throw new RuntimeException("unexpected call to exemplar sampler");})
-            .withName("count_total")
-            .withoutExemplars()
-            .build();
-    counter.incWithExemplar(3.0, Labels.of("a", "b"));
-    Assert.assertNull(getData(counter).getExemplar());
-    counter.inc(2.0);
-    Assert.assertNull(getData(counter).getExemplar());
-  }
+    Counter noLabels;
+    Counter labels;
+    private static final long exemplarSampleIntervalMillis = 10;
+    private static final long exemplarMinAgeMillis = 100;
+    SpanContext origSpanContext;
+
+    @Rule
+    public final ExpectedException thrown = none();
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        noLabels = Counter.newBuilder().withName("nolabels").build();
+        labels = Counter.newBuilder().withName("labels")
+                .withHelp("help")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("l")
+                .build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(noLabels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(noLabels, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(labels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(labels, exemplarMinAgeMillis);
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    private CounterSnapshot.CounterData getData(Counter counter, String... labels) {
+        return counter.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("counter with labels " + labels + " not found"));
+    }
+
+    private double getValue(Counter counter, String... labels) {
+        return getData(counter, labels).getValue();
+    }
+
+
+    private int getNumberOfLabels(Counter counter) {
+        return ((CounterSnapshot) counter.collect()).getData().size();
+    }
+
+    @Test
+    public void testIncrement() {
+        noLabels.inc();
+        assertEquals(1.0, getValue(noLabels), .001);
+        noLabels.inc(2);
+        assertEquals(3.0, getValue(noLabels), .001);
+        noLabels.withLabels().inc(4);
+        assertEquals(7.0, getValue(noLabels), .001);
+        noLabels.withLabels().inc();
+        assertEquals(8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testNegativeIncrementFails() {
+        thrown.expect(IllegalArgumentException.class);
+        thrown.expectMessage("Negative increment -1.0 is illegal for Counter metrics.");
+        noLabels.inc(-1);
+    }
+
+    @Test
+    public void testEmptyCountersHaveNoLabels() {
+        assertEquals(1, getNumberOfLabels(noLabels));
+        assertEquals(0, getNumberOfLabels(labels));
+    }
+
+    @Test
+    public void testLabels() {
+        assertEquals(0, getNumberOfLabels(labels));
+        labels.withLabels("a").inc();
+        assertEquals(1, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        labels.withLabels("b").inc(3);
+        assertEquals(2, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        assertEquals(3.0, getValue(labels, "l", "b"), .001);
+    }
+
+    @Test
+    public void testTotalStrippedFromName() {
+        Counter counter = Counter.newBuilder()
+                .withName("my_counter_total")
+                .withUnit(Unit.SECONDS)
+                .build();
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+
+        counter = Counter.newBuilder()
+                .withName("my_counter")
+                .build();
+        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+    }
+
+    @Test
+    public void testSnapshotComplete() {
+        long before = System.currentTimeMillis();
+        Counter counter = Counter.newBuilder()
+                .withName("test_seconds_total")
+                .withUnit(Unit.SECONDS)
+                .withHelp("help message")
+                .withConstLabels(Labels.of("const1name", "const1value", "const2name", "const2value"))
+                .withLabelNames("path", "status")
+                .build();
+        counter.withLabels("/", "200").inc(2);
+        counter.withLabels("/", "500").inc();
+        CounterSnapshot snapshot = (CounterSnapshot) counter.collect();
+        Assert.assertEquals("test_seconds", snapshot.getMetadata().getName());
+        Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
+        Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
+        Assert.assertEquals(2, snapshot.getData().size());
+        Iterator<CounterSnapshot.CounterData> iter = snapshot.getData().iterator();
+        // data is ordered by labels, so 200 comes before 500
+        CounterSnapshot.CounterData data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
+        Assert.assertEquals(2, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+        // 500
+        data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "500"), data.getLabels());
+        Assert.assertEquals(1, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+    }
+
+    @Test
+    public void testIncWithExemplar() throws Exception {
+        noLabels.incWithExemplar(Labels.of("key", "value"));
+        assertExemplar(noLabels, 1.0, "key", "value");
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(Labels.EMPTY);
+        assertExemplar(noLabels, 1.0);
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(3, Labels.of("key1", "value1", "key2", "value2"));
+        assertExemplar(noLabels, 3, "key1", "value1", "key2", "value2");
+    }
+
+    private void assertExemplar(Counter counter, double value, String... labels) {
+        Exemplar exemplar = getData(counter).getExemplar();
+        Assert.assertEquals(value, exemplar.getValue(), 0.0001);
+        assertEquals(Labels.of(labels), exemplar.getLabels());
+    }
+
+    @Test
+    public void testExemplarSampler() throws Exception {
+        final Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(2.0)
+                .withTraceId("abc")
+                .withSpanId("123")
+                .build();
+        final Exemplar exemplar2 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("def")
+                .withSpanId("456")
+                .build();
+        final Exemplar exemplar3 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("123")
+                .withSpanId("abc")
+                .build();
+        final Exemplar customExemplar = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("bab")
+                .withSpanId("cdc")
+                .withLabels(Labels.of("test", "test"))
+                .build();
+        SpanContext spanContext = new SpanContext() {
+            private int callNumber = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                switch (callNumber) {
+                    case 1:
+                        return "abc";
+                    case 3:
+                        return "def";
+                    case 4:
+                        return "123";
+                    case 5:
+                        return "bab";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                switch (callNumber) {
+                    case 1:
+                        return "123";
+                    case 3:
+                        return "456";
+                    case 4:
+                        return "abc";
+                    case 5:
+                        return "cdc";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callNumber++;
+                if (callNumber == 2) {
+                    return false;
+                }
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Counter counter = Counter.newBuilder()
+                .withName("count_total")
+                .build();
+
+        SpanContextSupplier.setSpanContext(spanContext);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(counter, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(counter, exemplarSampleIntervalMillis);
+
+        counter.inc(2.0);
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar2, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar3, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
+        assertExemplarEquals(customExemplar, getData(counter).getExemplar());
+    }
+
+    @Test
+    public void testExemplarSamplerDisabled() {
+        Counter counter = Counter.newBuilder()
+                //.withExemplarSampler((inc, prev) -> {throw new RuntimeException("unexpected call to exemplar sampler");})
+                .withName("count_total")
+                .withoutExemplars()
+                .build();
+        counter.incWithExemplar(3.0, Labels.of("a", "b"));
+        Assert.assertNull(getData(counter).getExemplar());
+        counter.inc(2.0);
+        Assert.assertNull(getData(counter).getExemplar());
+    }
 }u}(jJ  (aeb9c1ee105a33bec27006dce3200840d03a80acj  Oprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/GaugeTest.javaj  modifiedj  Kj  K
j  K%j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGaugeTest.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGaugeTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FGaugeTest.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X
  @@ -1,12 +1,14 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
-import io.prometheus.metrics.exemplars.DefaultExemplarConfig;
-import io.prometheus.metrics.exemplars.ExemplarConfig;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.GaugeSnapshot;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.observer.Timer;
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -24,16 +26,18 @@ public class GaugeTest {
 
     private Gauge noLabels, labels;
 
-    @BeforeClass
-    public static void beforeClass() {
-        DefaultExemplarConfig.setSampleInterval(exemplarSampleIntervalMillis, TimeUnit.MILLISECONDS);
-        DefaultExemplarConfig.setMinAge(exemplarMinAgeMillis, TimeUnit.MILLISECONDS);
-    }
+    private SpanContext origSpanContext;
 
     @Before
     public void setUp() {
         noLabels = Gauge.newBuilder().withName("nolabels").build();
         labels = Gauge.newBuilder().withName("labels").withLabelNames("l").build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
     }
 
     private GaugeSnapshot.GaugeData getData(Gauge gauge, String... labels) {
@@ -123,11 +127,11 @@ public void testExemplarSampler() throws Exception {
                 .withSpanId("cdc")
                 .withLabels(Labels.of("test", "test"))
                 .build();
-        SpanContextSupplier scs = new SpanContextSupplier() {
+        SpanContext spanContext = new SpanContext() {
             private int callNumber = 0;
 
             @Override
-            public String getTraceId() {
+            public String getCurrentTraceId() {
                 switch (callNumber) {
                     case 1:
                         return "abc";
@@ -143,7 +147,7 @@ public String getTraceId() {
             }
 
             @Override
-            public String getSpanId() {
+            public String getCurrentSpanId() {
                 switch (callNumber) {
                     case 1:
                         return "123";
@@ -159,19 +163,26 @@ public String getSpanId() {
             }
 
             @Override
-            public boolean isSampled() {
+            public boolean isCurrentSpanSampled() {
                 callNumber++;
                 if (callNumber == 2) {
                     return false;
                 }
                 return true;
             }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
         };
         Gauge gauge = Gauge.newBuilder()
-                .withExemplarConfig(ExemplarConfig.newBuilder().withSpanContextSupplier(scs).build())
                 .withName("my_gauge")
                 .build();
 
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(gauge, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(gauge, exemplarSampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
         gauge.inc(2.0);
         assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
 u}(jJ  (c5cf15f140a89b4bc3be5ec955fdd3d71619b1dcj  Sprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/HistogramTest.javaj  modifiedj  K0j  Kj  KKj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2FHistogramTest.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -1,17 +1,20 @@
 package io.prometheus.metrics.core;
 
-import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.expositionformat.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
-import io.prometheus.metrics.exemplars.ExemplarConfig;
+import io.prometheus.metrics.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.ClassicHistogramBucket;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.HistogramSnapshot;
 import io.prometheus.metrics.model.Labels;
 import io.prometheus.metrics.observer.DistributionObserver;
+import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.lang.reflect.Field;
@@ -42,6 +45,18 @@ public class HistogramTest {
 
     private static final double RESET_DURATION_REACHED = -123.456; // just a random value indicating that we should simulate that the reset duration has been reached
 
+    private SpanContext origSpanContext;
+
+    @Before
+    public void setUp() {
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
     /**
      * Mimic the tests in client_golang.
      */
@@ -684,38 +699,41 @@ public void testDefaults() {
 
     @Test
     public void testExemplarsClassicHistogram() throws Exception {
-        SpanContextSupplier spanContextSupplier = new SpanContextSupplier() {
+        SpanContext spanContext = new SpanContext() {
             int callCount = 0;
 
             @Override
-            public String getTraceId() {
+            public String getCurrentTraceId() {
                 return "traceId-" + callCount;
             }
 
             @Override
-            public String getSpanId() {
+            public String getCurrentSpanId() {
                 return "spanId-" + callCount;
             }
 
             @Override
-            public boolean isSampled() {
+            public boolean isCurrentSpanSampled() {
                 callCount++;
                 return true;
             }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
         };
-        long sampleIntervalMillis = 10;
         Histogram histogram = Histogram.newBuilder()
                 .withName("test")
                 // The default number of Exemplars is 4.
                 // Use 5 buckets to verify that the exemplar sample is configured with the buckets.
                 .withClassicBuckets(1.0, 2.0, 3.0, 4.0, Double.POSITIVE_INFINITY)
-                .withExemplarConfig(ExemplarConfig.newBuilder()
-                        .withSpanContextSupplier(spanContextSupplier)
-                        .withSampleInterval(sampleIntervalMillis, TimeUnit.MILLISECONDS)
-                        .build())
                 .withLabelNames("path")
                 .build();
 
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
         Exemplar ex1a = Exemplar.newBuilder()
                 .withValue(0.5)
                 .withSpanId("spanId-1")
@@ -847,19 +865,19 @@ private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... la
     }
 
     @Test
-    public void testCustomExemplarsClassicHistogram() throws InterruptedException {
+    public void testCustomExemplarsClassicHistogram() throws InterruptedException, NoSuchFieldException, IllegalAccessException {
 
         // TODO: This was copied from the old simpleclient, can probably be refactored.
 
-        long sampleIntervalMillis = 10;
         Histogram histogram = Histogram.newBuilder()
                 .withName("test")
                 .withExemplars()
-                .withExemplarConfig(ExemplarConfig.newBuilder()
-                        .withSampleInterval(sampleIntervalMillis, TimeUnit.MILLISECONDS)
-                        .withMinAge(sampleIntervalMillis * 3, TimeUnit.MILLISECONDS)
-                        .build())
                 .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(histogram, 3 * sampleIntervalMillis);
+
         Labels labels = Labels.of("mapKey1", "mapValue1", "mapKey2", "mapValue2");
 
         histogram.observeWithExemplar(0.5, Labels.of("key", "value"));
@@ -913,38 +931,41 @@ private void assertExemplar(Histogram histogram, double value, String... labels)
 
 
     @Test
-    public void testExemplarsNativeHistogram() {
+    public void testExemplarsNativeHistogram() throws NoSuchFieldException, IllegalAccessException {
 
-        SpanContextSupplier spanContextSupplier = new SpanContextSupplier() {
+        SpanContext spanContext = new SpanContext() {
             int callCount = 0;
 
             @Override
-            public String getTraceId() {
+            public String getCurrentTraceId() {
                 return "traceId-" + callCount;
             }
 
             @Override
-            public String getSpanId() {
+            public String getCurrentSpanId() {
                 return "spanId-" + callCount;
             }
 
             @Override
-            public boolean isSampled() {
+            public boolean isCurrentSpanSampled() {
                 callCount++;
                 return true;
             }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
         };
-        long sampleIntervalMillis = 10;
         Histogram histogram = Histogram.newBuilder()
                 .withName("test")
                 .nativeOnly()
-                .withExemplarConfig(ExemplarConfig.newBuilder()
-                        .withSpanContextSupplier(spanContextSupplier)
-                        .withSampleInterval(sampleIntervalMillis, TimeUnit.MILLISECONDS)
-                        .build())
                 .withLabelNames("path")
                 .build();
 
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
         Exemplar ex1 = Exemplar.newBuilder()
                 .withValue(3.11)
                 .withSpanId("spanId-1")u}(jJ  (839750ba4ebd6ddb91d688d22483ea3d1bccaca2j  hprometheus-metrics-core/src/test/java/io/prometheus/metrics/exemplars/ExemplarSamplerConfigTestUtil.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfigTestUtil.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfigTestUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerConfigTestUtil.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,30 @@
+package io.prometheus.metrics.exemplars;
+
+import io.prometheus.metrics.core.Counter;
+
+import java.lang.reflect.Field;
+
+public class ExemplarSamplerConfigTestUtil {
+
+    private static ExemplarSamplerConfig getConfig(Object metric, String fieldName) throws NoSuchFieldException, IllegalAccessException {
+        Field configField = metric.getClass().getDeclaredField(fieldName);
+        configField.setAccessible(true);
+        return (ExemplarSamplerConfig) configField.get(metric);
+    }
+
+    private static void setRetentionPeriod(ExemplarSamplerConfig config, String name, long value) throws IllegalAccessException, NoSuchFieldException {
+        Field field = config.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        field.set(config, value);
+    }
+
+    public static void setMinRetentionPeriodMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "minRetentionPeriodMillis", value);
+    }
+
+    public static void setSampleIntervalMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "sampleIntervalMillis", value);
+    }
+}u}(jJ  (6cc208097e762980b4dd72893032d6ba15708771j  ^prometheus-metrics-core/src/test/java/io/prometheus/metrics/exemplars/ExemplarSamplerTest.javaj  modifiedj  K8j  K1j  Kij  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerTest.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2FExemplarSamplerTest.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X(  @@ -1,70 +1,93 @@
 package io.prometheus.metrics.exemplars;
 
+import io.prometheus.metrics.exemplars.tracer.initializer.SpanContextSupplier;
 import io.prometheus.metrics.model.Exemplar;
 import io.prometheus.metrics.model.Exemplars;
 import io.prometheus.metrics.model.Label;
+import io.prometheus.metrics.util.Scheduler;
+import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
-import java.util.concurrent.TimeUnit;
-
 public class ExemplarSamplerTest {
 
     private final int tick = 10; // Time step in milliseconds. Make this larger if the test is flaky.
     private final int sampleInterval = 10 * tick; // do not change this
     private final int minAge = 50 * tick; // do not change this
     private final int maxAge = 200 * tick; // do not change this
 
-    private static class SpanContextSupplier implements io.prometheus.client.exemplars.tracer.common.SpanContextSupplier {
+    private ExemplarSamplerConfig makeConfig(double... buckets) {
+        return new ExemplarSamplerConfig(
+                minAge,
+                maxAge,
+                sampleInterval,
+                buckets.length == 0 ? 4 : buckets.length, // number of exemplars
+                buckets.length == 0 ? null : buckets
+        );
+    }
+
+
+    private static class SpanContext implements io.prometheus.metrics.exemplars.tracer.common.SpanContext {
 
         int callCount = 0;
         boolean isSampled = true;
+        boolean isExemplar = false;
 
         @Override
-        public String getTraceId() {
+        public String getCurrentTraceId() {
             return "" + (callCount++);
         }
 
         @Override
-        public String getSpanId() {
+        public String getCurrentSpanId() {
             return "" + callCount;
         }
 
         @Override
-        public boolean isSampled() {
+        public boolean isCurrentSpanSampled() {
             return isSampled;
         }
+
+        @Override
+        public void markCurrentSpanAsExemplar() {
+            isExemplar = true;
+        }
     }
 
     @Test
     public void testCustomExemplarsBuckets() throws Exception {
         // TODO
     }
 
+    private io.prometheus.metrics.exemplars.tracer.common.SpanContext origContext;
+
+    @Before
+    public void setUp() {
+        origContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origContext);
+    }
+
     @Test
     public void testIsSampled() throws Exception {
-        SpanContextSupplier scs = new SpanContextSupplier();
-        scs.isSampled = false;
-        ExemplarSampler sampler = DefaultExemplarSampler.newInstance(ExemplarConfig.newBuilder()
-                .withSpanContextSupplier(scs)
-                .withMinAge(minAge, TimeUnit.MILLISECONDS)
-                .withMaxAge(maxAge, TimeUnit.MILLISECONDS)
-                .withSampleInterval(sampleInterval, TimeUnit.MILLISECONDS)
-                .build());
+        SpanContext context = new SpanContext();
+        context.isSampled = false;
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
         Thread.sleep(tick); // t = 1 tick
         sampler.observe(0.3); // no sampled, because isSampled() returns false
         assertExemplars(sampler); // empty
     }
 
     @Test
     public void testDefaultConfigHasFourExemplars() throws Exception {
-        SpanContextSupplier scs = new SpanContextSupplier();
-        ExemplarSampler sampler = DefaultExemplarSampler.newInstance(ExemplarConfig.newBuilder()
-                .withSpanContextSupplier(scs)
-                .withMinAge(minAge, TimeUnit.MILLISECONDS)
-                .withMaxAge(maxAge, TimeUnit.MILLISECONDS)
-                .withSampleInterval(sampleInterval, TimeUnit.MILLISECONDS)
-                .build());
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
         Thread.sleep(tick); // t = 1 tick
         sampler.observe(0.3);
         Thread.sleep(sampleInterval + tick); // t = 12 tick
@@ -81,14 +104,9 @@ public void testDefaultConfigHasFourExemplars() throws Exception {
 
     @Test
     public void testEmptyBuckets() throws Exception {
-        SpanContextSupplier scs = new SpanContextSupplier();
-        ExemplarSampler sampler = DefaultExemplarSampler.newInstance(ExemplarConfig.newBuilder()
-                .withSpanContextSupplier(scs)
-                .withMinAge(minAge, TimeUnit.MILLISECONDS)
-                .withMaxAge(maxAge, TimeUnit.MILLISECONDS)
-                .withSampleInterval(sampleInterval, TimeUnit.MILLISECONDS)
-                .withBuckets()
-                .build());
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(Double.POSITIVE_INFINITY));
         Thread.sleep(tick); // t = 1 tick
         sampler.observe(0.8); // observed in the +Inf bucket
         Thread.sleep(sampleInterval + tick); // t = 12 tick
@@ -99,16 +117,10 @@ public void testEmptyBuckets() throws Exception {
 
     @Test
     public void testDefaultExemplarsBuckets() throws Exception {
-        SpanContextSupplier scs = new SpanContextSupplier();
-        ExemplarSampler sampler = DefaultExemplarSampler.newInstance(ExemplarConfig.newBuilder()
-                .withSpanContextSupplier(scs)
-                .withBuckets(0.2, 0.4, 0.6, 0.8, 1.0)
-                .withMinAge(minAge, TimeUnit.MILLISECONDS)
-                .withMaxAge(maxAge, TimeUnit.MILLISECONDS)
-                .withSampleInterval(sampleInterval, TimeUnit.MILLISECONDS)
-                .build());
-
-        ((DefaultExemplarSampler) sampler).awaitInitialization();
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(0.2, 0.4, 0.6, 0.8, 1.0, Double.POSITIVE_INFINITY));
+        Scheduler.awaitInitialization();
         Thread.sleep(tick); // t = 1 tick
         sampler.observe(0.3);
         sampler.observe(0.5); // not observed, previous observation is less than sample interval ms ago
@@ -138,23 +150,18 @@ public void testCustomExemplarsNoBuckets() throws Exception {
 
     @Test
     public void testDefaultExemplarsNoBuckets() throws Exception {
-        SpanContextSupplier scs = new SpanContextSupplier();
-        ExemplarSampler sampler = DefaultExemplarSampler.newInstance(ExemplarConfig.newBuilder()
-                .withSpanContextSupplier(scs)
-                .withNumberOfExemplars(4)
-                .withMinAge(minAge, TimeUnit.MILLISECONDS)
-                .withMaxAge(maxAge, TimeUnit.MILLISECONDS)
-                .withSampleInterval(sampleInterval, TimeUnit.MILLISECONDS)
-                .build());
-        ((DefaultExemplarSampler) sampler).awaitInitialization();
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Scheduler.awaitInitialization();
         Thread.sleep(tick);           // t = 1 tick
         sampler.observe(1);    // observed
         assertExemplars(sampler, 1);
         sampler.observe(2);    // not observed, previous observation is less than sample interval ms ago
         Thread.sleep(sampleInterval + tick); // t = 12 ticks
         sampler.observe(3);    // observed
         assertExemplars(sampler, 1, 3);
-        Thread.sleep(2*tick);    // t = 14 ticks
+        Thread.sleep(2 * tick);    // t = 14 ticks
         sampler.observe(4);    // not observed, previous observation is less than sample interval ms ago
         Thread.sleep(sampleInterval + tick); // t = 25 ticks
         sampler.observe(5);    // observedu      }(jJ  (3c397b703691d908a5f460ce56d5d9b8d0172cbcj  :prometheus-metrics-exposition-formats/generate-protobuf.shj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9previous_filename2prometheus-exposition-formats/generate-protobuf.shu}(jJ  (916c5c0939209d9b6cd4d0b79552eb36215d3cbcj  -prometheus-metrics-exposition-formats/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X   @@ -9,7 +9,7 @@
         <version>0.16.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>prometheus-exposition-formats</artifactId>
+    <artifactId>prometheus-metrics-exposition-formats</artifactId>
     <packaging>bundle</packaging>
 
     <name>Prometheus Java Simpleclient</name>jd  %prometheus-exposition-formats/pom.xmlu}(jJ  (9eb827a9ac80894ac2740fac5a4b9479b4667f2aj  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/expositionformat/protobuf/generated/com_google_protobuf_3_21_7/Metrics.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fexpositionformat%2Fprotobuf%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fexpositionformat%2Fprotobuf%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fexpositionformat%2Fprotobuf%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  prometheus-exposition-formats/src/main/generated/io/prometheus/expositionformat/protobuf/generated/com_google_protobuf_3_21_7/Metrics.javau}(jJ  (5b3a7d327e83caa9b21109af6533eff2204f4e1fj  sprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/OpenMetricsTextFormatWriter.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FOpenMetricsTextFormatWriter.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FOpenMetricsTextFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FOpenMetricsTextFormatWriter.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  kprometheus-exposition-formats/src/main/java/io/prometheus/expositionformat/OpenMetricsTextFormatWriter.javau}(jJ  (0214ed12d6822470db36913f8e165f8743cce201j  pprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusProtobufWriter.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusProtobufWriter.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  hprometheus-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusProtobufWriter.javau}(jJ  (0208ca385f6746ca0d17101ec03a2fcb6a0a24e8j  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusTextFormatWriter.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusTextFormatWriter.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusTextFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FPrometheusTextFormatWriter.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  jprometheus-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusTextFormatWriter.javau}(jJ  (2a08a9b96ae0050a7468f6187b7d9970b6bcd96dj  dprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/ProtobufUtil.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FProtobufUtil.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  \prometheus-exposition-formats/src/main/java/io/prometheus/expositionformat/ProtobufUtil.javau}(jJ  (c633432a50b3163e9a6e6fa0576b148d48888c2dj  fprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/TextFormatUtil.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FTextFormatUtil.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FTextFormatUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2FTextFormatUtil.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  ^prometheus-exposition-formats/src/main/java/io/prometheus/expositionformat/TextFormatUtil.javau}(jJ  (fe1afbdac640c52cd31fe113de49dd0ea543a031j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  =prometheus-exposition-formats/src/main/protobuf/metrics.protou}(jJ  (76534faa65466257818e098cf7ad5973a41b991ej  rprometheus-metrics-exposition-formats/src/test/java/io/prometheus/expositionformat/text/ExpositionFormatsTest.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  jprometheus-exposition-formats/src/test/java/io/prometheus/expositionformat/text/ExpositionFormatsTest.javau}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  7prometheus-metrics-exposition-formats/version-rules.xmlj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-exposition-formats%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9jd  /prometheus-exposition-formats/version-rules.xmlu}(jJ  (71bed933cf7c99f111155673913bb825769bf489j  !prometheus-metrics-tracer/pom.xmlj  addedj  K)j  K j  K)j  {https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  XV  @@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>client_java</artifactId>
+    <version>0.16.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer</artifactId>
+  <packaging>pom</packaging>
+
+  <name>Prometheus Java Span Context Supplier - Parent</name>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>io.opentelemetry</groupId>
+        <artifactId>opentelemetry-api</artifactId>
+        <version>1.15.0</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <modules>
+    <module>prometheus-metrics-tracer-common</module>
+    <module>prometheus-metrics-tracer-initializer</module>
+    <module>prometheus-metrics-tracer-otel</module>
+    <module>prometheus-metrics-tracer-otel-agent</module>
+  </modules>
+
+</project>u}(jJ  (e8c1ed7cc9f9fa83d94804628c3556159408743cj  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>0.16.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-common</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Java Span Context Supplier - Common</name>
+
+  <dependencies>
+  </dependencies>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>u}(jJ  (db95b951740a17dcb317aeecf596f2864e9d470aj  prometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/exemplars/tracer/common/SpanContext.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fcommon%2FSpanContext.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fcommon%2FSpanContext.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fcommon%2FSpanContext.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.exemplars.tracer.common;
+
+public interface SpanContext {
+
+  public static final String EXEMPLAR_ATTRIBUTE_NAME = "exemplar";
+  public static final String EXEMPLAR_ATTRIBUTE_VALUE = "true";
+
+  /**
+   * @return the current trace id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentTraceId();
+
+  /**
+   * @return the current span id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentSpanId();
+  
+  /**
+   * @return the state of the current Span. If this value is false a component before in the chain take the decision to not record it. Subsequent calling service have
+   * to respect this value in order not to have partial TraceID with only some Span in it. This value is important to be sure to choose a recorded Trace in Examplar
+   * sampling process
+   */
+  boolean isCurrentSpanSampled();
+
+  void markCurrentSpanAsExemplar();
+}u}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Lprometheus-metrics-tracer/prometheus-metrics-tracer-common/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jJ  (36e2f8c8c2cb258e4f3d2cd1f62e62752ff0b880j  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  addedj  K)j  K j  K)j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>0.16.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-initializer</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Java Span Context Supplier - Common</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>u}(jJ  (f6f52ff4e12d8f176e6218c1462d719fa3e93081j  prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/src/main/java/io/prometheus/metrics/exemplars/tracer/initializer/SpanContextSupplier.javaj  addedj  K-j  K j  K-j  X  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj  X  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Finitializer%2FSpanContextSupplier.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.exemplars.tracer.initializer;
+
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+import io.prometheus.metrics.exemplars.tracer.otel.OpenTelemetrySpanContext;
+import io.prometheus.metrics.exemplars.tracer.otel_agent.OpenTelemetryAgentSpanContext;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+public class SpanContextSupplier {
+
+    private static final AtomicReference<SpanContext> spanContextRef = new AtomicReference<SpanContext>();
+
+    public static void setSpanContext(SpanContext spanContext) {
+        spanContextRef.set(spanContext);
+    }
+
+    public static boolean hasSpanContext() {
+        return getSpanContext() != null;
+    }
+
+    public static SpanContext getSpanContext() {
+        return spanContextRef.get();
+    }
+
+    static {
+        try {
+            if (OpenTelemetrySpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetrySpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+        try {
+            if (OpenTelemetryAgentSpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetryAgentSpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel_agent dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+    }
+}u}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Qprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jJ  (2d8e3bf80625fd727efb41f893ef98929f47d18fj  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  addedj  KKj  K j  KKj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X	  @@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>0.16.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Java Span Context Supplier - OpenTelemetry Agent</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <relocations>
+                <relocation>
+                  <pattern>io.opentelemetry.api</pattern>
+                  <shadedPattern>io.opentelemetry.javaagent.shaded.io.opentelemetry.api</shadedPattern>
+                </relocation>
+              </relocations>
+              <artifactSet>
+                <excludes>
+                  <exclude>io.prometheus:prometheus-metrics-tracer-common</exclude>
+                </excludes>
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>u}(jJ  (64f0fca6ac9cb54b36ad44d70db63e3e12611fd8j  prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/src/main/java/io/prometheus/metrics/exemplars/tracer/otel_agent/OpenTelemetryAgentSpanContext.javaj  addedj  K4j  K j  K4j  X  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj  X  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj  X!  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  Xh  @@ -0,0 +1,52 @@
+package io.prometheus.metrics.exemplars.tracer.otel_agent;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+
+/**
+ * This is exactly the same as the {@code OpenTelemetrySpanContextSupplier}.
+ * However, the {@code io.opentelemetry.api} package is relocated to
+ * {@code io.opentelemetry.javaagent.shaded.io.opentelemetry.api} in the OpenTelemetry agent.
+ */
+public class OpenTelemetryAgentSpanContext implements SpanContext {
+
+  public static boolean isAvailable() {
+    try {
+      OpenTelemetryAgentSpanContext test = new OpenTelemetryAgentSpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+  @Override
+  public String getCurrentTraceId() {
+    String traceId = Span.current().getSpanContext().getTraceId();
+    return TraceId.isValid(traceId) ? traceId : null;
+  }
+
+  @Override
+  public String getCurrentSpanId() {
+    String spanId = Span.current().getSpanContext().getSpanId();
+    return SpanId.isValid(spanId) ? spanId : null;
+  }
+
+  @Override
+  public boolean isCurrentSpanSampled() {
+    return Span.current().getSpanContext().isSampled();
+  }
+
+  @Override
+  public void markCurrentSpanAsExemplar() {
+    Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+  }
+}u}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Pprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jJ  (e3fd8f30f62cc50aff3ec9ab84dc8f80f7c7706bj  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  addedj  K2j  K j  K2j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  XA  @@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>0.16.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Java Span Context Supplier - OpenTelemetry</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+</project>u}(jJ  (e3d5c767a2c35519d3f65eff85a220a1656511d7j  prometheus-metrics-tracer/prometheus-metrics-tracer-otel/src/main/java/io/prometheus/metrics/exemplars/tracer/otel/OpenTelemetrySpanContext.javaj  addedj  K/j  K j  K/j  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexemplars%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.java?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X=  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.exemplars.tracer.otel;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.exemplars.tracer.common.SpanContext;
+
+public class OpenTelemetrySpanContext implements SpanContext {
+
+	public static boolean isAvailable() {
+    try {
+      OpenTelemetrySpanContext test = new OpenTelemetrySpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+	@Override
+	public String getCurrentTraceId() {
+		String traceId = Span.current().getSpanContext().getTraceId();
+		return TraceId.isValid(traceId) ? traceId : null;
+	}
+
+	@Override
+	public String getCurrentSpanId() {
+		String spanId = Span.current().getSpanContext().getSpanId();
+		return SpanId.isValid(spanId) ? spanId : null;
+	}
+
+	@Override
+	public boolean isCurrentSpanSampled() {
+		return Span.current().getSpanContext().isSampled();
+	}
+
+	@Override
+	public void markCurrentSpanAsExemplar() {
+		Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+	}
+}u}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Jprometheus-metrics-tracer/prometheus-metrics-tracer-otel/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(jJ  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  +prometheus-metrics-tracer/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/61d3f495b47818f91e51ac6fd82b517ceff43ec9/prometheus-metrics-tracer%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fversion-rules.xml?ref=61d3f495b47818f91e51ac6fd82b517ceff43ec9j  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileueu(b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1}(sha(b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1node_idEC_kwDOAHoJt9oAKGIwZDRhM2JjZDg1ZDA2ZGJlMjk3NGI3ZjZjNGU2Yzk1MTM5YjAzYjEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-06T15:38:42Zu	committer}(j1  Fabian Stäberj3  fabian@fstab.dej5  2023-08-06T15:38:42ZumessageRename Tomcat sampletree}(j)  (f61f1fbae9fb33f209279ffdba937996cd4afb7furlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f61f1fbae9fb33f209279ffdba937996cd4afb7fujA  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujA  dhttps://api.github.com/repos/prometheus/client_java/commits/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1html_urlYhttps://github.com/prometheus/client_java/commit/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/commentsj/  }(loginfstabidJ' j+  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jA  "https://api.github.com/users/fstabjM  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj7  }(jR  fstabjT  J' j+  MDQ6VXNlcjMzMDUzNQ==jV  2https://avatars.githubusercontent.com/u/330535?v=4jX  h3jA  "https://api.github.com/users/fstabjM  https://github.com/fstabj[  ,https://api.github.com/users/fstab/followersj]  9https://api.github.com/users/fstab/following{/other_user}j_  2https://api.github.com/users/fstab/gists{/gist_id}ja  9https://api.github.com/users/fstab/starred{/owner}{/repo}jc  0https://api.github.com/users/fstab/subscriptionsje  'https://api.github.com/users/fstab/orgsjg  (https://api.github.com/users/fstab/reposji  3https://api.github.com/users/fstab/events{/privacy}jk  2https://api.github.com/users/fstab/received_eventsjm  Userjo  uparents]}(j)  (0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jA  dhttps://api.github.com/repos/prometheus/client_java/commits/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1jM  Yhttps://github.com/prometheus/client_java/commit/0a60cf57fc42522d9b435f5718fcb1bfb306e2c1uastats}(totalK	additionsK	deletionsKufiles](}(j)  (2986a9cab6b151c4afe7180e24d0c1d701a76f74filenameGintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlstatusrenamedj  Kj  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1patchXe  @@ -9,11 +9,11 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>it-exporter-servlet-jakarta-sample</artifactId>
+    <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
 
-    <name>Integration Tests - Jakarta Servlet Sample</name>
+    <name>Integration Tests - Servlet with Tomcat Sample</name>
     <description>
-        Jakarta Servlet Sample for Integration Testing
+        Tomcat Sample for Integration Testing
     </description>
 
     <licenses>
@@ -51,7 +51,7 @@
     </dependencies>
 
     <build>
-        <finalName>servlet-jakarta-sample</finalName>
+        <finalName>servlet-tomcat-sample</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -66,7 +66,7 @@
                             <transformers>
                                 <transformer
                                         implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.jakarta.JakartaServletSample
+                                    <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.TomcatServletSample
                                     </mainClass>
                                 </transformer>
                             </transformers>previous_filenameHintegration-tests/it-exporter/it-exporter-servlet-jakarta-sample/pom.xmlu}(j)  (a0cfa4c70a9d46bf648e07fc3f7b6e10abc04accj  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/TomcatServletSample.javaj  renamedj  Kj  Kj  Kj  X	  https://github.com/prometheus/client_java/blob/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FTomcatServletSample.javaj  X  https://github.com/prometheus/client_java/raw/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FTomcatServletSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FTomcatServletSample.java?ref=b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1j  X  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.it.exporter.servlet.jakarta;
+package io.prometheus.metrics.it.exporter.servlet.tomcat;
 
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
@@ -20,7 +20,7 @@
 /**
  * Simple example using embedded Tomcat and the {@link PrometheusMetricsServlet}.
  */
-public class JakartaServletSample {
+public class TomcatServletSample {
     enum Mode {
         success,
         error
@@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("servlet-jakarta-sample");
+        info.infoLabelValues("servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")
@@ -80,7 +80,7 @@ public MetricSnapshot collect() {
         Tomcat tomcat = new Tomcat();
         tomcat.setPort(port);
 
-        Path tmpDir = Files.createTempDirectory("servlet-jakarta-sample-");
+        Path tmpDir = Files.createTempDirectory("servlet-tomcat-sample-");
         tomcat.setBaseDir(tmpDir.toFile().getAbsolutePath());
         Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
         Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());j  integration-tests/it-exporter/it-exporter-servlet-jakarta-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jakarta/JakartaServletSample.javau}(j)  (3ea60e097af4916a6d920dc638355d1095652ccaj  sintegration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj  https://github.com/prometheus/client_java/raw/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Ftest%2FExporterIT.java?ref=b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1j  X  @@ -40,7 +40,7 @@ public class ExporterIT {
     public static String[] sampleApps() {
         return new String[]{
                 "httpserver-sample",
-                "servlet-jakarta-sample",
+                "servlet-tomcat-sample",
         };
     }
 u}(j)  (12e41d58305d1320b02da6ac1acf1f88de820e29j  %integration-tests/it-exporter/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1/integration-tests%2Fit-exporter%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=b0d4a3bcd85d06dbe2974b7f6c4e6c95139b03b1j  X!  @@ -41,7 +41,7 @@
     </developers>
 
     <modules>
-        <module>it-exporter-servlet-jakarta-sample</module>
+        <module>it-exporter-servlet-tomcat-sample</module>
         <module>it-exporter-httpserver-sample</module>
         <module>it-exporter-test</module>
     </modules>ueu(11e277c8175094574a7a2259e5ca0cf0795fd424}(sha(11e277c8175094574a7a2259e5ca0cf0795fd424node_idEC_kwDOAHoJt9oAKDExZTI3N2M4MTc1MDk0NTc0YTdhMjI1OWU1Y2EwY2YwNzk1ZmQ0MjQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T20:51:15Zu	committer}(j  Fabian StäberjÁ  fabian@fstab.dejŁ  2023-08-29T20:51:15Zumessage6[maven-release-plugin] prepare release  v1.0.0-alpha-3tree}(j  (9ae3420f9a7728b7a508181b21aea9160fb32802urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9ae3420f9a7728b7a508181b21aea9160fb32802ujс  hhttps://api.github.com/repos/prometheus/client_java/git/commits/11e277c8175094574a7a2259e5ca0cf0795fd424
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujс  dhttps://api.github.com/repos/prometheus/client_java/commits/11e277c8175094574a7a2259e5ca0cf0795fd424html_urlYhttps://github.com/prometheus/client_java/commit/11e277c8175094574a7a2259e5ca0cf0795fd424comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/11e277c8175094574a7a2259e5ca0cf0795fd424/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jс  "https://api.github.com/users/fstabj݁  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujǁ  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jс  "https://api.github.com/users/fstabj݁  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (de20057419d811cc00b1b70476c7f0cc2253c2eejс  dhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2eej݁  Yhttps://github.com/prometheus/client_java/commit/de20057419d811cc00b1b70476c7f0cc2253c2eeuastats}(totalK	additionsKS	deletionsK^ufiles](}(j  (1aa6fad17f8448b4813133428045ea68c6ed65b7filenamebenchmarks/pom.xmlstatusmodifiedj  Kj  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j  (a8eeb5d4899c6e6dc613e80cf502fd8fd3f3297aj  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X.  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(j  (c431418ed65338d41f9b1faac6b53f8004f437c1j  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(j  (65484d6e1a964c16071cb9d2c5104c8e07518e43j  0examples/example-exemplars-tail-sampling/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(j  (467fb348d3540f7f12fd2280e78f7c5e2666e1c0j  ,examples/example-exporter-httpserver/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-httpserver%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-httpserver%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,12 +5,12 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>>Example - HTTPServer Exporter</name>
+    <name>&gt;Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>u}(j  (a90000162976d67cffbf4c60adc1df18b8061945j  /examples/example-exporter-opentelemetry/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-opentelemetry</artifactId>u}(j  (fc2cfb93084d8ea116fcdfcc9704281a42167ff9j  0examples/example-exporter-servlet-tomcat/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>example-exporter-servlet-tomcat</artifactId>u}(j  (df80b2dc93e1886d75231276c6887c3b6c5ae5c3j  examples/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  jhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fpom.xmlj&  ihttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/examples%2Fpom.xmlj(  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(j  (3b1f6e7bf6f480163b55858fa7b9c5b61743b7b9j  #integration-tests/it-common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-common%2Fpom.xmlj&  ~https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-common</artifactId>u}(j  (e4c82f5d72aa2f8536ab7f877eb5e1f4be2c814dj  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-httpserver-sample</artifactId>
@@ -59,8 +58,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (d540031c377c2d883381a847189618fdd76ed5f2j  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-jetty-sample</artifactId>
@@ -69,8 +68,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (14dc2264170775b2622597530fc42a07fc136e62j  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
@@ -64,8 +63,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
                                 </transformer>
                             </transformers>u}(j  (46210fb410338d1e258af347f3f4fde0e3c346baj  6integration-tests/it-exporter/it-exporter-test/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlx     j&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter-test</artifactId>u}(j  (d2250c1817fd3870b311892398f7c959dad4b037j  %integration-tests/it-exporter/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fit-exporter%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  Xz  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it-exporter</artifactId>
@@ -29,7 +29,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag> v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j  (606f76c19ed294e2c332c4a2fbd85311de0cd1b1j  integration-tests/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  shttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fpom.xmlj&  rhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration-tests%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X
  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration-tests</artifactId>u}(j  (4ca25a7cb88835a42732dce722982167d627406fj  #integration_tests/it_common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_common%2Fpom.xmlj&  ~https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(j  (b9273570915bf76bb9a52e590da4929148f866ddj  1integration_tests/it_exemplars_otel_agent/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(j  (9fb9b25466d0534e21016a36fded5f00accc97a5j  /integration_tests/it_exemplars_otel_sdk/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(j  (d64cb5d18c6caf1458c3c63a21c5a965978376aej  *integration_tests/it_java_versions/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_java_versions%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_java_versions%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(j  (30ad7acff60ea1dc2bc2a7ac1ef45ee9152f74d9j  #integration_tests/it_log4j2/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_log4j2%2Fpom.xmlj&  ~https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_log4j2%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(j  (b5ad62158281fc7bf60981f2d5440a07535b33f3j  (integration_tests/it_pushgateway/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_pushgateway%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_pushgateway%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(j  (d5778e6f8f81735ec093db9732f530e04b2c602ej  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(j  (2daf4dfacef43eb4557b60356fdea520c9724bf5j  integration_tests/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  shttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fpom.xmlj&  rhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/integration_tests%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j  (0f4da56c1caa54d068f026d59662a83347db9e81j  pom.xmlj!  modifiedj  Kj  Kj#  Kj$  _https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/pom.xmlj&  ^https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/pom.xmlj(  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag> v1.0.0-alpha-3</tag>
     </scm>
 
     <developers>u}(j  (8e1b23b441b35318db3678458aac791cb88836ecj  !prometheus-metrics-config/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  {https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-config%2Fpom.xmlj&  zhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-config%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(j  (29006bdf7c2df80aeb863facdea6ab8ba151e742j  prometheus-metrics-core/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  yhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-core%2Fpom.xmlj&  xhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-core%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(j  (390439f708c64cce40b7221a67c0610565455480j  *prometheus-metrics-exporter-common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-common%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X$  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-common</artifactId>u}(j  (3b14f9dc5951b00250a865dfc60b0b40a6ebb987j  .prometheus-metrics-exporter-httpserver/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-httpserver%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-httpserver%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-httpserver</artifactId>u}(j  (0a2cd8150ec347d082ce4093dcbb53e3f00bae3fj  1prometheus-metrics-exporter-opentelemetry/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  XI  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
@@ -163,7 +162,7 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j  (8bfdfc26181d5cc1dabb07cc6e6fddca5a46a561j  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(j  (fd3e07332d06c402d4511cad6bbfb1eb82029349j  -prometheus-metrics-exposition-formats/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exposition-formats%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-exposition-formats%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(j  (5e5624b09aaa5e795f56e4d58a3d3034ba34b7bcj   prometheus-metrics-model/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  zhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-model%2Fpom.xmlj&  yhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-model%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(j  (fabe5129d2da4978e1d3db7360108d3938f74815j  .prometheus-metrics-shaded-dependencies/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X(  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-dependencies</artifactId>u}(j  (5c1794ba45988c0c8fa5d39c218725621dd26e22j  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj!  modifiedj  Kj  Kj#  K	j$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  Xl  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
@@ -100,8 +99,8 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(j  (4f6338bd6f169c41d181612c37dc5b140bdafb54j  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X9  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>u}(j  (d0273c9a85bf9c97e875c17c6655d875e4e80dc1j  !prometheus-metrics-tracer/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  {https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fpom.xmlj&  zhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(j  (c9ec1c6a92f489d1f086c2df29a2e02251383e93j  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(j  (d20c307b3afa65db5e3507af4aaca53b0e7ee694j  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(j  (0c2f2fac8b597ad8b242a75fd51e846ddab9f013j  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(j  (d78f16b88328e3e8d4199ee7b3ac6d5f05c0cda7j  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(j  (2818fd55874acf3f2141ef5ad4f9c6f2cbed209cj  simpleclient/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  nhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient%2Fpom.xmlj&  mhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j  (756e119ae0748be0770f53e6db1a7a01395b192ej  simpleclient_bom/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  rhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_bom%2Fpom.xmlj&  qhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_bom%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j  (20569d35101deaf371c3d81ee1ccbf644299f400j  simpleclient_caffeine/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  whttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_caffeine%2Fpom.xmlj&  vhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_caffeine%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(j  (aa51669f15fe134a3f1983e0d4d7a6a0018fb0c2j  simpleclient_common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  uhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_common%2Fpom.xmlj&  thttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(j  (9620fb10b6d15feaf8372dcb98ed30da19bf92afj  simpleclient_dropwizard/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  yhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_dropwizard%2Fpom.xmlj&  xhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_dropwizard%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(j  (84c8754d7e530ac8e87ea4e3405e3b7c855e3b26j  $simpleclient_graphite_bridge/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  ~https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_graphite_bridge%2Fpom.xmlj&  }https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_graphite_bridge%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(j  (daa0976c8d643772d10c3412052659362604a07aj  simpleclient_guava/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  thttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_guava%2Fpom.xmlj&  shttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_guava%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(j  (29d10e14a5406aed92740e3c5d46249f41acd05dj  simpleclient_hibernate/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  xhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_hibernate%2Fpom.xmlj&  whttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_hibernate%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(j  (2919ee0558297f6a69055b7d5ce2e3b7859a0c8cj  simpleclient_hotspot/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  vhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_hotspot%2Fpom.xmlj&  uhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_hotspot%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(j  (b2e14542758826a5f683ceb407f245c672ffdbdfj  simpleclient_httpserver/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  yhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_httpserver%2Fpom.xmlj&  xhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_httpserver%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(j  (e6c9be70ef22d10c0619820508ded24f09aa27a0j  simpleclient_jetty/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  thttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_jetty%2Fpom.xmlj&  shttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_jetty%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(j  (0c90d94b7e8ca4be49c04418fa8b81f26542810bj  simpleclient_jetty_jdk8/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  yhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_jetty_jdk8%2Fpom.xmlj&  xhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_jetty_jdk8%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(j  (601b78883a48e92d3fc3db6eea861c2b7a4816faj  simpleclient_log4j/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  thttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_log4j%2Fpom.xmlj&  shttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_log4j%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(j  (278d3927a32539e72e24f0ffa7878ba4d6024bf6j  simpleclient_log4j2/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  uhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_log4j2%2Fpom.xmlj&  thttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_log4j2%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(j  (68c5cf33186f1830cc79f9d40c2ff0eb92509a9aj  simpleclient_logback/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  vhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_logback%2Fpom.xmlj&  uhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_logback%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(j  (14e1db742a2265a61a5f526ed9d6780f0047cbb8j   simpleclient_pushgateway/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  zhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_pushgateway%2Fpom.xmlj&  yhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_pushgateway%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(j  (9e50abf59e089ac5b84d244757d2df6f27e9947ej  simpleclient_servlet/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  vhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet%2Fpom.xmlj&  uhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(j  (e3e087827f08325ea527919aea26207e4cf5c0ccj  #simpleclient_servlet_common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  }https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet_common%2Fpom.xmlj&  |https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet_common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(j  (f714b6fae44739fb5ea7b935561d8284cbe8225aj  $simpleclient_servlet_jakarta/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  ~https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet_jakarta%2Fpom.xmlj&  }https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_servlet_jakarta%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(j  (8b5543dd4b501c4fb38e8f142ab16426b5e410b3j  simpleclient_spring_web/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  yhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_spring_web%2Fpom.xmlj&  xhttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_spring_web%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(j  (c98b788ead7ca38ec60ea0d92b8400ec5c849707j  simpleclient_tracer/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  uhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fpom.xmlj&  thttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j  (1b1381afc0dd5b1f10860cf4324fa4be44d062a0j  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j  (01558b9ee33ade44a07978646f82d0a2354382acj  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(j  (15120bf103fe3eb6f1d82fbc8a0fadf8ce3cb1d3j  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  https://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj&  https://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-3</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(j  (dadab7e3e7f8f4fd0bc0aad027a3451180d8a93aj  simpleclient_vertx/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  thttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_vertx%2Fpom.xmlj&  shttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_vertx%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j  (75dd831a8eb955671c27f558b6e0beef6aacf787j  simpleclient_vertx4/pom.xmlj!  modifiedj  Kj  Kj#  Kj$  uhttps://github.com/prometheus/client_java/blob/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_vertx4%2Fpom.xmlj&  thttps://github.com/prometheus/client_java/raw/11e277c8175094574a7a2259e5ca0cf0795fd424/simpleclient_vertx4%2Fpom.xmlj(  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=11e277c8175094574a7a2259e5ca0cf0795fd424j*  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-3</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(d55b4b889cd72c81d0cd0192b03ba874f0acfd1b}(sha(d55b4b889cd72c81d0cd0192b03ba874f0acfd1bnode_idEC_kwDOAHoJt9oAKGQ1NWI0Yjg4OWNkNzJjODFkMGNkMDE5MmIwM2JhODc0ZjBhY2ZkMWIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(j>  Fabian Stäberj@  fabian@fstab.dejB  2023-08-29T20:19:20ZumessageAdd OpenTelemetry Exportertree}(j6  (46e3f2a5658e2169651c029ceabebf62d0587addurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/46e3f2a5658e2169651c029ceabebf62d0587addujN  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujN  dhttps://api.github.com/repos/prometheus/client_java/commits/d55b4b889cd72c81d0cd0192b03ba874f0acfd1bhtml_urlYhttps://github.com/prometheus/client_java/commit/d55b4b889cd72c81d0cd0192b03ba874f0acfd1bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/commentsj<  }(loginfstabidJ' j8  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jN  "https://api.github.com/users/fstabjZ  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujD  }(j_  fstabja  J' j8  MDQ6VXNlcjMzMDUzNQ==jc  2https://avatars.githubusercontent.com/u/330535?v=4je  h3jN  "https://api.github.com/users/fstabjZ  https://github.com/fstabjh  ,https://api.github.com/users/fstab/followersjj  9https://api.github.com/users/fstab/following{/other_user}jl  2https://api.github.com/users/fstab/gists{/gist_id}jn  9https://api.github.com/users/fstab/starred{/owner}{/repo}jp  0https://api.github.com/users/fstab/subscriptionsjr  'https://api.github.com/users/fstab/orgsjt  (https://api.github.com/users/fstab/reposjv  3https://api.github.com/users/fstab/events{/privacy}jx  2https://api.github.com/users/fstab/received_eventsjz  Userj|  uparents]}(j6  (732a6c14edd2ce6a29a3ebf230ff058cbe867006jN  dhttps://api.github.com/repos/prometheus/client_java/commits/732a6c14edd2ce6a29a3ebf230ff058cbe867006jZ  Yhttps://github.com/prometheus/client_java/commit/732a6c14edd2ce6a29a3ebf230ff058cbe867006uastats}(totalMX	additionsM	deletionsM`ufiles](}(j6  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedj  Kj  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bpatchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(j6  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953j  2examples/example-exemplars-tail-sampling/README.mdj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(j6  (ed293444607ffb9985c6670a77cc6042b9f84eddj  <examples/example-exemplars-tail-sampling/docker-compose.yamlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(j6  (81c6d573c5f3130cacfdc28c011a18a260bcd288j  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j6  (e91ade6aceaf818d176460321559b0b310dcab3dj  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j6  (8bdf213ec9a35830a610393c3496be82b3232d26j  .examples/example-exporter-httpserver/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(j6  (a425c326850318d40de104ce142b72d365af6c29j  ,examples/example-exporter-httpserver/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>jф  #examples/example-httpserver/pom.xmlu}(j6  (0563d583a93f32d63b484dd0d677f75db81927caj  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bjф  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(j6  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j  1examples/example-exporter-opentelemetry/README.mdj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u)     }(j6  (923840e0c85a643976792d88e8dff7c10d446ceej  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(j6  (9f559dae84e3c48a4906a74606ac401cada2f6b9j  >examples/example-exporter-opentelemetry/config/prometheus.yamlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(j6  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j  ;examples/example-exporter-opentelemetry/docker-compose.yamlj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(j6  (842faa1a34c19b3c29f56a5a83792306681906b6j  /examples/example-exporter-opentelemetry/pom.xmlj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j6  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63j  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j6  (dbab42931bb04f5e4327f34f7e74fceed37cb828j  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,143 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(j6  (8d50c0c80603d5469a7144bac6387c8bff45e75bj  2examples/example-exporter-servlet-tomcat/README.mdj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.jф  )examples/example-tomcat-servlet/README.mdu}(j6  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j  0examples/example-exporter-servlet-tomcat/pom.xmlj  renamedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>jф  'examples/example-tomcat-servlet/pom.xmlu}(j6  (7a95e36da299e8ce780ea5f0d2f2751765754afcj  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bjф  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(j6  (571e55a2b5d259f0401a881e9631fa0acce8e791j  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  renamedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bjф  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(j6  (6535b05e1474660627803d1962e85282e910cf9dj  examples/pom.xmlj  modifiedj  Kj  Kj  Kj  jhttps://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(j6  (9cd27a42c58845389736906bc49d2160af05792fj  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j6  (b46c112af431ec1a41165983f476978e4d0a654ej  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X
  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j6  (9a44b01535c57c14d4ace04dd1c4e716316c7c32j  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj  modifiedj  Kj  Kj  Kj  X  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javaj  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j6  (ba5d97577739137181a6d15e70170bba6923ecc0j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/pom.xmlj  ^https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(j6  (6d06746f76a09f4d3be70c7bf19de87731cf51a5j  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(j6  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4j  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(j6  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcj  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(j6  (c4a09be7b8ca24e342cd99173c0a8674e703cb60j  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(j6  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3j  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(j6  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770j  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j6  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99j  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj  modifiedj  K&j  Kj  K4j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(j6  (d324a2700c70b915e444403f75a9c17c96e70bbfj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(j6  (a1c1769d98559841ca83eb49e1ca2977e32e6114j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj  modifiedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(j6  (035f2133482078e18c05d544d2633b8ade9d8bebj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(j6  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(j6  (c6d5b7719d02f25c2a8635bcc774374e4f552b97j  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj  modifiedj  KRj  Kj  KTj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(j6  (6b5266962f80db0e582089efb438621100a5ce92j  1prometheus-metrics-exporter-opentelemetry/pom.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u     }(j6  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u}(j6  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj  addedj  K j  K j  K j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(j6  (762060efcf3f5edfa5be3d9edc50d9e8c4350081j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj  addedj  K|j  K j  K|j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(j6  (c4319b7fc6bb838489686542d8817d5c53daad94j  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(j6  (053c2b53ab0a361d01905748b8e4445d725b3e63j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(j6  (093b3b44dc76bd71ffb168b5a87b471c2699ef06j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javaj  addedj  K<j  K j  K<j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(j6  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(j6  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j6  (d365c26fb4969d38448d8e1bd702b7e55e061b2ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javaj  addedj  K.j  K j  K.j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(j6  (86d56d2d79c660d5d01c2802f73e94787343c22ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javaj  addedj  KUj  K j  KUj  X  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X   https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(j6  (7908bee2ba3c186de26199f194bdde88245a9b3fj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(j6  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj  addedj  K=j  K j  K=j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(j6  (a0b4aed8397b8eac69d32d28215f110df28b893bj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(j6  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u      }(j6  (883b06e08475fcbe0e3464b61fa883d3db0a28d1j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j6  (353a1623c7ae3932afa295452af773fa7d9aecdbj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj  addedj  K:j  K j  K:j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(j6  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javaj  addedj  K&j  K j  K&j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j6  (0dce35fa640fb1e114f86e0bfc229347a8d616dej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj  addedj  K1j  K j  K1j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javaj  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(j6  (ddf2160d04ae48dbdec91f99d371475820c13180j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(j6  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj  addedj  KWj  K j  KWj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(j6  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ej  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javaj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(j6  (9b2f53c1255abbda709af7892125aa70ba69f819j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javaj  addedj  K+j  K j  K+j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(j6  (930715492a4380a13a088d728e21b7460031bb2cj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javaj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j6  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdj  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javaj  addedj  K)j  K j  K)j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(j6  (fafc2be77024fc40abd2d2e78abe8864b891c438j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j6  (f5d86ba1f71fd7393035dff48f730aca3caea09ej  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(j6  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -0,0 +1 @@
+*.jaru}(j6  (24a9f8dffef1509961ecdc2e2deee91f7072c264j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j6  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(j6  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  modifiedj  Mj  Mzj  Mj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bu}(j6  (eea5f929a0b4ea14792d7806f6306662879017f8j  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j6  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j6  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  modifiedj  K	j  K j  K	j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(j6  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(j6  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbej  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(j6  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj  .prometheus-metrics-shaded-dependencies/pom.xmlj  addedj  K(j  K j  K(j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(j6  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068j  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj  addedj  K~j  K j  K~j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j6  (7b0019461389b754822ed106979b1e5c461f8032j  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj  addedj  K	j  K j  K	j  X   https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javaj  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(j6  (b856ef185427b3939f8b4292d464b4b9f1de817cj  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj  addedj  K\j  K j  K\j  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j6  (3f63392a763257f697e79251d10d442a341fa7eaj  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj  addedj  K	j  K j  K	j  X  https://github.com/prometheus/client_java/blob/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X  https://github.com/prometheus/client_java/raw/d55b4b889cd72c81d0cd0192b03ba874f0acfd1b/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javaj  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=d55b4b889cd72c81d0cd0192b03ba874f0acfd1bj  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(j6  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj  protobuf-shaded/.gitignorej  removedj  K j  Kj  Kj  thttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2F.gitignorej  shttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  @@ -1 +0,0 @@
-src/main/javau}(j6  (5db4149b724982e6ff8f55ae96f4f8a07804d590j  protobuf-shaded/README.mdj  removedj  K j  Kj  Kj  shttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2FREADME.mdy     j  rhttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j6  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34j  protobuf-shaded/pom.xmlj  removedj  K j  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/732a6c14edd2ce6a29a3ebf230ff058cbe867006/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=732a6c14edd2ce6a29a3ebf230ff058cbe867006j  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(d81b2cc271caf60214cafd9564f2853c34634ed2}(sha(d81b2cc271caf60214cafd9564f2853c34634ed2node_idEC_kwDOAHoJt9oAKGQ4MWIyY2MyNzFjYWY2MDIxNGNhZmQ5NTY0ZjI4NTNjMzQ2MzRlZDIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-24T14:45:19Zu	committer}(j/  Fabian Stäberj1  fabian@fstab.dej3  2023-06-24T14:45:19Zumessage%Fix counter + add histogram benchmarktree}(j'  (7eb05fd396adcad489d4b34437cf55d34f9f7dd9urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/7eb05fd396adcad489d4b34437cf55d34f9f7dd9uj?  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d81b2cc271caf60214cafd9564f2853c34634ed2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj?  dhttps://api.github.com/repos/prometheus/client_java/commits/d81b2cc271caf60214cafd9564f2853c34634ed2html_urlYhttps://github.com/prometheus/client_java/commit/d81b2cc271caf60214cafd9564f2853c34634ed2comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d81b2cc271caf60214cafd9564f2853c34634ed2/commentsj-  }(loginfstabidJ' j)  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j?  "https://api.github.com/users/fstabjK  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj5  }(jP  fstabjR  J' j)  MDQ6VXNlcjMzMDUzNQ==jT  2https://avatars.githubusercontent.com/u/330535?v=4jV  h3j?  "https://api.github.com/users/fstabjK  https://github.com/fstabjY  ,https://api.github.com/users/fstab/followersj[  9https://api.github.com/users/fstab/following{/other_user}j]  2https://api.github.com/users/fstab/gists{/gist_id}j_  9https://api.github.com/users/fstab/starred{/owner}{/repo}ja  0https://api.github.com/users/fstab/subscriptionsjc  'https://api.github.com/users/fstab/orgsje  (https://api.github.com/users/fstab/reposjg  3https://api.github.com/users/fstab/events{/privacy}ji  2https://api.github.com/users/fstab/received_eventsjk  Userjm  uparents]}(j'  (f1540850ebd7bf3dd38e00a7880d015ce8211bf5j?  dhttps://api.github.com/repos/prometheus/client_java/commits/f1540850ebd7bf3dd38e00a7880d015ce8211bf5jK  Yhttps://github.com/prometheus/client_java/commit/f1540850ebd7bf3dd38e00a7880d015ce8211bf5uastats}(totalK	additionsKڌ	deletionsKufiles](}(j'  (a93ba84cd3178a52e3ab7bca433d9c8b0bdf62e0filenameUprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javastatusmodifiedj  K
j  K changesK
blob_urlhttps://github.com/prometheus/client_java/blob/d81b2cc271caf60214cafd9564f2853c34634ed2/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaraw_urlhttps://github.com/prometheus/client_java/raw/d81b2cc271caf60214cafd9564f2853c34634ed2/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=d81b2cc271caf60214cafd9564f2853c34634ed2patchX@  @@ -38,11 +38,21 @@ protected boolean isExemplarsEnabled() {
         return exemplarsEnabled;
     }
 
+    @Override
+    public void inc(long amount) {
+        getNoLabels().inc(amount);
+    }
+
     @Override
     public void inc(double amount) {
         getNoLabels().inc(amount);
     }
 
+    @Override
+    public void incWithExemplar(long amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
     @Override
     public void incWithExemplar(double amount, Labels labels) {
         getNoLabels().incWithExemplar(amount, labels);u}(j'  (b20ba48b995bd190a12298b7029655d0af28841dj  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/d81b2cc271caf60214cafd9564f2853c34634ed2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/d81b2cc271caf60214cafd9564f2853c34634ed2/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=d81b2cc271caf60214cafd9564f2853c34634ed2j  Xx  @@ -85,7 +85,7 @@ public void testIncrement() {
     @Test
     public void testNegativeIncrementFails() {
         thrown.expect(IllegalArgumentException.class);
-        thrown.expectMessage("Negative increment -1.0 is illegal for Counter metrics.");
+        thrown.expectMessage("Negative increment -1 is illegal for Counter metrics.");
         noLabels.inc(-1);
     }
 u}(j'  (27ddb405b70870a07b8198618c1752a0bc315c20j  tmp_example/pom.xmlj  modifiedj  Kj  K j  Kj  mhttps://github.com/prometheus/client_java/blob/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fpom.xmlj  lhttps://github.com/prometheus/client_java/raw/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=d81b2cc271caf60214cafd9564f2853c34634ed2j  X  @@ -80,6 +80,27 @@
                     <target>1.8</target>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <finalName>benchmarks</finalName>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>org.openjdk.jmh.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>u}(j'  (8fa9212584a3d4ce1396e115afa4d20f33ee3727j  :tmp_example/src/main/java/com/example/BenchmarkRunner.javaj  modifiedj  K#j  Kj  K=j  https://github.com/prometheus/client_java/blob/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javaj  https://github.com/prometheus/client_java/raw/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javaj  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.java?ref=d81b2cc271caf60214cafd9564f2853c34634ed2j  X  @@ -25,29 +25,40 @@
 import org.openjdk.jmh.annotations.Scope;
 import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Threads;
 
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
 
-@State(Scope.Benchmark)
+//@State(Scope.Benchmark)
 public class BenchmarkRunner {
 
+    static double[] random = new double[10*1024*1024];
+    private static void initRandom() {
+        Random rand = new Random(0);
+        for (int i=0; i<random.length; i++) {
+            random[i] = Math.abs(rand.nextGaussian());
+        }
+        System.out.println("random init done");
+    }
     public static void main(String[] args) throws Exception {
-       org.openjdk.jmh.Main.main(args);
+        //org.openjdk.jmh.Main.main(args);
         /*
         BenchmarkRunner r = new BenchmarkRunner();
         r.setUp();
-        for (int i=0; i<100*100*100*10; i++) {
+        for (int i=0; i<10; i++) {
             //r.benchmarkOtelCounter();
             //r.benchmarkPrometheusCounter();
             r.benchmarkOtelHistogram();
+            r.benchmarkPrometheusHistogram();
         }
 
          */
     }
 
+    /*
     private DiscreteEventObserver goodCases;
     private DiscreteEventObserver errorCases;
 
@@ -63,7 +74,7 @@ public static void main(String[] args) throws Exception {
     DoubleHistogram otelHist;
 
     private AtomicBoolean atomicBoolean = new AtomicBoolean();
-    @Setup
+    //@Setup
     public void setUp() {
         Counter counter = Counter.newBuilder()
                 .withLabelNames("path", "status")
@@ -80,12 +91,10 @@ public void setUp() {
         Resource resource = Resource.getDefault()
                 .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
 
-        /*
-        SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
-                .addSpanProcessor(BatchSpanProcessor.builder(OtlpGrpcSpanExporter.builder().build()).build())
+        //SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
+        //        .addSpanProcessor(BatchSpanProcessor.builder(OtlpGrpcSpanExporter.builder().build()).build())
                 .setResource(resource)
-                .build();
-         */
+         //       .build();
 
         InMemoryMetricReader reader = InMemoryMetricReader.create();
 
@@ -96,17 +105,16 @@ public void setUp() {
                                 .setName("lksd")
                                 .build(),
                         View.builder()
-                                .setAggregation(Aggregation.base2ExponentialBucketHistogram())
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
                                 .build()
                         )
                 .build();
 
-        /*
-        SdkLoggerProvider sdkLoggerProvider = SdkLoggerProvider.builder()
-                .addLogRecordProcessor(BatchLogRecordProcessor.builder(OtlpGrpcLogRecordExporter.builder().build()).build())
-                .setResource(resource)
-                .build();
-         */
+
+       // SdkLoggerProvider sdkLoggerProvider = SdkLoggerProvider.builder()
+       //         .addLogRecordProcessor(BatchLogRecordProcessor.builder(OtlpGrpcLogRecordExporter.builder().build()).build())
+        //        .setResource(resource)
+         //       .build();
 
         OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
                 //.setTracerProvider(sdkTracerProvider)
@@ -138,6 +146,8 @@ public void setUp() {
 
         doubleAdder = new DoubleAdder();
         longAdder = new LongAdder();
+
+        initRandom();
     }
 
     //@Benchmark
@@ -170,23 +180,21 @@ public void benchmarkLongAdder() {
         longAdder.add(1);
     }
 
-    @Benchmark
+    //@Benchmak
+    @Threads(4)
     @Fork(value = 1, warmups = 1)
     public void benchmarkPrometheusHistogram() {
-        Random random = new Random(0);
-        for (int i = 100; i > 0; i--) {
-            double d = Math.abs(random.nextGaussian());
-            histogram.observe(d);
+        for (double observation : random) {
+            histogram.observe(observation);
         }
     }
 
-    @Benchmark
+    //@Benchmark
+    @Threads(4)
     @Fork(value = 1, warmups = 1)
     public void benchmarkOtelHistogram() {
-        Random random = new Random(0);
-        for (int i = 100; i > 0; i--) {
-            double d = Math.abs(random.nextGaussian());
-            otelHist.record(d);
+        for (double observation : random) {
+            otelHist.record(observation);
         }
     }
 
@@ -213,4 +221,5 @@ public void benchmarkOtelCounter() {
             }
         }
     }
+    */
 }u}(j'  (0c3aadfbd02979c5afaa24a82fd01759661d65faj  Ctmp_example/src/main/java/com/example/NativeHistogramBenchmark.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.javaj  https://github.com/prometheus/client_java/raw/d81b2cc271caf60214cafd9564f2853c34634ed2/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.javaj  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FNativeHistogramBenchmark.java?ref=d81b2cc271caf60214cafd9564f2853c34634ed2j  Xf  @@ -0,0 +1,151 @@
+package com.example;
+
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Histogram;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Threads;
+
+import java.io.IOException;
+import java.util.Random;
+
+@State(Scope.Benchmark)
+public class NativeHistogramBenchmark {
+
+    private final double[] random = new double[10 * 1024 * 1024];
+    private Histogram prometheusHistogram;
+    private DoubleHistogram otelHistogram;
+
+    public static void main(String[] args) throws IOException {
+        org.openjdk.jmh.Main.main(args);
+    }
+
+    @Setup
+    public void setUp() {
+        initPrometheusHistogram();
+        initOTelHistogram();
+        initRandomNumbers();
+    }
+
+    @Benchmark
+    @Threads(1)
+    public void benchmarkPrometheusHistogram_1_thread() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(1)
+    public void benchmarkOtelHistogram_1_thread() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(2)
+    public void benchmarkPrometheusHistogram_2_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(2)
+    public void benchmarkOtelHistogram_2_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(4)
+    public void benchmarkPrometheusHistogram_4_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(4)
+    public void benchmarkOtelHistogram_4_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(8)
+    public void benchmarkPrometheusHistogram_8_threads() {
+        for (double observation : random) {
+            prometheusHistogram.observe(observation);
+        }
+    }
+
+    @Benchmark
+    @Threads(8)
+    public void benchmarkOtelHistogram_8_threads() {
+        for (double observation : random) {
+            otelHistogram.record(observation);
+        }
+    }
+
+    private void initPrometheusHistogram() {
+        prometheusHistogram = Histogram.newBuilder().withName("test").nativeOnly().build();
+    }
+
+    private void initOTelHistogram() {
+
+        // OTel SDK initialization, see https://opentelemetry.io/docs/instrumentation/java/manual/
+
+        Resource resource = Resource.getDefault()
+                .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "logical-service-name")));
+
+        InMemoryMetricReader reader = InMemoryMetricReader.create();
+
+        SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder()
+                .registerMetricReader(reader) //OtlpGrpcMetricExporter.builder().build()).build())
+                .setResource(resource)
+                .registerView(InstrumentSelector.builder()
+                                .setName("test.histogram")
+                                .build(),
+                        View.builder()
+                                .setAggregation(Aggregation.base2ExponentialBucketHistogram(160, 5))
+                                .build()
+                )
+                .build();
+
+        OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
+                .setMeterProvider(sdkMeterProvider)
+                .buildAndRegisterGlobal();
+
+        Meter meter = openTelemetry.meterBuilder("instrumentation-library-name")
+                .setInstrumentationVersion("1.0.0")
+                .build();
+
+        otelHistogram = meter.histogramBuilder("test.histogram")
+                .build();
+    }
+
+    private void initRandomNumbers() {
+        Random rand = new Random(0);
+        for (int i = 0; i < random.length; i++) {
+            random[i] = Math.abs(rand.nextGaussian());
+        }
+        System.out.println("random init done");
+    }
+}ueu(b68c124c817df7697c06c5e67aee66a1c22c4ba1}(sha(b68c124c817df7697c06c5e67aee66a1c22c4ba1node_idEC_kwDOAHoJt9oAKGI2OGMxMjRjODE3ZGY3Njk3YzA2YzVlNjdhZWU2NmExYzIyYzRiYTEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T20:45:26Zu	committer}(jć  Fabian StäberjƇ  fabian@fstab.dejȇ  2023-08-29T20:45:26ZumessagecMake the DefaultHandler in HTTPServer configurable

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j  (ad61a0608d252c0ffb09039559171888a5af2489urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ad61a0608d252c0ffb09039559171888a5af2489ujԇ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b68c124c817df7697c06c5e67aee66a1c22c4ba1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujԇ  dhttps://api.github.com/repos/prometheus/client_java/commits/b68c124c817df7697c06c5e67aee66a1c22c4ba1html_urlYhttps://github.com/prometheus/client_java/commit/b68c124c817df7697c06c5e67aee66a1c22c4ba1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b68c124c817df7697c06c5e67aee66a1c22c4ba1/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jԇ  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujʇ  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jԇ  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj   Userj  uparents]}(j  (4fde8312ca337674dd9981ab5d7d280840e37183jԇ  dhttps://api.github.com/repos/prometheus/client_java/commits/4fde8312ca337674dd9981ab5d7d280840e37183j  Yhttps://github.com/prometheus/client_java/commit/4fde8312ca337674dd9981ab5d7d280840e37183uastats}(totalK	additionsK	deletionsKufiles]}(j  (47a5120668076e6fa901732da94eb75b21009362filenamenprometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/b68c124c817df7697c06c5e67aee66a1c22c4ba1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaraw_urlhttps://github.com/prometheus/client_java/raw/b68c124c817df7697c06c5e67aee66a1c22c4ba1/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=b68c124c817df7697c06c5e67aee66a1c22c4ba1patchX	  @@ -45,13 +45,13 @@ public class HTTPServer implements Closeable {
     protected final HttpServer server;
     protected final ExecutorService executorService;
 
-    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator) {
+    private HTTPServer(PrometheusProperties config, ExecutorService executorService, HttpServer httpServer, PrometheusRegistry registry, Authenticator authenticator, HttpHandler defaultHandler) {
         if (httpServer.getAddress() == null) {
             throw new IllegalArgumentException("HttpServer hasn't been bound to an address");
         }
         this.server = httpServer;
         this.executorService = executorService;
-        registerHandler("/", new DefaultHandler(), authenticator);
+        registerHandler("/", defaultHandler == null ? new DefaultHandler() : defaultHandler, authenticator);
         registerHandler("/metrics", new MetricsHandler(config, registry), authenticator);
         registerHandler("/-/healthy", new HealthyHandler(), authenticator);
         this.server.start();
@@ -108,6 +108,7 @@ public static class Builder {
         private ExporterHttpServerProperties properties = null;
         private Authenticator authenticator = null;
         private HttpsConfigurator httpsConfigurator = null;
+        private HttpHandler defaultHandler = null;
 
         private Builder(PrometheusProperties config) {
             this.config = config;
@@ -174,6 +175,14 @@ public Builder withHttpsConfigurator(HttpsConfigurator configurator) {
             return this;
         }
 
+        /**
+         * Optional: Override default handler, i.e. the handler that will be registered for the / endpoint.
+         */
+        public Builder withDefaultHandler(HttpHandler defaultHandler) {
+            this.defaultHandler = defaultHandler;
+            return this;
+        }
+
         /**
          * Build and start the HTTPServer.
          */
@@ -190,7 +199,7 @@ public HTTPServer buildAndStart() throws IOException {
             }
             ExecutorService executorService = makeExecutorService();
             httpServer.setExecutor(executorService);
-            return new HTTPServer(config, executorService, httpServer, registry, authenticator);
+            return new HTTPServer(config, executorService, httpServer, registry, authenticator, defaultHandler);
         }
 
         private InetSocketAddress makeInetSocketAddress() {uau(94bef3e0588b2ec0dd92210133fb10809b74bb52}(sha(94bef3e0588b2ec0dd92210133fb10809b74bb52node_idEC_kwDOAHoJt9oAKDk0YmVmM2UwNTg4YjJlYzBkZDkyMjEwMTMzZmIxMDgwOWI3NGJiNTIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-16T21:00:18Zu	committer}(j9  Fabian Stäberj;  fabian@fstab.dej=  2023-07-16T21:00:18ZumessageRemove Java 6 supporttree}(j1  (80a3f09927b6945f3a276f49d7f668486d63f104urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/80a3f09927b6945f3a276f49d7f668486d63f104ujI  hhttps://api.github.com/repos/prometheus/client_java/git/commits/94bef3e0588b2ec0dd92210133fb10809b74bb52
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI  dhttps://api.github.com/repos/prometheus/client_java/commits/94bef3e0588b2ec0dd92210133fb10809b74bb52html_urlYhttps://github.com/prometheus/client_java/commit/94bef3e0588b2ec0dd92210133fb10809b74bb52comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/94bef3e0588b2ec0dd92210133fb10809b74bb52/commentsj7  }(loginfstabidJ' j3  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jI  "https://api.github.com/users/fstabjU  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj?  }(jZ  fstabj\  J' j3  MDQ6VXNlcjMzMDUzNQ==j^  2https://avatars.githubusercontent.com/u/330535?v=4j`  h3jI  "https://api.github.com/users/fstabjU  https://github.com/fstabjc  ,https://api.github.com/users/fstab/followersje  9https://api.github.com/users/fstab/following{/other_user}jg  2https://api.github.com/users/fstab/gists{/gist_id}ji  9https://api.github.com/users/fstab/starred{/owner}{/repo}jk  0https://api.github.com/users/fstab/subscriptionsjm  'https://api.github.com/users/fstab/orgsjo  (https://api.github.com/users/fstab/reposjq  3https://api.github.com/users/fstab/events{/privacy}js  2https://api.github.com/users/fstab/received_eventsju  Userjw  uparents]}(j1  (0ff79a993c78edf3b0e2053189e382bb10e3331ajI  dhttps://api.github.com/repos/prometheus/client_java/commits/0ff79a993c78edf3b0e2053189e382bb10e3331ajU  Yhttps://github.com/prometheus/client_java/commit/0ff79a993c78edf3b0e2053189e382bb10e3331auastats}(totalM	additionsK	deletionsMufiles](}(j1  (9e3559021cca8d3d3a135cfdd549fa0a7ecc9566filenameexamples/tomcat-servlet/pom.xmlstatusmodifiedj  K j  KchangesKblob_url{https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/examples%2Ftomcat-servlet%2Fpom.xmlraw_urlzhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/examples%2Ftomcat-servlet%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52patchX  @@ -33,13 +33,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>u}(j1  (3413633792016afacacfc0822aa0ce233eb5ad30j  #integration_tests/it_common/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_common%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -32,14 +32,6 @@
       </testResource>
     </testResources>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>u}(j1  (4e405edac110ccb7d73935026fc54729e946f706j  1integration_tests/it_exemplars_otel_agent/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -85,14 +85,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j1  (23356c7264571438d2eb622464a60822372b06b6j  /integration_tests/it_exemplars_otel_sdk/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -63,14 +63,6 @@
   <build>
     <finalName>example-open-telemetry-app</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j1  (c4e8829680fbadaa1d64b562e584bf05bc1b177bj  *integration_tests/it_java_versions/pom.xmlj  modifiedj  K j  K(j  K(j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -72,53 +72,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j1  (e854ed193574f7ef12b6e71638be38eb9c7e5305j  jintegration_tests/it_java_versions/src/test/java/io/prometheus/client/it/java_versions/JavaVersionsIT.javaj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javaj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.java?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X>  @@ -36,9 +36,7 @@ public static String[] images() {
             "openjdk:8-jre",
             "openjdk:11-jre",
             "openjdk:17",
-            "ticketfly/java:6",
             "adoptopenjdk/openjdk16:ubi-minimal-jre",
-            "azul/zulu-openjdk:6",
 
             // OpenJ9
             "ibmjava:8-jre",u}(j1  (0cf11239ac7cf285007bb9a298fe0b87f6e8deb5j  #integration_tests/it_log4j2/pom.xmlj  modifiedj  K j  K+j  K+j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_log4j2%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X	  @@ -88,56 +88,13 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <!-- We compile this for Java 6, but as log4j 2.15.0 requires Java >= 7 at runtime it will not run on -->
-                    <!-- Java 6 with the latest log4j version. However, let's keep Java 6 here to make it easy to manually -->
-                    <!-- downgrade to log4j 2.3 to run a quick test with Java 6. -->
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
 
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j1  (8272880ba0c03be2b269001fe9aac4a7b4526ef7j  Vintegration_tests/it_log4j2/src/test/java/io/prometheus/client/it/log4j2/Log4j2IT.javaj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javaj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.java?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X]  @@ -24,8 +24,6 @@
 public class Log4j2IT {
 
     private final String image = "openjdk:8-jre";
-    // This test is green with a Java 6 image, but you need to downgrade the log4j version in pom.xml.
-    // private final String image = "azul/zulu-openjdk:6";
     private final Volume volume;
     private final GenericContainer<?> javaContainer;
 u}(j1  (f5f103a0721e4ffcb7d518f419a4ae7c728368aaj  (integration_tests/it_pushgateway/pom.xmlj  modifiedj  K j  K(j  K(j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -69,53 +69,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j1  (d0fb6dac38a5c5ce33a641e43636b8636d5c3decj  eintegration_tests/it_pushgateway/src/test/java/io/prometheus/client/it/pushgateway/PushGatewayIT.javaj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javaj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.java?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  XK  @@ -34,8 +34,6 @@ public class PushGatewayIT {
     @Parameterized.Parameters(name = "{0}")
     public static String[] images() {
         return new String[] {
-                "azul/zulu-openjdk:6",
-                "openjdk:7",
                 "ibmjava:8-jre",
                 "openjdk:11-slim",
                 "openjdk:17"u}(j1  (532852b3632496349b8e6fdc15f228ca82e551cfj  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -58,14 +58,6 @@
   <build>
     <finalName>${project.artifactId}</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j1  (5e088bd8f9527c7cef4cafcf14388a2c6e9cf131j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/pom.xmlj  ^https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -66,7 +66,7 @@
         <module>simpleclient_servlet_common</module>
         <module>simpleclient_servlet_jakarta</module>
         <module>simpleclient_spring_web</module>
-        <module>simpleclient_spring_boot</module>
+        <!-- <module>simpleclient_spring_boot</module> --> <!-- requires Java <= 11 to compile. removing to enable compilation with Java 17 -->
         <module>simpleclient_jetty</module>
         <module>simpleclient_jetty_jdk8</module>
         <module>simpleclient_tracer</module>
@@ -231,11 +231,10 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>u}(j1  (2cd55e22386036e98f31898b0412625cdf4eb3b9j  !prometheus-metrics-config/pom.xmlj  modifiedj  K j  Kj  Kj  {https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-config%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-config%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -33,16 +33,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j1  (2bf55dadda285778dbf632b533a919f32d9e9fffj  prometheus-metrics-core/pom.xmlj  modifiedj  K j  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -74,16 +74,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j1  (02bbd99f1703e28adf8ec6573764b93fdd63a946j  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -47,16 +47,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>u}(j1  (8039472c4a069287e4c8227864d5910d051e7650j  -prometheus-metrics-exposition-formats/pom.xmlj  modifiedj  K j  K	j  K	j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -91,15 +91,6 @@
                     </execution>
                 </executions>
             </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
         </plugins>
     </build>
 </project>u}(j1  (9a007c442d68016c8edecb1b143f3d0dae1f4caaj   prometheus-metrics-model/pom.xmlj  modifiedj  K j  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-model%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-model%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -40,16 +40,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>u}(j1  (e8c1ed7cc9f9fa83d94804628c3556159408743cj  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xh  @@ -23,15 +23,4 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>u}(j1  (36e2f8c8c2cb258e4f3d2cd1f62e62752ff0b880j  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xh  @@ -38,15 +38,4 @@
       <distribution>repo</distribution>
     </license>
   </licenses>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>u}(j1  (679c6f78864064b4337e9adb6986aaccf6d6407bj  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xq  @@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j1  (01f5654ef7f0d9fed27230cee50b94d1f36f4407j  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  modifiedj  K j  K
j  K
j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j1  (771955fc4da46dfd1af08c21ce7601d6086b1a8dj  protobuf-shaded/pom.xmlj  modifiedj  Kj  Kj  Kj  qhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X_  @@ -136,31 +136,25 @@
                             <relocations>
                                 <relocation>
                                     <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                    <shadedPattern>
+                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
+                                    </shadedPattern>
                                 </relocation>
                             </relocations>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <excludes>
                         <exclude>google/protobuf/*.proto</exclude>
                         <exclude>google/protobuf/compiler/*.proto</exclude>
                     </excludes>
                 </configuration>
             </plugin>
-
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>uQ      }(j1  (fa585420cec9fefaa8dc527658305c7a3badbe5ej  simpleclient_dropwizard/pom.xmlj  modifiedj  K j  K-j  K-j  yhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_dropwizard%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_dropwizard%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xg  @@ -63,49 +63,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>u}(j1  (32de466b60e48f0443747cba019bab95ba5db076j  simpleclient_hotspot/pom.xmlj  modifiedj  K j  K,j  K,j  vhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_hotspot%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_hotspot%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xe  @@ -67,48 +67,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
 </project>u}(j1  (6c43b792c0a3d59f67e030fd22da09268ac7730fj  simpleclient_jetty_jdk8/pom.xmlj  modifiedj  K j  K
j  K
j  yhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_jetty_jdk8%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_jetty_jdk8%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xl  @@ -16,19 +16,6 @@
         Collector of data from Jetty Statistics for Jetty versions which require JDK 8.
     </description>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j1  (3d03b313a84b2b01b770f8a088de90a8b65b9917j  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj  modifiedj  K j  K
j  K
j  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j1  (63dd95f5a823df05bccf1a1425569709f22cfd9bj  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  Xq  @@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j1  (3b34eb86fab8379f8b87329d480708f01006d7fdj  simpleclient_vertx/pom.xmlj  modifiedj  K j  Kj  Kj  thttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_vertx%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_vertx%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>u}(j1  (5c676e3a25552d478dea3514136a1597f9be86e7j  simpleclient_vertx4/pom.xmlj  modifiedj  K j  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_vertx4%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/simpleclient_vertx4%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>u}(j1  (f8b4c08524a0f578f431368e3f789eab132f2498j  tmp_example/pom.xmlj  modifiedj  K j  Kj  Kj  mhttps://github.com/prometheus/client_java/blob/94bef3e0588b2ec0dd92210133fb10809b74bb52/tmp_example%2Fpom.xmlj  lhttps://github.com/prometheus/client_java/raw/94bef3e0588b2ec0dd92210133fb10809b74bb52/tmp_example%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fpom.xml?ref=94bef3e0588b2ec0dd92210133fb10809b74bb52j  X  @@ -73,13 +73,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>ueu(6284222cc856ead9c341e2c57c6b16dd5975f26b}(sha(6284222cc856ead9c341e2c57c6b16dd5975f26bnode_idEC_kwDOAHoJt9oAKDYyODQyMjJjYzg1NmVhZDljMzQxZTJjNTdjNmIxNmRkNTk3NWYyNmIcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-05-11T14:13:08Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-17T09:01:57ZumessageZPrometheus Metrics 1.0.x - Initial Commit

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j  (30df2b104ae006bfc35ac520f10d26616cca6ae9urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/30df2b104ae006bfc35ac520f10d26616cca6ae9uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6284222cc856ead9c341e2c57c6b16dd5975f26b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/6284222cc856ead9c341e2c57c6b16dd5975f26bhtml_urlYhttps://github.com/prometheus/client_java/commit/6284222cc856ead9c341e2c57c6b16dd5975f26bcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6284222cc856ead9c341e2c57c6b16dd5975f26b/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}jĉ  2https://api.github.com/users/fstab/gists{/gist_id}jƉ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jȉ  0https://api.github.com/users/fstab/subscriptionsjʉ  'https://api.github.com/users/fstab/orgsj̉  (https://api.github.com/users/fstab/reposjΉ  3https://api.github.com/users/fstab/events{/privacy}jЉ  2https://api.github.com/users/fstab/received_eventsj҉  Userjԉ  uparents]}(j  (98967b8367216f4107ad5621f260ed895c930262j  dhttps://api.github.com/repos/prometheus/client_java/commits/98967b8367216f4107ad5621f260ed895c930262j  Yhttps://github.com/prometheus/client_java/commit/98967b8367216f4107ad5621f260ed895c930262uastats}(totalMy	additionsM$x	deletionsMufiles](}(j  (8e864014bfb4e6534f90514124e41b5544b006b3filename.circleci/config.ymlstatusmodifiedj  Kj  K changesKblob_urlnhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bpatchX  @@ -16,6 +16,7 @@ jobs:
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
+      - run: cd protobuf-shaded && ../mvnw install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(j  (db455570b12cd7b9ff47bbf1afeb9e0cdd38584fj  benchmarks/pom.xmlj  modifiedj  Kj  Kj  Kj  lhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/benchmarks%2Fpom.xmlj  khttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/benchmarks%2Fpom.xmlj  ~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X9  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(j  (fb53876ed4e255583338681850c3fe83632258e6j  examples/pom.xmlj  addedj  K'j  K j  K'j  jhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Fpom.xmlj  ihttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Fpom.xmlj  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>examples</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Prometheus Metrics Examples</name>
+    <description>
+        Example projects for the Prometheus Metrics Library.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>tomcat-servlet-example</module>
+    </modules>
+
+</project>u}(j  (0688b6045eb0b65a1275f54dcfa287b780ba7c24j  'examples/tomcat-servlet-example/pom.xmlj  addedj  KLj  K j  KLj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tomcat-servlet-example</artifactId>
+
+    <name>Tomcat Servlet Example</name>
+    <description>
+        Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>10.1.11</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.tomcat_servlet.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (97d4161ef49a383d7bf918acb98fcbd6eea26ee6j  rexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj  addedj  K/j  K j  K/j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.examples.tomcat_servlet;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.model.snapshots.Unit;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.Random;
+
+import static io.prometheus.metrics.model.snapshots.Unit.nanosToSeconds;
+
+public class HelloWorldServlet extends HttpServlet {
+
+    private final Random random = new Random(0);
+
+    private final Counter counter = Counter.newBuilder()
+            .withName("requests_total")
+            .withHelp("total number of requests")
+            .withLabelNames("http_status")
+            .register();
+
+    private final Histogram histogram = Histogram.newBuilder()
+            .withName("request_duration_seconds")
+            .withHelp("request duration in seconds")
+            .withUnit(Unit.SECONDS)
+            .withLabelNames("http_status")
+            .register();
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        long start = System.nanoTime();
+        try {
+            Thread.sleep((long) (Math.abs((random.nextGaussian() + 1.0) * 100.0)));
+            resp.setStatus(200);
+            resp.setContentType("text/plain");
+            resp.getWriter().println("Hello, World!");
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        } finally {
+            counter.withLabelValues("200").inc();
+            histogram.withLabelValues("200").observe(nanosToSeconds(System.nanoTime() - start));
+        }
+    }
+}u}(j  (759b88cb9bc8fadf1b0140bad4f789f6af8baee3j  eexamples/tomcat-servlet-example/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javaj  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xw  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.examples.tomcat_servlet;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+/**
+ * Simple example using embedded Tomcat an the {@link PrometheusMetricsServlet}.
+ */
+public class Main {
+
+    public static void main(String[] args) throws LifecycleException {
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setPort(8080);
+
+        Context ctx = tomcat.addContext("", new File(".").getAbsolutePath());
+
+        Tomcat.addServlet(ctx, "hello", new HelloWorldServlet());
+        ctx.addServletMappingDecoded("/*", "hello");
+
+        Tomcat.addServlet(ctx, "metrics", new PrometheusMetricsServlet());
+        ctx.addServletMappingDecoded("/metrics", "metrics");
+
+        tomcat.getConnector();
+        tomcat.start();
+        tomcat.getServer().await();
+    }
+}u}(j  (44758744c4f0ad45f6722d4d54792c1ddad04f5fj  #integration_tests/it_common/pom.xmlj  modifiedj  Kj  K	j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_common%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>
@@ -32,14 +32,6 @@
       </testResource>
     </testResources>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>u}(j  (80a97e549f0ce7481a2d485584c655245de3358dj  1integration_tests/it_exemplars_otel_agent/pom.xmlj  modifiedj  Kj  K	j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>
@@ -85,14 +85,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j  (90c99c15596b192de324a53de84b880afe94dec7j  /integration_tests/it_exemplars_otel_sdk/pom.xmlj  modifiedj  Kj  K	j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>
@@ -63,14 +63,6 @@
   <build>
     <finalName>example-open-telemetry-app</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j  (3e6287a1352b9b9f6660258165c2d354c167dfc8j  }integration_tests/it_exemplars_otel_sdk/src/test/java/io/prometheus/client/it/exemplars_otel/ExemplarsOpenTelemetrySdkIT.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fexemplars_otel%2FExemplarsOpenTelemetrySdkIT.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -16,7 +16,7 @@
 
 /**
  * Test if traces from the OpenTelemetry SDK are picked up as Exemplars.
- * <p/>
+ * <p>
  * In addition, we make sure that missing OpenTelemetry dependencies do not cause client_java to crash the application.
  **/
 public class ExemplarsOpenTelemetrySdkIT {
@@ -65,7 +65,7 @@ public void testGoodCase() throws IOException {
     /**
      * The dependency simpleclient_tracer_otel_agent is for getting the trace context from the OpenTelemetry Java agent.
      * As we are getting the trace context from the OpenTelemetry SDK and not from the agent, Exemplars should work.
-     * <p/>
+     * <p>
      * We test this because if a user excludes simpleclient_tracer_otel_agent from the transitive dependencies for some reason
      * we don't want client_java to break.
      */
@@ -78,7 +78,7 @@ public void testOtelAgentMissing() throws IOException, URISyntaxException {
     /**
      * The dependency simpleclient_tracer_otel is for getting the trace context from the OpenTelemetry SDK.
      * If this dependency is missing, Exemplars will be missing, but metrics should still work.
-     * <p/>
+     * <p>
      * We test this because users may exclude simpleclient_tracer_otel as a way to disable OpenTelemetry Exemplars.
      */
     @Testu}(j  (64441aee0be4d8e126583ea74ca23cb67dddfeefj  *integration_tests/it_java_versions/pom.xmlj  modifiedj  Kj  K)j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_java_versions%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>
@@ -72,53 +72,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j  (e854ed193574f7ef12b6e71638be38eb9c7e5305j  jintegration_tests/it_java_versions/src/test/java/io/prometheus/client/it/java_versions/JavaVersionsIT.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fjava_versions%2FJavaVersionsIT.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -1,5 +1,6 @@
 package io.prometheus.client.it.java_versions;
 
+import com.github.dockerjava.api.model.Ulimit;
 import io.prometheus.client.it.common.LogConsumer;
 import io.prometheus.client.it.common.Scraper;
 import io.prometheus.client.it.common.Version;
@@ -35,9 +36,7 @@ public static String[] images() {
             "openjdk:8-jre",
             "openjdk:11-jre",
             "openjdk:17",
-            "ticketfly/java:6",
             "adoptopenjdk/openjdk16:ubi-minimal-jre",
-            "azul/zulu-openjdk:6",
 
             // OpenJ9
             "ibmjava:8-jre",
@@ -50,6 +49,7 @@ public JavaVersionsIT(String image) throws IOException, URISyntaxException {
     exampleApplicationDir = Volume.create("it-java-versions")
             .copyFromTargetDirectory(exampleApplicationJar);
     javaContainer = new GenericContainer<>(image)
+            .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
             .withFileSystemBind(exampleApplicationDir.getHostPath(), "/app", BindMode.READ_ONLY)
             .withWorkingDirectory("/app")
             .withLogConsumer(LogConsumer.withPrefix(image))u}(j  (3090704cdb55be24a678bc5725c15ba5fbff8fbej  #integration_tests/it_log4j2/pom.xmlj  modifiedj  Kj  K,j  K-j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_log4j2%2Fpom.xmlj  ~https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>
@@ -88,56 +88,13 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <!-- We compile this for Java 6, but as log4j 2.15.0 requires Java >= 7 at runtime it will not run on -->
-                    <!-- Java 6 with the latest log4j version. However, let's keep Java 6 here to make it easy to manually -->
-                    <!-- downgrade to log4j 2.3 to run a quick test with Java 6. -->
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
 
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>u}(j  (8272880ba0c03be2b269001fe9aac4a7b4526ef7j  Vintegration_tests/it_log4j2/src/test/java/io/prometheus/client/it/log4j2/Log4j2IT.javaj  modifiedj  K j  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Flog4j2%2FLog4j2IT.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X]  @@ -24,8 +24,6 @@
 public class Log4j2IT {
 
     private final String image = "openjdk:8-jre";
-    // This test is green with a Java 6 image, but you need to downgrade the log4j version in pom.xml.
-    // private final String image = "azul/zulu-openjdk:6";
     private final Volume volume;
     private final GenericContainer<?> javaContainer;
 u}(j  (aa17740a1a38769a29bdff94c1e4a80af68f5053j  (integration_tests/it_pushgateway/pom.xmlj  modifiedj  Kj  K)j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>
@@ -69,53 +69,13 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <testSource>1.8</testSource>
-          <testTarget>1.8</testTarget>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
       </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <!-- Intellij does not support different Java versions for source and testSource -->
-      <!-- As a workaround, use Java 8 in Intellij. -->
-      <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-      <id>intellij</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <!-- This property is only set when you open the project in Intellij. -->
-          <!-- When you compile in the command line, the property will not be set -->
-          <!-- and this profile will not be used. -->
-          <name>idea.maven.embedder.version</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-              <source>1.8</source>
-              <target>1.8</target>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j  (d0fb6dac38a5c5ce33a641e43636b8636d5c3decj  eintegration_tests/it_pushgateway/src/test/java/io/prometheus/client/it/pushgateway/PushGatewayIT.javaj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.javaj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fclient%2Fit%2Fpushgateway%2FPushGatewayIT.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -1,5 +1,6 @@
 package io.prometheus.client.it.pushgateway;
 
+import com.github.dockerjava.api.model.Ulimit;
 import io.prometheus.client.it.common.LogConsumer;
 import io.prometheus.client.it.common.Scraper;
 import io.prometheus.client.it.common.Version;
@@ -33,8 +34,6 @@ public class PushGatewayIT {
     @Parameterized.Parameters(name = "{0}")
     public static String[] images() {
         return new String[] {
-                "azul/zulu-openjdk:6",
-                "openjdk:7",
                 "ibmjava:8-jre",
                 "openjdk:11-slim",
                 "openjdk:17"
@@ -47,13 +46,15 @@ public PushGatewayIT(String image) throws IOException, URISyntaxException {
                 .copyFromTargetDirectory(batchJobJar);
         Network network = Network.newNetwork();
         pushGatewayContainer = new GenericContainer<>("prom/pushgateway")
+                .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
                 .withCopyFileToContainer(MountableFile.forClasspathResource("web-config.yml", 0644), "/")
                 .withNetwork(network)
                 .withNetworkAliases("pushgateway")
                 .withLogConsumer(LogConsumer.withPrefix("prom/pushgateway"))
                 .withCommand("--web.config.file=/web-config.yml")
                 .withExposedPorts(9091);
         javaContainer = new GenericContainer<>(image)
+                .withCreateContainerCmdModifier(c -> c.getHostConfig().withUlimits(new Ulimit[]{new Ulimit("nofile", 65536L, 65536L)}))
                 .withFileSystemBind(batchJobDir.getHostPath(), "/app", BindMode.READ_ONLY)
                 .withNetwork(network)
                 .withWorkingDirectory("/app")u}(j  (487dba31d5597ce66a658992b8b9977871160b73j  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj  modifiedj  Kj  K	j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>
@@ -58,14 +58,6 @@
   <build>
     <finalName>${project.artifactId}</finalName>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>u}(j  (05a56956fc66fe059485a69aef350171c78564c1j  integration_tests/pom.xmlj  modifiedj  Kj  Kj  Kj  shttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fpom.xmlj  rhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/integration_tests%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X@  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(j  (a1259a5986f7d3cc0079a78d0021bae54ab34ad1j  pom.xmlj  modifiedj  Kj  Kj  Kj  _https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/pom.xmlj  ^https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/pom.xmlj  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XV
  @@ -4,8 +4,8 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>io.prometheus</groupId>
-    <artifactId>parent</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
 
     <name>Prometheus Java Suite</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -37,6 +37,17 @@
     </developers>
 
     <modules>
+        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
+        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
+        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
+        <module>prometheus-metrics-core</module>
+        <module>prometheus-metrics-config</module>
+        <module>prometheus-metrics-model</module>
+        <module>prometheus-metrics-tracer</module>
+        <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-servlet-jakarta</module>
+        <module>examples</module>
+
         <module>simpleclient</module>
         <module>simpleclient_common</module>
         <module>simpleclient_caffeine</module>
@@ -54,7 +65,7 @@
         <module>simpleclient_servlet_common</module>
         <module>simpleclient_servlet_jakarta</module>
         <module>simpleclient_spring_web</module>
-        <module>simpleclient_spring_boot</module>
+        <!-- <module>simpleclient_spring_boot</module> --> <!-- requires Java <= 11 to compile. removing to enable compilation with Java 17 -->
         <module>simpleclient_jetty</module>
         <module>simpleclient_jetty_jdk8</module>
         <module>simpleclient_tracer</module>
@@ -206,6 +217,7 @@
                     <linksource>true</linksource>
                     <source>8</source>
                     <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
+                    <sourcepath>src/main/java;src/main/generated</sourcepath>
                 </configuration>
                 <executions>
                     <execution>
@@ -218,11 +230,10 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>u}(j  (5810c19b79e0ad001fbcb0acc455f4e7f7e0d629j  !prometheus-metrics-config/pom.xmlj  addedj  K-j  K j  K-j  {https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-config</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Config</name>
+    <description>
+        Configuration for Prometheus metrics and exposition formats.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j  (7d996f6a560211062ec448f454682020914a5295j  ]prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExemplarsProperties.javaj  addedj  Krj  K j  Krj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExemplarsProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,114 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exemplars
+ */
+public class ExemplarsProperties {
+
+    private static final String MIN_RETENTION_PERIOD_SECONDS = "minRetentionPeriodSeconds";
+    private static final String MAX_RETENTION_PERIOD_SECONDS = "maxRetentionPeriodSeconds";
+    private static final String SAMPLE_INTERVAL_MILLISECONDS = "sampleIntervalMilliseconds";
+
+    private final Integer minRetentionPeriodSeconds;
+    private final Integer maxRetentionPeriodSeconds;
+    private final Integer sampleIntervalMilliseconds;
+
+    private ExemplarsProperties(
+            Integer minRetentionPeriodSeconds,
+            Integer maxRetentionPeriodSeconds,
+            Integer sampleIntervalMilliseconds) {
+        this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
+        this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
+        this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
+    }
+
+    /**
+     * Minimum time how long Exemplars are kept before they may be replaced by new Exemplars.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MIN_RETENTION_PERIOD_SECONDS}
+     */
+    public Integer getMinRetentionPeriodSeconds() {
+        return minRetentionPeriodSeconds;
+    }
+
+    /**
+     * Maximum time how long Exemplars are kept before they are evicted.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_MAX_RETENTION_PERIOD_SECONDS}
+     */
+    public Integer getMaxRetentionPeriodSeconds() {
+        return maxRetentionPeriodSeconds;
+    }
+
+    /**
+     * Time between attempts to sample new Exemplars. This is a performance improvement for high-frequency
+     * applications, because with the sample interval we make sure that the exemplar sampler is not called
+     * for every single request.
+     * <p>
+     * Default see {@code ExemplarSamplerConfig.DEFAULT_SAMPLE_INTERVAL_MILLISECONDS}
+     */
+    public Integer getSampleIntervalMilliseconds() {
+        return sampleIntervalMilliseconds;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExemplarsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Integer minRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MIN_RETENTION_PERIOD_SECONDS, properties);
+        Integer maxRetentionPeriodSeconds = Util.loadInteger(prefix + "." + MAX_RETENTION_PERIOD_SECONDS, properties);
+        Integer sampleIntervalMilliseconds = Util.loadInteger(prefix + "." + SAMPLE_INTERVAL_MILLISECONDS, properties);
+
+        Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MIN_RETENTION_PERIOD_SECONDS);
+        Util.assertValue(minRetentionPeriodSeconds, t -> t > 0, "Expecting value > 0.", prefix, MAX_RETENTION_PERIOD_SECONDS);
+        Util.assertValue(sampleIntervalMilliseconds, t -> t > 0, "Expecting value > 0.", prefix, SAMPLE_INTERVAL_MILLISECONDS);
+
+        if (minRetentionPeriodSeconds != null && maxRetentionPeriodSeconds != null) {
+            if (minRetentionPeriodSeconds > maxRetentionPeriodSeconds) {
+                throw new PrometheusPropertiesException(prefix + "." + MIN_RETENTION_PERIOD_SECONDS + " must not be greater than " + prefix + "." + MAX_RETENTION_PERIOD_SECONDS + ".");
+            }
+        }
+
+        return new ExemplarsProperties(
+                minRetentionPeriodSeconds,
+                maxRetentionPeriodSeconds,
+                sampleIntervalMilliseconds
+        );
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer minRetentionPeriodSeconds;
+        private Integer maxRetentionPeriodSeconds;
+        private Integer sampleIntervalMilliseconds;
+
+        private Builder() {
+        }
+
+        public Builder withMinRetentionPeriodSeconds(int minRetentionPeriodSeconds) {
+            this.minRetentionPeriodSeconds = minRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withMaxRetentionPeriodSeconds(int maxRetentionPeriodSeconds) {
+            this.maxRetentionPeriodSeconds = maxRetentionPeriodSeconds;
+            return this;
+        }
+
+        public Builder withSampleIntervalMilliseconds(int sampleIntervalMilliseconds) {
+            this.sampleIntervalMilliseconds = sampleIntervalMilliseconds;
+            return this;
+        }
+
+        public ExemplarsProperties builder() {
+            return new ExemplarsProperties(minRetentionPeriodSeconds, maxRetentionPeriodSeconds, sampleIntervalMilliseconds);
+        }
+    }
+}u}(j  (2509853293246174435bd8a8fc49bb074363eeb8j  bprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterFilterProperties.javaj  addedj  Kuj  K j  Kuj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterFilterProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,117 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter.filter
+ */
+public class ExporterFilterProperties {
+
+    public static final String NAME_MUST_BE_EQUAL_TO = "nameMustBeEqualTo";
+    public static final String NAME_MUST_NOT_BE_EQUAL_TO = "nameMustNotBeEqualTo";
+    public static final String NAME_MUST_START_WITH = "nameMustStartWith";
+    public static final String NAME_MUST_NOT_START_WITH = "nameMustNotStartWith";
+
+    private final List<String> allowedNames;
+    private final List<String> excludedNames;
+    private final List<String> allowedPrefixes;
+    private final List<String> excludedPrefixes;
+
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes) {
+        this(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, "");
+    }
+
+    private ExporterFilterProperties(List<String> allowedNames, List<String> excludedNames, List<String> allowedPrefixes, List<String> excludedPrefixes, String prefix) {
+        this.allowedNames = allowedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedNames));
+        this.excludedNames = excludedNames == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedNames));
+        this.allowedPrefixes = allowedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(allowedPrefixes));
+        this.excludedPrefixes = excludedPrefixes == null ? null : Collections.unmodifiableList(new ArrayList<>(excludedPrefixes));
+        validate(prefix);
+    }
+
+    public List<String> getAllowedNames() {
+        return allowedNames;
+    }
+
+    public List<String> getExcludedNames() {
+        return excludedNames;
+    }
+
+    public List<String> getAllowedPrefixes() {
+        return allowedPrefixes;
+    }
+
+    public List<String> getExcludedPrefixes() {
+        return excludedPrefixes;
+    }
+
+    private void validate(String prefix) throws PrometheusPropertiesException {
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterFilterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        List<String> allowedNames = Util.loadStringList(prefix + "." + NAME_MUST_BE_EQUAL_TO, properties);
+        List<String> excludedNames = Util.loadStringList(prefix + "." + NAME_MUST_NOT_BE_EQUAL_TO, properties);
+        List<String> allowedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_START_WITH, properties);
+        List<String> excludedPrefixes = Util.loadStringList(prefix + "." + NAME_MUST_NOT_START_WITH, properties);
+        return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes, prefix);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private List<String> allowedNames;
+        private List<String> excludedNames;
+        private List<String> allowedPrefixes;
+        private List<String> excludedPrefixes;
+
+        private Builder() {
+        }
+
+        /**
+         * Only allowed metric names will be exposed.
+         */
+        public Builder withAllowedNames(String... allowedNames) {
+            this.allowedNames = Arrays.asList(allowedNames);
+            return this;
+        }
+
+        /**
+         * Excluded metric names will not be exposed.
+         */
+        public Builder withExcludedNames(String... excludedNames) {
+            this.excludedNames = Arrays.asList(excludedNames);
+            return this;
+        }
+
+        /**
+         * Only metrics with a name starting with an allowed prefix will be exposed.
+         */
+        public Builder withAllowedPrefixes(String... allowedPrefixes) {
+            this.allowedPrefixes = Arrays.asList(allowedPrefixes);
+            return this;
+        }
+
+        /**
+         * Metrics with a name starting with an excluded prefix will not be exposed.
+         */
+        public Builder withExcludedPrefixes(String... excludedPrefixes) {
+            this.excludedPrefixes = Arrays.asList(excludedPrefixes);
+            return this;
+        }
+
+        public ExporterFilterProperties build() {
+            return new ExporterFilterProperties(allowedNames, excludedNames, allowedPrefixes, excludedPrefixes);
+        }
+    }
+}uq      }(j  (8c9d7aa3913d66d7b5a2140f5d49acd93d1eff7fj  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj  addedj  K2j  K j  K2j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,50 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter.httpServer
+ */
+public class ExporterHttpServerProperties {
+
+    // TODO: Not used yet, will be used when we port the simpleclient_httpserver module to the new data model.
+
+    private static final String PORT = "port";
+    private final Integer port;
+
+    private ExporterHttpServerProperties(Integer port) {
+        this.port = port;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterHttpServerProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Integer port = Util.loadInteger(prefix + "." + PORT, properties);
+        Util.assertValue(port, t -> t > 0, "Expecting value > 0", prefix, PORT);
+        return new ExporterHttpServerProperties(port);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Integer port;
+
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        public ExporterHttpServerProperties build() {
+            return new ExporterHttpServerProperties(port);
+        }
+    }
+}u}(j  (016d399f044544938a5a34bee32e3d429e9dd35fj  \prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterProperties.javaj  addedj  KNj  K j  KNj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,78 @@
+package io.prometheus.metrics.config;
+
+import java.util.Map;
+
+/**
+ * Properties starting with io.prometheus.exporter
+ */
+public class ExporterProperties {
+
+    private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
+    private static final String EXEMPLARS_ON_ALL_METRIC_TYPES = "exemplarsOnAllMetricTypes";
+
+    private final Boolean includeCreatedTimestamps;
+    private final Boolean exemplarsOnAllMetricTypes;
+
+    private ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
+        this.includeCreatedTimestamps = includeCreatedTimestamps;
+        this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
+    }
+
+    /**
+     * Include the {@code _created} timestamps in text format? Default is {@code false}.
+     */
+    public boolean getIncludeCreatedTimestamps() {
+        return includeCreatedTimestamps != null && includeCreatedTimestamps;
+    }
+
+    /**
+     * Allow Exemplars on all metric types in OpenMetrics format?
+     * Default is {@code false}, which means Exemplars will only be added for Counters and Histograms.
+     */
+    public boolean getExemplarsOnAllMetricTypes() {
+        return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Boolean includeCreatedTimestamps = Util.loadBoolean(prefix + "." + INCLUDE_CREATED_TIMESTAMPS, properties);
+        Boolean exemplarsOnAllMetricTypes = Util.loadBoolean(prefix + "." + EXEMPLARS_ON_ALL_METRIC_TYPES, properties);
+        return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Boolean includeCreatedTimestamps;
+        private Boolean exemplarsOnAllMetricTypes;
+
+        private Builder() {
+        }
+
+        /**
+         * See {@link #getIncludeCreatedTimestamps()}
+         */
+        public Builder withIncludeCreatedTimestamps(boolean includeCreatedTimestamps) {
+            this.includeCreatedTimestamps = includeCreatedTimestamps;
+            return this;
+        }
+
+        /**
+         * See {@link #getExemplarsOnAllMetricTypes()}.
+         */
+        public Builder withExemplarsOnAllMetricTypes(boolean exemplarsOnAllMetricTypes) {
+            this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
+            return this;
+        }
+
+        public ExporterProperties build() {
+            return new ExporterProperties(includeCreatedTimestamps, exemplarsOnAllMetricTypes);
+        }
+    }
+}u}(j  (10966b3c8215159c783db7b3476d360bde26b707j  [prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/MetricsProperties.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FMetricsProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XK  @@ -0,0 +1,432 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static java.util.Collections.unmodifiableList;
+
+/**
+ * Properties starting with io.prometheus.metrics
+ */
+public class MetricsProperties {
+
+    private static final String EXEMPLARS_ENABLED = "exemplarsEnabled";
+    private static final String HISTOGRAM_NATIVE_ONLY = "histogramNativeOnly";
+    private static final String HISTOGRAM_CLASSIC_ONLY = "histogramClassicOnly";
+    private static final String HISTOGRAM_CLASSIC_UPPER_BOUNDS = "histogramClassicUpperBounds";
+    private static final String HISTOGRAM_NATIVE_INITIAL_SCHEMA = "histogramNativeInitialSchema";
+    private static final String HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD = "histogramNativeMinZeroThreshold";
+    private static final String HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD = "histogramNativeMaxZeroThreshold";
+    private static final String HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS = "histogramNativeMaxNumberOfBuckets"; // 0 means unlimited number of buckets
+    private static final String HISTOGRAM_NATIVE_RESET_DURATION_SECONDS = "histogramNativeResetDurationSeconds"; // 0 means no reset
+    private static final String SUMMARY_QUANTILES = "summaryQuantiles";
+    private static final String SUMMARY_QUANTILE_ERRORS = "summaryQuantileErrors";
+    private static final String SUMMARY_MAX_AGE_SECONDS = "summaryMaxAgeSeconds";
+    private static final String SUMMARY_NUMBER_OF_AGE_BUCKETS = "summaryNumberOfAgeBuckets";
+
+    private final Boolean exemplarsEnabled;
+    private final Boolean histogramNativeOnly;
+    private final Boolean histogramClassicOnly;
+    private final List<Double> histogramClassicUpperBounds;
+    private final Integer histogramNativeInitialSchema;
+    private final Double histogramNativeMinZeroThreshold;
+    private final Double histogramNativeMaxZeroThreshold;
+    private final Integer histogramNativeMaxNumberOfBuckets;
+    private final Long histogramNativeResetDurationSeconds;
+    private final List<Double> summaryQuantiles;
+    private final List<Double> summaryQuantileErrors;
+    private final Long summaryMaxAgeSeconds;
+    private final Integer summaryNumberOfAgeBuckets;
+
+    public MetricsProperties(
+            Boolean exemplarsEnabled,
+            Boolean histogramNativeOnly,
+            Boolean histogramClassicOnly,
+            List<Double> histogramClassicUpperBounds,
+            Integer histogramNativeInitialSchema,
+            Double histogramNativeMinZeroThreshold,
+            Double histogramNativeMaxZeroThreshold,
+            Integer histogramNativeMaxNumberOfBuckets,
+            Long histogramNativeResetDurationSeconds,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
+            Long summaryMaxAgeSeconds,
+            Integer summaryNumberOfAgeBuckets) {
+        this(exemplarsEnabled,
+                histogramNativeOnly,
+                histogramClassicOnly,
+                histogramClassicUpperBounds,
+                histogramNativeInitialSchema,
+                histogramNativeMinZeroThreshold,
+                histogramNativeMaxZeroThreshold,
+                histogramNativeMaxNumberOfBuckets,
+                histogramNativeResetDurationSeconds,
+                summaryQuantiles,
+                summaryQuantileErrors,
+                summaryMaxAgeSeconds,
+                summaryNumberOfAgeBuckets,
+                "");
+    }
+
+    private MetricsProperties(
+            Boolean exemplarsEnabled,
+            Boolean histogramNativeOnly,
+            Boolean histogramClassicOnly,
+            List<Double> histogramClassicUpperBounds,
+            Integer histogramNativeInitialSchema,
+            Double histogramNativeMinZeroThreshold,
+            Double histogramNativeMaxZeroThreshold,
+            Integer histogramNativeMaxNumberOfBuckets,
+            Long histogramNativeResetDurationSeconds,
+            List<Double> summaryQuantiles,
+            List<Double> summaryQuantileErrors,
+            Long summaryMaxAgeSeconds,
+            Integer summaryNumberOfAgeBuckets,
+            String configPropertyPrefix) {
+        this.exemplarsEnabled = exemplarsEnabled;
+        this.histogramNativeOnly = isHistogramNativeOnly(histogramClassicOnly, histogramNativeOnly);
+        this.histogramClassicOnly = isHistogramClassicOnly(histogramClassicOnly, histogramNativeOnly);
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds == null ? null : unmodifiableList(new ArrayList<>(histogramClassicUpperBounds));
+        this.histogramNativeInitialSchema = histogramNativeInitialSchema;
+        this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
+        this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
+        this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
+        this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
+        this.summaryQuantiles = summaryQuantiles == null ? null : unmodifiableList(new ArrayList<>(summaryQuantiles));
+        this.summaryQuantileErrors = summaryQuantileErrors == null ? null : unmodifiableList(new ArrayList<>(summaryQuantileErrors));
+        this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
+        this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
+        validate(configPropertyPrefix);
+    }
+
+
+    private Boolean isHistogramClassicOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) {
+        if (histogramClassicOnly == null && histogramNativeOnly == null) {
+            return null;
+        }
+        if (histogramClassicOnly != null) {
+            return histogramClassicOnly;
+        }
+        return !histogramNativeOnly;
+    }
+
+    private Boolean isHistogramNativeOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) {
+        if (histogramClassicOnly == null && histogramNativeOnly == null) {
+            return null;
+        }
+        if (histogramNativeOnly != null) {
+            return histogramNativeOnly;
+        }
+        return !histogramClassicOnly;
+    }
+
+    private void validate(String prefix) throws PrometheusPropertiesException {
+        Util.assertValue(histogramNativeInitialSchema, s -> s >= -4 && s <= 8, "Expecting number between -4 and +8.", prefix, HISTOGRAM_NATIVE_INITIAL_SCHEMA);
+        Util.assertValue(histogramNativeMinZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD);
+        Util.assertValue(histogramNativeMaxZeroThreshold, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
+        Util.assertValue(histogramNativeMaxNumberOfBuckets, n -> n >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS);
+        Util.assertValue(histogramNativeResetDurationSeconds, t -> t >= 0, "Expecting value >= 0.", prefix, HISTOGRAM_NATIVE_RESET_DURATION_SECONDS);
+        Util.assertValue(summaryMaxAgeSeconds, t -> t > 0, "Expecting value > 0", prefix, SUMMARY_MAX_AGE_SECONDS);
+        Util.assertValue(summaryNumberOfAgeBuckets, t -> t > 0, "Expecting value > 0", prefix, SUMMARY_NUMBER_OF_AGE_BUCKETS);
+
+        if (Boolean.TRUE.equals(histogramNativeOnly) && Boolean.TRUE.equals(histogramClassicOnly)) {
+            throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_ONLY + " and " + prefix + "." + HISTOGRAM_CLASSIC_ONLY + " cannot both be true");
+        }
+
+        if (histogramNativeMinZeroThreshold != null && histogramNativeMaxZeroThreshold != null) {
+            if (histogramNativeMinZeroThreshold > histogramNativeMaxZeroThreshold) {
+                throw new PrometheusPropertiesException(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD + " cannot be greater than " + prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD);
+            }
+        }
+
+        if (summaryQuantiles != null) {
+            for (double quantile : summaryQuantiles) {
+                if (quantile < 0 || quantile > 1) {
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILES + ": Expecting 0.0 <= quantile <= 1.0");
+                }
+            }
+        }
+
+        if (summaryQuantileErrors != null) {
+            if (summaryQuantiles == null) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Can't configure " + SUMMARY_QUANTILE_ERRORS + " without configuring " + SUMMARY_QUANTILES);
+            }
+            if (summaryQuantileErrors.size() != summaryQuantiles.size()) {
+                throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": must have the same length as " + SUMMARY_QUANTILES);
+            }
+            for (double error : summaryQuantileErrors) {
+                if (error < 0 || error > 1) {
+                    throw new PrometheusPropertiesException(prefix + "." + SUMMARY_QUANTILE_ERRORS + ": Expecting 0.0 <= error <= 1.0");
+                }
+            }
+        }
+    }
+
+    /**
+     * This is the only configuration property that can be applied to all metric types.
+     * You can use it to turn Exemplar support off. Default is {@code true}.
+     */
+    public Boolean getExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    /**
+     * See {@code Histogram.Builder.nativeOnly()}
+     */
+    public Boolean getHistogramNativeOnly() {
+        return histogramNativeOnly;
+    }
+
+    /**
+     * See {@code Histogram.Builder.classicOnly()}
+     */
+    public Boolean getHistogramClassicOnly() {
+        return histogramClassicOnly;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withClassicBuckets()}
+     */
+    public List<Double> getHistogramClassicUpperBounds() {
+        return histogramClassicUpperBounds;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeInitialSchema()}
+     */
+    public Integer getHistogramNativeInitialSchema() {
+        return histogramNativeInitialSchema;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMinZeroThreshold()}
+     */
+    public Double getHistogramNativeMinZeroThreshold() {
+        return histogramNativeMinZeroThreshold;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMaxZeroThreshold()}
+     */
+    public Double getHistogramNativeMaxZeroThreshold() {
+        return histogramNativeMaxZeroThreshold;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeMaxNumberOfBuckets()}
+     */
+    public Integer getHistogramNativeMaxNumberOfBuckets() {
+        return histogramNativeMaxNumberOfBuckets;
+    }
+
+    /**
+     * See {@code Histogram.Builder.withNativeResetDuration()}
+     */
+    public Long getHistogramNativeResetDurationSeconds() {
+        return histogramNativeResetDurationSeconds;
+    }
+
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     */
+    public List<Double> getSummaryQuantiles() {
+        return summaryQuantiles;
+    }
+
+    /**
+     * See {@code Summary.Builder.withQuantile()}
+     * <p>
+     * Returns {@code null} only if {@link #getSummaryQuantiles()} is also {@code null}.
+     * Returns an empty list if {@link #getSummaryQuantiles()} are specified without specifying errors.
+     * If the list is not empty, it has the same size as {@link #getSummaryQuantiles()}.
+     */
+    public List<Double> getSummaryQuantileErrors() {
+        if (summaryQuantiles != null) {
+            if (summaryQuantileErrors == null) {
+                return Collections.emptyList();
+            }
+        }
+        return summaryQuantileErrors;
+    }
+
+    /**
+     * See {@code Summary.Builder.withMaxAgeSeconds()}
+     */
+    public Long getSummaryMaxAgeSeconds() {
+        return summaryMaxAgeSeconds;
+    }
+
+    /**
+     * See {@code Summary.Builder.withNumberOfAgeBuckets()}
+     */
+    public Integer getSummaryNumberOfAgeBuckets() {
+        return summaryNumberOfAgeBuckets;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static MetricsProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return new MetricsProperties(
+                Util.loadBoolean(prefix + "." + EXEMPLARS_ENABLED, properties),
+                Util.loadBoolean(prefix + "." + HISTOGRAM_NATIVE_ONLY, properties),
+                Util.loadBoolean(prefix + "." + HISTOGRAM_CLASSIC_ONLY, properties),
+                Util.loadDoubleList(prefix + "." + HISTOGRAM_CLASSIC_UPPER_BOUNDS, properties),
+                Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_INITIAL_SCHEMA, properties),
+                Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD, properties),
+                Util.loadDouble(prefix + "." + HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD, properties),
+                Util.loadInteger(prefix + "." + HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS, properties),
+                Util.loadLong(prefix + "." + HISTOGRAM_NATIVE_RESET_DURATION_SECONDS, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILES, properties),
+                Util.loadDoubleList(prefix + "." + SUMMARY_QUANTILE_ERRORS, properties),
+                Util.loadLong(prefix + "." + SUMMARY_MAX_AGE_SECONDS, properties),
+                Util.loadInteger(prefix + "." + SUMMARY_NUMBER_OF_AGE_BUCKETS, properties),
+                prefix);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private Boolean exemplarsEnabled;
+        private Boolean histogramNativeOnly;
+        private Boolean histogramClassicOnly;
+        private List<Double> histogramClassicUpperBounds;
+        private Integer histogramNativeInitialSchema;
+        private Double histogramNativeMinZeroThreshold;
+        private Double histogramNativeMaxZeroThreshold;
+        private Integer histogramNativeMaxNumberOfBuckets;
+        private Long histogramNativeResetDurationSeconds;
+        private List<Double> summaryQuantiles;
+        private List<Double> summaryQuantileErrors;
+        private Long summaryMaxAgeSeconds;
+        private Integer summaryNumberOfAgeBuckets;
+
+        private Builder() {
+        }
+
+        public MetricsProperties build() {
+            return new MetricsProperties(exemplarsEnabled,
+                    histogramNativeOnly,
+                    histogramClassicOnly,
+                    histogramClassicUpperBounds,
+                    histogramNativeInitialSchema,
+                    histogramNativeMinZeroThreshold,
+                    histogramNativeMaxZeroThreshold,
+                    histogramNativeMaxNumberOfBuckets,
+                    histogramNativeResetDurationSeconds,
+                    summaryQuantiles,
+                    summaryQuantileErrors,
+                    summaryMaxAgeSeconds,
+                    summaryNumberOfAgeBuckets);
+        }
+
+        /**
+         * See {@link MetricsProperties#getExemplarsEnabled()}
+         */
+        public Builder withExemplarsEnabled(Boolean exemplarsEnabled) {
+            this.exemplarsEnabled = exemplarsEnabled;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeOnly()}
+         */
+        public Builder withHistogramNativeOnly(Boolean histogramNativeOnly) {
+            this.histogramNativeOnly = histogramNativeOnly;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramClassicOnly()}
+         */
+        public Builder withHistogramClassicOnly(Boolean histogramClassicOnly) {
+            this.histogramClassicOnly = histogramClassicOnly;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramClassicUpperBounds()}
+         */
+        public Builder withHistogramClassicUpperBounds(double... histogramClassicUpperBounds) {
+            this.histogramClassicUpperBounds = Util.toList(histogramClassicUpperBounds);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeInitialSchema()}
+         */
+        public Builder withHistogramNativeInitialSchema(Integer histogramNativeInitialSchema) {
+            this.histogramNativeInitialSchema = histogramNativeInitialSchema;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMinZeroThreshold()}
+         */
+        public Builder withHistogramNativeMinZeroThreshold(Double histogramNativeMinZeroThreshold) {
+            this.histogramNativeMinZeroThreshold = histogramNativeMinZeroThreshold;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMaxZeroThreshold()}
+         */
+        public Builder withHistogramNativeMaxZeroThreshold(Double histogramNativeMaxZeroThreshold) {
+            this.histogramNativeMaxZeroThreshold = histogramNativeMaxZeroThreshold;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeMaxNumberOfBuckets()}
+         */
+        public Builder withHistogramNativeMaxNumberOfBuckets(Integer histogramNativeMaxNumberOfBuckets) {
+            this.histogramNativeMaxNumberOfBuckets = histogramNativeMaxNumberOfBuckets;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getHistogramNativeResetDurationSeconds()}
+         */
+        public Builder withHistogramNativeResetDurationSeconds(Long histogramNativeResetDurationSeconds) {
+            this.histogramNativeResetDurationSeconds = histogramNativeResetDurationSeconds;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryQuantiles()}
+         */
+        public Builder withSummaryQuantiles(double... summaryQuantiles) {
+            this.summaryQuantiles = Util.toList(summaryQuantiles);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryQuantileErrors()}
+         */
+        public Builder withSummaryQuantileErrors(double... summaryQuantileErrors) {
+            this.summaryQuantileErrors = Util.toList(summaryQuantileErrors);
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryMaxAgeSeconds()}
+         */
+        public Builder withSummaryMaxAgeSeconds(Long summaryMaxAgeSeconds) {
+            this.summaryMaxAgeSeconds = summaryMaxAgeSeconds;
+            return this;
+        }
+
+        /**
+         * See {@link MetricsProperties#getSummaryNumberOfAgeBuckets()}
+         */
+        public Builder withSummaryNumberOfAgeBuckets(Integer summaryNumberOfAgeBuckets) {
+            this.summaryNumberOfAgeBuckets = summaryNumberOfAgeBuckets;
+            return this;
+        }
+    }
+}u}(j  (9341c5988aa532d3de9b2288cae7de65b5916514j  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj  addedj  KOj  K j  KOj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,79 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The Prometheus Java client library can be configured at runtime (e.g. using a properties file).
+ * <p>
+ * This class represents the runtime configuration.
+ */
+public class PrometheusProperties {
+
+    private static final PrometheusProperties instance = PrometheusPropertiesLoader.load();
+
+    private final MetricsProperties defaultMetricsProperties;
+    private final Map<String, MetricsProperties> metricProperties = new HashMap<>();
+    private final ExemplarsProperties exemplarProperties;
+    private final ExporterProperties exporterProperties;
+    private final ExporterFilterProperties exporterFilterProperties;
+    private final ExporterHttpServerProperties httpServerConfig;
+
+    /**
+     * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
+     * <ul>
+     *     <li>{@code prometheus.properties} file found in the classpath.</li>
+     *     <li>Properties file specified in the {@code PROMETHEUS_CONFIG} environment variable or the {@code prometheus.config} system property.</li>
+     *     <li>Individual properties from system properties.</li>
+     * </ul>
+     */
+    public static PrometheusProperties get() throws PrometheusPropertiesException {
+        return instance;
+    }
+
+    public PrometheusProperties(
+            MetricsProperties defaultMetricsProperties,
+            Map<String, MetricsProperties> metricProperties,
+            ExemplarsProperties exemplarProperties,
+            ExporterProperties exporterProperties,
+            ExporterFilterProperties exporterFilterProperties,
+            ExporterHttpServerProperties httpServerConfig) {
+        this.defaultMetricsProperties = defaultMetricsProperties;
+        this.metricProperties.putAll(metricProperties);
+        this.exemplarProperties = exemplarProperties;
+        this.exporterProperties = exporterProperties;
+        this.exporterFilterProperties = exporterFilterProperties;
+        this.httpServerConfig = httpServerConfig;
+    }
+
+    /**
+     * The default metric properties apply for metrics where {@link #getMetricProperties(String)} is {@code null}.
+     */
+    public MetricsProperties getDefaultMetricProperties() {
+        return defaultMetricsProperties;
+    }
+
+    /**
+     * Properties specific for one metric. Should be merged with {@link #getDefaultMetricProperties()}.
+     * May return {@code null} if no metric-specific properties are configured for a metric name.
+     */
+    public MetricsProperties getMetricProperties(String metricName) {
+        return metricProperties.get(metricName);
+    }
+
+    public ExemplarsProperties getExemplarProperties() {
+        return exemplarProperties;
+    }
+
+    public ExporterProperties getExporterProperties() {
+        return exporterProperties;
+    }
+
+    public ExporterFilterProperties getExporterFilterProperties() {
+        return exporterFilterProperties;
+    }
+
+    public ExporterHttpServerProperties getExporterHttpServerProperties() {
+        return httpServerConfig;
+    }
+}u}(j  (e41009ca2765dcc7aad02e95de7282ab08ed45e7j  gprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesException.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesException.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XG  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.config;
+
+public class PrometheusPropertiesException extends RuntimeException {
+
+    public PrometheusPropertiesException(String msg) {
+        super(msg);
+    }
+
+    public PrometheusPropertiesException(String msg, Exception cause) {
+        super(msg, cause);
+    }
+}u}(j  (ba52372e5010e517d9e84b39236bdc5c067724c6j  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj  addedj  Kij  K j  Kij  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xb  @@ -0,0 +1,105 @@
+package io.prometheus.metrics.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * The Properties Loader is early stages.
+ * <p>
+ * It would be great to implement a subset of
+ * <a href="https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/features.html#features.external-config">Spring Boot's Externalized Configuration</a>,
+ * like support for YAML, Properties, and env vars, or support for Spring's naming conventions for properties.
+ */
+public class PrometheusPropertiesLoader {
+
+    /**
+     * See {@link PrometheusProperties#get()}.
+     */
+    public static PrometheusProperties load() throws PrometheusPropertiesException {
+        Map<Object, Object> properties = loadProperties();
+        Map<String, MetricsProperties> metricsConfigs = loadMetricsConfigs(properties);
+        MetricsProperties defaultMetricsProperties = MetricsProperties.load("io.prometheus.metrics", properties);
+        ExemplarsProperties exemplarConfig = ExemplarsProperties.load("io.prometheus.exemplars", properties);
+        ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
+        ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
+        ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        validateAllPropertiesProcessed(properties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+    }
+
+    // This will remove entries from properties when they are processed.
+    private static Map<String, MetricsProperties> loadMetricsConfigs(Map<Object, Object> properties) {
+        Map<String, MetricsProperties> result = new HashMap<>();
+        Pattern pattern = Pattern.compile("io\\.prometheus\\.metrics\\.([^.]+)\\.");
+        // Create a copy of the keySet() for iterating. We cannot iterate directly over keySet()
+        // because entries are removed when MetricsConfig.load(...) is called.
+        Set<String> propertyNames = new HashSet<>();
+        for (Object key : properties.keySet()) {
+            propertyNames.add(key.toString());
+        }
+        for (String propertyName : propertyNames) {
+            Matcher matcher = pattern.matcher(propertyName);
+            if (matcher.find()) {
+                String metricName = matcher.group(1);
+                if (!result.containsKey(metricName)) {
+                    result.put(metricName, MetricsProperties.load("io.prometheus.metrics." + metricName, properties));
+                }
+            }
+        }
+        return result;
+    }
+
+    // If there are properties left starting with io.prometheus it's likely a typo,
+    // because we didn't use that property.
+    // Throw a config error to let the user know that this property doesn't exist.
+    private static void validateAllPropertiesProcessed(Map<Object, Object> properties) {
+        for (Object key : properties.keySet()) {
+            if (key.toString().startsWith("io.prometheus")) {
+                throw new PrometheusPropertiesException(key + ": Unknown property");
+            }
+        }
+    }
+
+    private static Map<Object, Object> loadProperties() {
+        Map<Object, Object> properties = new HashMap<>();
+        properties.putAll(loadPropertiesFromClasspath());
+        properties.putAll(loadPropertiesFromFile()); // overriding the entries from the classpath file
+        properties.putAll(System.getProperties()); // overriding the entries from the properties file
+        // TODO: Add environment variables like EXEMPLARS_ENABLED.
+        return properties;
+    }
+
+    private static Properties loadPropertiesFromClasspath() {
+        Properties properties = new Properties();
+        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("prometheus.properties")) {
+            properties.load(stream);
+        } catch (Exception ignored) {
+        }
+        return properties;
+    }
+
+    private static Properties loadPropertiesFromFile() throws PrometheusPropertiesException {
+        Properties properties = new Properties();
+        String path = System.getProperty("prometheus.config");
+        if (System.getenv("PROMETHEUS_CONFIG") != null) {
+            path = System.getenv("PROMETHEUS_CONFIG");
+        }
+        if (path != null) {
+            try (InputStream stream = Files.newInputStream(Paths.get(path))) {
+                properties.load(stream);
+            } catch (IOException e) {
+                throw new PrometheusPropertiesException("Failed to read Prometheus properties from " + path + ": " + e.getMessage(), e);
+            }
+        }
+        return properties;
+    }
+}u}(j  (8f1357134814268c8bef6fd212d0c5bb46140126j  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj  addedj  Kpj  K j  Kpj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X|  @@ -0,0 +1,112 @@
+package io.prometheus.metrics.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
+
+class Util {
+
+    private static String getProperty(String name, Map<Object, Object> properties) {
+        Object object = properties.remove(name);
+        if (object != null) {
+            return object.toString();
+        }
+        return null;
+    }
+
+    static Boolean loadBoolean(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            if (!"true".equalsIgnoreCase(property) && !"false".equalsIgnoreCase(property)) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting 'true' or 'false'");
+            }
+            return Boolean.parseBoolean(property);
+        }
+        return null;
+    }
+
+    static List<Double> toList(double... values) {
+        if (values == null) {
+            return null;
+        }
+        List<Double> result = new ArrayList<>(values.length);
+        for (double value : values) {
+            result.add(value);
+        }
+        return result;
+    }
+
+    static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            return Arrays.asList(property.split("\\s*,\\s*"));
+        }
+        return null;
+    }
+
+    static List<Double> loadDoubleList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] numbers = property.split("\\s*,\\s*");
+            Double[] result = new Double[numbers.length];
+            for (int i = 0; i < numbers.length; i++) {
+                try {
+                    if ("+Inf".equals(numbers[i].trim())) {
+                        result[i] = Double.POSITIVE_INFINITY;
+                    } else {
+                        result[i] = Double.parseDouble(numbers[i]);
+                    }
+                } catch (NumberFormatException e) {
+                    throw new PrometheusPropertiesException(name + "=" + property + ": Expecting comma separated list of double values");
+                }
+            }
+            return Arrays.asList(result);
+        }
+        return null;
+    }
+
+    static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Integer.parseInt(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting integer value");
+            }
+        }
+        return null;
+    }
+
+    static Double loadDouble(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Double.parseDouble(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting double value");
+            }
+        }
+        return null;
+    }
+
+    static Long loadLong(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String property = getProperty(name, properties);
+        if (property != null) {
+            try {
+                return Long.parseLong(property);
+            } catch (NumberFormatException e) {
+                throw new PrometheusPropertiesException(name + "=" + property + ": Expecting long value");
+            }
+        }
+        return null;
+    }
+
+    static <T extends Number> void assertValue(T number, Predicate<T> predicate, String message, String prefix, String name) throws PrometheusPropertiesException {
+        if (number != null && !predicate.test(number)) {
+            String fullMessage = prefix == null ? name + ": " + message : prefix + "." + name + ": " + message;
+            throw new PrometheusPropertiesException(fullMessage);
+        }
+    }
+}u}(j  (45fec1be02d04501b2ca84257c08aac56e2d18a0j  bprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XL  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.config;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class PrometheusPropertiesTest {
+
+    @Test
+    public void testPrometheusConfig() {
+        PrometheusProperties result = PrometheusProperties.get();
+        Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().size());
+        Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().size());
+    }
+
+    @Test
+    public void testEmptyUpperBounds() throws IOException {
+        Properties properties = new Properties();
+        try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("emptyUpperBounds.properties")) {
+            properties.load(stream);
+        }
+        Assert.assertEquals(1, properties.size());
+        MetricsProperties.load("io.prometheus.metrics", properties);
+        Assert.assertEquals(0, properties.size());
+    }
+}u}(j  (c019761ca5194c0c99671e26095fb3ffb69566c9j  Hprometheus-metrics-config/src/test/resources/emptyUpperBounds.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2FemptyUpperBounds.properties?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  C@@ -0,0 +1 @@
+io.prometheus.metrics.histogramClassicUpperBounds =,u}(j  (56b3daeb354e590015008fb2e98342eafbd3165aj  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,20 @@
+io.prometheus.metrics.histogramClassicUpperBounds = .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10
+io.prometheus.metrics.http_duration_seconds.histogramClassicUpperBounds = .005, .01, .015, .02
+io.prometheus.metrics.summaryQuantiles = 0.5, 0.95, 0.99
+io.prometheus.metrics.summaryQuantileErrors = 0.01, 0.01, 0.001
+
+io.prometheus.metrics.exemplarsEnabled = true
+io.prometheus.metrics.http_duration_seconds.exemplarsEnabled = true
+
+io.prometheus.exporter.includeCreatedTimestamps = false
+io.prometheus.exporter.exemplarsOnAllMetricTypes = true
+io.prometheus.exporter.filter.nameMustBeEqualTo = a, b, c
+
+
+io.prometheus.exemplars.minRetentionPeriodSeconds = 30
+io.prometheus.exemplars.maxRetentionPeriodSeconds = 30
+io.prometheus.exemplars.sampleIntervalMilliseconds = 30
+
+io.prometheus.exporter.httpServer.port = 9000
+
+# io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  +prometheus-metrics-config/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-config%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (06d350b699a7b853db61b0b39dc12a2b086f5f87j  prometheus-metrics-core/pom.xmlj  addedj  KCj  K j  KCj  yhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X	  @@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-core</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Core</name>
+    <description>
+        Core Prometheus metric types
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-tracer-initializer</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j  (c2f72c30ee3460cd864df79e4ea1f37160c8aa64j  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/CounterDataPoint.javaj  addedj  KXj  K j  KXj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,88 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single counter data point, i.e. a single line for a counter metric in Prometheus text format.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter counter = Counter.newBuilder()
+ *     .withName("tasks_total")
+ *     .withLabelNames("status")
+ *     .register();
+ * CounterDataPoint newTasks = counter.withLabelValues("new");
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * CounterDataPoint completedTasks = counter.withLabelValues("completed");
+ * }</pre>
+ * <p>
+ * Using {@code DataPoint} directly improves performance. If you increment a counter like this:
+ * <pre>{@code
+ * counter.withLabelValues("pending").inc();
+ * }</pre>
+ * the label value {@code "pending"} needs to be looked up every single time.
+ * Using the {@code CounterDataPoint} like this:
+ * <pre>{@code
+ * CounterDataPoint pendingTasks = counter.withLabelValues("pending");
+ * pendingTasks.inc();
+ * }</pre>
+ * allows you to look up the label value only once, and then use the {@code CounterDataPoint} directly.
+ * This is a worthwhile performance improvement when instrumenting a performance-critical code path.
+ * <p>
+ * If you have a counter without labels like this:
+ * <pre>{@code
+ * Counter counterWithoutLabels = Counter.newBuilder()
+ *     .withName("events_total")
+ *     .register();
+ * }</pre>
+ * You can use it as a {@code CounterDataPoint} directly. So the following:
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels.withLabels();
+ * }</pre>
+ * is equivalent to
+ * <pre>{@code
+ * CounterDataPoint counterData = counterWithoutLabels;
+ * }</pre>
+ */
+public interface CounterDataPoint extends DataPoint {
+
+    /**
+     * Add one.
+     */
+    default void inc() {
+        inc(1L);
+    }
+
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    default void inc(long amount) {
+        inc((double) amount);
+    }
+
+    /**
+     * Add {@code amount}. Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    void inc(double amount);
+
+    /**
+     * Add one, and create a custom exemplar with the given labels.
+     */
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    default void incWithExemplar(long amount, Labels labels) {
+        inc((double) amount);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     * Throws an {@link IllegalArgumentException} if {@code amount} is negative.
+     */
+    void incWithExemplar(double amount, Labels labels);
+}u}(j  (8dd277d8157d6f2473fd4f1c5b03f0d9d1bf252bj  Zprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DataPoint.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  b@@ -0,0 +1,4 @@
+package io.prometheus.metrics.core.datapoints;
+
+public interface DataPoint {
+}u}(j  (f08ccae9cb6e7c50848aad86a16d292e11c2aacej  fprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DistributionDataPoint.javaj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X.  @@ -0,0 +1,36 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single data point of a histogram or a summary metric.
+ * <p>
+ * Single data point means identified label values like {@code {method="GET", path="/", status_code="200"}},
+ * ignoring the {@code "le"} label for histograms or the {@code "quantile"} label for summaries.
+ * <p>
+ * This interface is named <i>DistributionDataPoint</i> because both histograms and summaries are used to observe
+ * distributions, like latency distributions or distributions of request sizes. Therefore
+ * <i>DistributionDataPoint</i> is a good name for a common interface implemented by histogram data points
+ * and summary data points.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface DistributionDataPoint extends DataPoint, TimerApi {
+
+    /**
+     * Observe {@code value}.
+     */
+    void observe(double value);
+
+    /**
+     * Observe {@code value}, and create a custom exemplar with the given labels.
+     */
+    void observeWithExemplar(double value, Labels labels);
+
+    /**
+     * {@inheritDoc}
+     */
+    default Timer startTimer() {
+        return new Timer(this::observe);
+    }
+}u}(j  (9daf0142815c398164ac1c680d2961e5e1011fccj  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/GaugeDataPoint.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+/**
+ * Represents a single gauge data point, i.e. a single line for a gauge metric in Prometheus text format.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface GaugeDataPoint extends DataPoint, TimerApi {
+
+    /**
+     * Add one.
+     */
+    default void inc() {
+        inc(1.0);
+    }
+
+    /**
+     * Add {@code amount}.
+     */
+    void inc(double amount);
+
+    /**
+     * Add one, and create a custom exemplar with the given labels.
+     */
+    default void incWithExemplar(Labels labels) {
+        incWithExemplar(1.0, labels);
+    }
+
+    /**
+     * Add {@code amount}, and create a custom exemplar with the given labels.
+     */
+    void incWithExemplar(double amount, Labels labels);
+
+    /**
+     * Subtract one.
+     */
+    default void dec() {
+        inc(-1.0);
+    }
+
+    /**
+     * Subtract {@code amount}.
+     */
+    default void dec(double amount) {
+        inc(-amount);
+    }
+
+    /**
+     * Subtract one, and create a custom exemplar with the given labels.
+     */
+    default void decWithExemplar(Labels labels) {
+        incWithExemplar(-1.0, labels);
+    }
+
+    /**
+     * Subtract {@code amount}, and create a custom exemplar with the given labels.
+     */
+    default void decWithExemplar(double amount, Labels labels) {
+        incWithExemplar(-amount, labels);
+    }
+
+    /**
+     * Set the gauge to {@code value}.
+     */
+    void set(double value);
+
+    /**
+     * Set the gauge to {@code value}, and create a custom exemplar with the given labels.
+     */
+    void setWithExemplar(double value, Labels labels);
+
+    /**
+     * {@inheritDoc}
+     */
+    default Timer startTimer() {
+        return new Timer(this::set);
+    }
+}u}(j  (73b7dfdb32452efe88891712c49f9e1168183b4bj  bprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/StateSetDataPoint.javaj  addedj  K!j  K j  K!j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XN  @@ -0,0 +1,33 @@
+package io.prometheus.metrics.core.datapoints;
+
+/**
+ * Represents a single StateSet data point.
+ * <p>
+ * See JavaDoc of {@link CounterDataPoint} on how using data points directly can improve performance.
+ */
+public interface StateSetDataPoint extends DataPoint {
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
+    void setTrue(String state);
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(String...)}.
+     */
+    void setFalse(String state);
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
+    default void setTrue(Enum<?> state) {
+        setTrue(state.toString());
+    }
+
+    /**
+     * {@code state} must be one of the states from when the {@code StateSet} was created with {@link io.prometheus.metrics.core.metrics.StateSet.Builder#withStates(Class<? extends Enum<?>>)}.
+     */
+    default void setFalse(Enum<?> state) {
+        setFalse(state.toString());
+    }
+}u}(j  (fd646186904c93dca51b560f1b8f3ed2f74ef5caj  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/Timer.javaj  addedj  K(j  K j  K(j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X}  @@ -0,0 +1,40 @@
+package io.prometheus.metrics.core.datapoints;
+
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.io.Closeable;
+import java.util.function.DoubleConsumer;
+
+/**
+ * Helper class for observing durations.
+ */
+public class Timer implements Closeable {
+
+    private final DoubleConsumer observeFunction;
+    private final long startTimeNanos = System.nanoTime();
+
+    /**
+     * Constructor is package private. Use the {@link TimerApi} provided by the implementation of the {@link DataPoint}.
+     */
+    Timer(DoubleConsumer observeFunction) {
+        this.observeFunction = observeFunction;
+    }
+
+    /**
+     * Records the observed duration in seconds since this {@code Timer} instance was created.
+     * @return the observed duration in seconds.
+     */
+    public double observeDuration() {
+        double elapsed = Unit.nanosToSeconds(System.nanoTime() - startTimeNanos);
+        observeFunction.accept(elapsed);
+        return elapsed;
+    }
+
+    /**
+     * Same as {@link #observeDuration()}.
+     */
+    @Override
+    public void close() {
+        observeDuration();
+    }
+}u}(j  (a38c8053b561799bc0fbcefd42014f0313b51db1j  Yprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/TimerApi.javaj  addedj  KJj  K j  KJj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimerApi.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26b     j  Xy  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.core.datapoints;
+
+import java.util.concurrent.Callable;
+import java.util.function.Supplier;
+
+/**
+ * Convenience API for timing durations.
+ * <p>
+ * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+ * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+ */
+public interface TimerApi {
+
+    /**
+     * Start a {@code Timer}. Example:
+     * <pre>{@code
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("http_request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * try (Timer timer = histogram.withLabelValues("GET", "/").startTimer()) {
+     *     // duration of this code block will be observed.
+     * }
+     * }</pre>
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+     */
+    Timer startTimer();
+
+    /**
+     * Observe the duration of the {@code func} call. Example:
+     * <pre>{@code
+     * Histogram histogram = Histogram.newBuilder()
+     *         .withName("request_duration_seconds")
+     *         .withHelp("HTTP request service time in seconds")
+     *         .withUnit(SECONDS)
+     *         .withLabelNames("method", "path")
+     *         .register();
+     *
+     * histogram2.withLabelValues("GET", "/").time(() -> {
+     *     // duration of this code block will be observed.
+     * });
+     * }</pre>
+     * <p>
+     * Durations are recorded in seconds. The Prometheus instrumentation guidelines <a href="https://prometheus.io/docs/instrumenting/writing_exporters/#naming">say</a>:
+     * <i>"Metrics must use base units (e.g. seconds, bytes) and leave converting them to something more readable to graphing tools".</i>
+     */
+    default void time(Runnable func) {
+        try (Timer timer = startTimer()) {
+            func.run();
+        }
+    }
+
+    /**
+     * Like {@link #time(Runnable)}, but returns the return value of {@code func}.
+     */
+    default <T> T time(Supplier<T> func) {
+        try (Timer timer = startTimer()) {
+            return func.get();
+        }
+    }
+
+    /**
+     * Like {@link #time(Supplier)}, but {@code func} may throw a checked {@code Exception}.
+     */
+    default <T> T timeChecked(Callable<T> func) throws Exception {
+        try (Timer timer = startTimer()) {
+            return func.call();
+        }
+    }
+}u}(j  (0c8275356ec5df83cfb4c52c38ea4a46be7cc73bj  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSampler.javaj  addedj  MFj  K j  MFj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSampler.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X7  @@ -0,0 +1,326 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.util.Scheduler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.LongSupplier;
+
+/**
+ * The ExemplarSampler selects Spans as exemplars.
+ * <p>
+ * There are two types of Exemplars: Regular exemplars are sampled implicitly if a supported tracing
+ * library is detected. Custom exemplars are provided explicitly in code, for example if a developer
+ * wants to make sure an Exemplar is created for a specific code path.
+ * <p>
+ * Spans will be marked as being an Exemplar by calling {@link SpanContext#markCurrentSpanAsExemplar()}.
+ * The tracer implementation should set a Span attribute to mark the current Span as an Exemplar.
+ * This attribute can be used by a trace sampling algorithm to make sure traces with Exemplars are sampled.
+ * <p>
+ * The ExemplarSample is rate-limited, so only a small fraction of Spans will be marked as Exemplars in
+ * an application with a large number of requests.
+ * <p>
+ * See {@link ExemplarSamplerConfig} for configuration options.
+ */
+public class ExemplarSampler {
+
+    private final ExemplarSamplerConfig config;
+    private final Exemplar[] exemplars;
+    private final Exemplar[] customExemplars; // Separate from exemplars, because we don't want custom exemplars
+    // to be overwritten by automatic exemplar sampling. exemplars.lengt == customExemplars.length
+    private final AtomicBoolean acceptingNewExemplars = new AtomicBoolean(true);
+    private final AtomicBoolean acceptingNewCustomExemplars = new AtomicBoolean(true);
+
+    public ExemplarSampler(ExemplarSamplerConfig config) {
+        this.config = config;
+        this.exemplars = new Exemplar[config.getNumberOfExemplars()];
+        this.customExemplars = new Exemplar[exemplars.length];
+    }
+
+    public Exemplars collect() {
+        // this may run in parallel with observe()
+        long now = System.currentTimeMillis();
+        List<Exemplar> result = new ArrayList<>(exemplars.length);
+        for (int i = 0; i < customExemplars.length; i++) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    customExemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        for (int i = 0; i < exemplars.length && result.size() < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null) {
+                if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                    exemplars[i] = null;
+                } else {
+                    result.add(exemplar);
+                }
+            }
+        }
+        return Exemplars.of(result);
+    }
+
+    public void reset() {
+        for (int i = 0; i < exemplars.length; i++) {
+            exemplars[i] = null;
+            customExemplars[i] = null;
+        }
+    }
+
+    public void observe(double value) {
+        if (!acceptingNewExemplars.get()) {
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
+        }
+        rateLimitedObserve(acceptingNewExemplars, value, exemplars, () -> doObserve(value));
+    }
+
+    public void observeWithExemplar(double value, Labels labels) {
+        if (!acceptingNewCustomExemplars.get()) {
+            return; // This is the hot path in a high-throughput application and should be as efficient as possible.
+        }
+        rateLimitedObserve(acceptingNewCustomExemplars, value, customExemplars, () -> doObserveWithExemplar(value, labels));
+    }
+
+    private long doObserve(double value) {
+        if (exemplars.length == 1) {
+            return doObserveSingleExemplar(value);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithUpperBounds(value);
+        } else {
+            return doObserveWithoutUpperBounds(value);
+        }
+    }
+
+    private long doObserveSingleExemplar(double value) {
+        long now = System.currentTimeMillis();
+        Exemplar current = exemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(0, value, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithUpperBounds(double value) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (value <= upperBounds[i]) {
+                Exemplar previous = exemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateExemplar(i, value, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithoutUpperBounds(double value) {
+        final long now = System.currentTimeMillis();
+        Exemplar smallest = null;
+        int smallestIndex = -1;
+        Exemplar largest = null;
+        int largestIndex = -1;
+        int nullIndex = -1;
+        for (int i = exemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar == null) {
+                nullIndex = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                exemplars[i] = null;
+                nullIndex = i;
+            } else {
+                if (smallest == null || exemplar.getValue() < smallest.getValue()) {
+                    smallest = exemplar;
+                    smallestIndex = i;
+                }
+                if (largest == null || exemplar.getValue() > largest.getValue()) {
+                    largest = exemplar;
+                    largestIndex = i;
+                }
+            }
+        }
+        if (nullIndex >= 0) {
+            return updateExemplar(nullIndex, value, now);
+        }
+        if (now - smallest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value < smallest.getValue()) {
+            return updateExemplar(smallestIndex, value, now);
+        }
+        if (now - largest.getTimestampMillis() > config.getMinRetentionPeriodMillis() && value > largest.getValue()) {
+            return updateExemplar(largestIndex, value, now);
+        }
+        long oldestTimestamp = 0;
+        int oldestIndex = -1;
+        for (int i = 0; i < exemplars.length; i++) {
+            Exemplar exemplar = exemplars[i];
+            if (exemplar != null && exemplar != smallest && exemplar != largest) {
+                if (oldestTimestamp == 0 || exemplar.getTimestampMillis() < oldestTimestamp) {
+                    oldestTimestamp = exemplar.getTimestampMillis();
+                    oldestIndex = i;
+                }
+            }
+        }
+        if (oldestIndex != -1 && now - oldestTimestamp > config.getMinRetentionPeriodMillis()) {
+            return updateExemplar(oldestIndex, value, now);
+        }
+        return 0;
+    }
+
+    // Returns the timestamp of the newly added Exemplar (which is System.currentTimeMillis())
+    // or 0 if no Exemplar was added.
+    private long doObserveWithExemplar(double amount, Labels labels) {
+        if (customExemplars.length == 1) {
+            return doObserveSingleExemplar(amount, labels);
+        } else if (config.getHistogramClassicUpperBounds() != null) {
+            return doObserveWithExemplarWithUpperBounds(amount, labels);
+        } else {
+            return doObserveWithExemplarWithoutUpperBounds(amount, labels);
+        }
+    }
+
+    private long doObserveSingleExemplar(double amount, Labels labels) {
+        long now = System.currentTimeMillis();
+        Exemplar current = customExemplars[0];
+        if (current == null || now - current.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(0, amount, labels, now);
+        }
+        return 0;
+    }
+
+    private long doObserveWithExemplarWithUpperBounds(double value, Labels labels) {
+        long now = System.currentTimeMillis();
+        double[] upperBounds = config.getHistogramClassicUpperBounds();
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (value <= upperBounds[i]) {
+                Exemplar previous = customExemplars[i];
+                if (previous == null || now - previous.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+                    return updateCustomExemplar(i, value, labels, now);
+                } else {
+                    return 0;
+                }
+            }
+        }
+        return 0; // will never happen, as upperBounds contains +Inf
+    }
+
+    private long doObserveWithExemplarWithoutUpperBounds(double amount, Labels labels) {
+        final long now = System.currentTimeMillis();
+        int nullPos = -1;
+        int oldestPos = -1;
+        Exemplar oldest = null;
+        for (int i = customExemplars.length - 1; i >= 0; i--) {
+            Exemplar exemplar = customExemplars[i];
+            if (exemplar == null) {
+                nullPos = i;
+            } else if (now - exemplar.getTimestampMillis() > config.getMaxRetentionPeriodMillis()) {
+                customExemplars[i] = null;
+                nullPos = i;
+            } else {
+                if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
+                    oldest = exemplar;
+                    oldestPos = i;
+                }
+            }
+        }
+        if (nullPos != -1) {
+            return updateCustomExemplar(nullPos, amount, labels, now);
+        } else if (now - oldest.getTimestampMillis() > config.getMinRetentionPeriodMillis()) {
+            return updateCustomExemplar(oldestPos, amount, labels, now);
+        } else {
+            return 0;
+        }
+    }
+
+    /**
+     * Observing requires a system call to {@link System#currentTimeMillis()},
+     * and it requires iterating over the existing exemplars to check if one of the existing
+     * exemplars can be replaced.
+     * <p>
+     * To avoid performance issues, we rate limit observing exemplars to
+     * {@link ExemplarSamplerConfig#getSampleIntervalMillis()} milliseconds.
+     */
+    private void rateLimitedObserve(AtomicBoolean accepting, double value, Exemplar[] exemplars, LongSupplier observeFunc) {
+        if (Double.isNaN(value)) {
+            return;
+        }
+        if (!accepting.compareAndSet(true, false)) {
+            return;
+        }
+        // observeFunc returns the current timestamp or 0 if no Exemplar was added.
+        long now = observeFunc.getAsLong();
+        long sleepTime = now == 0 ? config.getSampleIntervalMillis() : durationUntilNextExemplarExpires(now);
+        Scheduler.schedule(() -> accepting.compareAndSet(false, true), sleepTime, TimeUnit.MILLISECONDS);
+    }
+
+    private long durationUntilNextExemplarExpires(long now) {
+        long oldestTimestamp = now;
+        for (Exemplar exemplar : exemplars) {
+            if (exemplar == null) {
+                return config.getSampleIntervalMillis();
+            } else if (exemplar.getTimestampMillis() < oldestTimestamp) {
+                oldestTimestamp = exemplar.getTimestampMillis();
+            }
+        }
+        long oldestAge = now - oldestTimestamp;
+        if (oldestAge < config.getMinRetentionPeriodMillis()) {
+            return config.getMinRetentionPeriodMillis() - oldestAge;
+        }
+        return config.getSampleIntervalMillis();
+    }
+
+    private long updateCustomExemplar(int index, double value, Labels labels, long now) {
+        if (!labels.contains(Exemplar.TRACE_ID) && !labels.contains(Exemplar.SPAN_ID)) {
+            labels = labels.merge(doSampleExemplar());
+        }
+        customExemplars[index] = Exemplar.newBuilder()
+                .withValue(value)
+                .withLabels(labels)
+                .withTimestampMillis(now)
+                .build();
+        return now;
+    }
+
+    private long updateExemplar(int index, double value, long now) {
+        Labels traceLabels = doSampleExemplar();
+        if (!traceLabels.isEmpty()) {
+            exemplars[index] = Exemplar.newBuilder()
+                    .withValue(value)
+                    .withLabels(traceLabels)
+                    .withTimestampMillis(now)
+                    .build();
+            return now;
+        } else {
+            return 0;
+        }
+    }
+
+    private Labels doSampleExemplar() {
+        try {
+            SpanContext spanContext = SpanContextSupplier.getSpanContext();
+            if (spanContext != null) {
+                if (spanContext.isCurrentSpanSampled()) {
+                    String spanId = spanContext.getCurrentSpanId();
+                    String traceId = spanContext.getCurrentTraceId();
+                    if (spanId != null && traceId != null) {
+                        spanContext.markCurrentSpanAsExemplar();
+                        return Labels.of(Exemplar.TRACE_ID, traceId, Exemplar.SPAN_ID, spanId);
+                    }
+                }
+            }
+        } catch (NoClassDefFoundError ignored) {
+        }
+        return Labels.EMPTY;
+    }
+}u}(j  (9712f29dfe56bf37373428c3f5544a7f774bb201j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfig.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfig.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.config.ExemplarsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+import java.util.concurrent.TimeUnit;
+
+public class ExemplarSamplerConfig {
+
+    /**
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
+     */
+    public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDS = 7;
+
+    /**
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
+     */
+    public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDS = 70;
+
+    /**
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
+     */
+    private static final int DEFAULT_SAMPLE_INTERVAL_MILLISECONDS = 90;
+
+    private final long minRetentionPeriodMillis;
+    private final long maxRetentionPeriodMillis;
+    private final long sampleIntervalMillis;
+    private final double[] histogramClassicUpperBounds; // null unless it's a classic histogram
+    private final int numberOfExemplars; // if histogramClassicUpperBounds != null, then numberOfExemplars == histogramClassicUpperBounds.length
+
+    /**
+     * Constructor for all metric types except classic histograms.
+     *
+     * @param properties        See {@link PrometheusProperties#getExemplarProperties()}.
+     * @param numberOfExemplars Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default.
+     *                          For classic histogram use {@link #ExemplarSamplerConfig(ExemplarsProperties, double[])}.
+     */
+    public ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars) {
+        this(properties, numberOfExemplars, null);
+    }
+
+    /**
+     * Constructor for classic histogram metrics.
+     *
+     * @param properties                  See {@link PrometheusProperties#getExemplarProperties()}.
+     * @param histogramClassicUpperBounds the ExemplarSampler will provide one Exemplar per histogram bucket.
+     *                                    Must be sorted, and must include the +Inf bucket.
+     */
+    public ExemplarSamplerConfig(ExemplarsProperties properties, double[] histogramClassicUpperBounds) {
+        this(properties, histogramClassicUpperBounds.length, histogramClassicUpperBounds);
+    }
+
+    private ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this(
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMinRetentionPeriodSeconds(), DEFAULT_MIN_RETENTION_PERIOD_SECONDS)),
+                TimeUnit.SECONDS.toMillis(getOrDefault(properties.getMaxRetentionPeriodSeconds(), DEFAULT_MAX_RETENTION_PERIOD_SECONDS)),
+                getOrDefault(properties.getSampleIntervalMilliseconds(), DEFAULT_SAMPLE_INTERVAL_MILLISECONDS),
+                numberOfExemplars,
+                histogramClassicUpperBounds);
+    }
+
+    ExemplarSamplerConfig(long minRetentionPeriodMillis, long maxRetentionPeriodMillis, long sampleIntervalMillis, int numberOfExemplars, double[] histogramClassicUpperBounds) {
+        this.minRetentionPeriodMillis = minRetentionPeriodMillis;
+        this.maxRetentionPeriodMillis = maxRetentionPeriodMillis;
+        this.sampleIntervalMillis = sampleIntervalMillis;
+        this.numberOfExemplars = numberOfExemplars;
+        this.histogramClassicUpperBounds = histogramClassicUpperBounds;
+        validate();
+    }
+
+    private void validate() {
+        if (minRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(minRetentionPeriodMillis + ": minRetentionPeriod must be > 0.");
+        }
+        if (maxRetentionPeriodMillis <= 0) {
+            throw new IllegalArgumentException(maxRetentionPeriodMillis + ": maxRetentionPeriod must be > 0.");
+        }
+        if (histogramClassicUpperBounds != null) {
+            if (histogramClassicUpperBounds.length == 0 || histogramClassicUpperBounds[histogramClassicUpperBounds.length - 1] != Double.POSITIVE_INFINITY) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds must contain the +Inf bucket.");
+            }
+            if (histogramClassicUpperBounds.length != numberOfExemplars) {
+                throw new IllegalArgumentException("histogramClassicUpperBounds.length must be equal to numberOfExemplars.");
+            }
+            double bound = histogramClassicUpperBounds[0];
+            for (int i = 1; i < histogramClassicUpperBounds.length; i++) {
+                if (bound >= histogramClassicUpperBounds[i]) {
+                    throw new IllegalArgumentException("histogramClassicUpperBounds must be sorted and must not contain duplicates.");
+                }
+            }
+        }
+        if (numberOfExemplars <= 0) {
+            throw new IllegalArgumentException(numberOfExemplars + ": numberOfExemplars must be > 0.");
+        }
+    }
+
+    private static <T> T getOrDefault(T result, T defaultValue) {
+        return result != null ? result : defaultValue;
+    }
+
+    /**
+     * May be {@code null}.
+     */
+    public double[] getHistogramClassicUpperBounds() {
+        return histogramClassicUpperBounds;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getMinRetentionPeriodSeconds()}
+     */
+    public long getMinRetentionPeriodMillis() {
+        return minRetentionPeriodMillis;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getMaxRetentionPeriodSeconds()}
+     */
+    public long getMaxRetentionPeriodMillis() {
+        return maxRetentionPeriodMillis;
+    }
+
+    /**
+     * See {@link ExemplarsProperties#getSampleIntervalMilliseconds()}
+     */
+    public long getSampleIntervalMillis() {
+        return sampleIntervalMillis;
+    }
+
+    /**
+     * Defaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.
+     */
+    public int getNumberOfExemplars() {
+        return numberOfExemplars;
+    }
+}u}(j  (390a2bc2b436590fa604ffe4ec1387fe993651bbj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Buffer.javaj  addedj  KTj  K j  KTj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FBuffer.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,84 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+/**
+ * Metrics support concurrent write and scrape operations.
+ * <p>
+ * This is implemented by switching to a Buffer when the scrape starts,
+ * and applying the values from the buffer after the scrape ends.
+ */
+class Buffer {
+
+    private static final long signBit = 1L << 63;
+    private final AtomicLong observationCount = new AtomicLong(0);
+    private double[] observationBuffer = new double[0];
+    private int bufferPos = 0;
+    private boolean reset = false;
+    private final Object appendLock = new Object();
+    private final Object runLock = new Object();
+
+    boolean append(double value) {
+        long count = observationCount.incrementAndGet();
+        if ((count & signBit) == 0) {
+            return false; // sign bit not set -> buffer not active.
+        } else {
+            doAppend(value);
+            return true;
+        }
+    }
+
+    private void doAppend(double amount) {
+        synchronized (appendLock) {
+            if (bufferPos >= observationBuffer.length) {
+                observationBuffer = Arrays.copyOf(observationBuffer, observationBuffer.length + 128);
+            }
+            observationBuffer[bufferPos] = amount;
+            bufferPos++;
+        }
+    }
+
+    /**
+     * Must be called by the runnable in the run() method.
+     */
+    void reset() {
+        reset = true;
+    }
+
+    <T extends DataPointSnapshot> T run(Function<Long, Boolean> complete, Supplier<T> runnable, Consumer<Double> observeFunction) {
+        double[] buffer;
+        int bufferSize;
+        T result;
+        synchronized (runLock) {
+            Long count = observationCount.getAndAdd(signBit);
+            while (!complete.apply(count)) {
+                Thread.yield();
+            }
+            result = runnable.get();
+            int expectedBufferSize;
+            if (reset) {
+                expectedBufferSize = (int) ((observationCount.getAndSet(0) & ~signBit) - count);
+                reset = false;
+            } else {
+                expectedBufferSize = (int) (observationCount.addAndGet(signBit) - count);
+            }
+            while (bufferPos != expectedBufferSize) {
+                Thread.yield();
+            }
+            buffer = observationBuffer;
+            bufferSize = bufferPos;
+            observationBuffer = new double[0];
+            bufferPos = 0;
+        }
+        for (int i = 0; i < bufferSize; i++) {
+            observeFunction.accept(buffer[i]);
+        }
+        return result;
+    }
+}u}(j  (22662c62ebde47679a03e46d1aeb6000a7954107j  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.javaj  addedj  M(j  K j  M(j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCKMSQuantiles.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X%  @@ -0,0 +1,296 @@
+package io.prometheus.metrics.core.metrics;
+
+// The original implementation was copied from
+// https://raw.githubusercontent.com/Netflix/ocelli/master/ocelli-core/src/main/java/netflix/ocelli/stats/CKMSQuantiles.java
+// Revision d0357b8bf5c17a173ce94d6b26823775b3f999f6 from Jan 21, 2015.
+// However, it has been heavily refactored in the meantime.
+
+/*
+ Copyright 2012 Andrew Wang (andrew@umbrant.com)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.ListIterator;
+
+/**
+ * Algorithm solving the "Targeted Quantile Problem" as described in
+ * "Effective Computation of Biased Quantiles over Data Streams"
+ * by Cormode, Korn, Muthukrishnan, and Srivastava.
+ *
+ */
+final class CKMSQuantiles {
+
+    final Quantile[] quantiles;
+
+    /**
+     * Total number of observations (not including those that are still in the buffer).
+     */
+    int n = 0;
+
+    /**
+     * List of sampled observations, ordered by Sample.value.
+     */
+    final LinkedList<Sample> samples = new LinkedList<Sample>();
+
+    /**
+     * Compress is called every compressInterval inserts.
+     * Note that the buffer is flushed whenever get() is called, so we
+     * cannot just wait until the buffer is full before we call compress.
+     */
+    private final int compressInterval = 128;
+    private int insertsSinceLastCompress = 0;
+
+    /**
+     * Note that the buffer size could as well be less than the compressInterval.
+     * However, the buffer size should not be greater than the compressInterval,
+     * because the compressInterval is not respected in flush(), so if you want
+     * to compress more often than calling flush() that won't work.
+     */
+    private final double[] buffer = new double[compressInterval];
+    private int bufferPos = 0;
+
+    public CKMSQuantiles(Quantile... quantiles) {
+        if (quantiles.length == 0) {
+            throw new IllegalArgumentException("quantiles cannot be empty");
+        }
+        this.quantiles = quantiles;
+    }
+
+    /**
+     * Add an observed value
+     */
+    public void insert(double value) {
+        buffer[bufferPos++] = value;
+
+        if (bufferPos == buffer.length) {
+            flush();
+        }
+
+        if (++insertsSinceLastCompress == compressInterval) {
+            compress();
+            insertsSinceLastCompress = 0;
+        }
+    }
+
+    private void flush() {
+        Arrays.sort(buffer, 0, bufferPos);
+        insertBatch(buffer, bufferPos);
+        bufferPos = 0;
+    }
+
+    /**
+     * Inserts the elements from index 0 to index toIndex from the sortedBuffer.
+     */
+    void insertBatch(double[] sortedBuffer, int toIndex) {
+        if (toIndex == 0) {
+            return;
+        }
+        ListIterator<Sample> iterator = samples.listIterator();
+        int i = 0; // position in buffer
+        int r = 0; // sum of g's left of the current sample
+        while (iterator.hasNext() && i < toIndex) {
+            Sample item = iterator.next();
+            while (i < toIndex) {
+                if (sortedBuffer[i] > item.value) {
+                    break;
+                }
+                insertBefore(iterator, sortedBuffer[i], r);
+                r++; // new item with g=1 was inserted before, so increment r
+                i++;
+                n++;
+            }
+            r += item.g;
+        }
+        while (i < toIndex) {
+            samples.add(new Sample(sortedBuffer[i], 0));
+            i++;
+            n++;
+        }
+    }
+
+    private void insertBefore(ListIterator<Sample> iterator, double value, int r) {
+        if (!iterator.hasPrevious()) {
+            samples.addFirst(new Sample(value, 0));
+        } else {
+            iterator.previous();
+            iterator.add(new Sample(value, f(r) - 1));
+            iterator.next();
+        }
+    }
+
+    /**
+     * Get the estimated value at the specified quantile.
+     */
+    public double get(double q) {
+        flush();
+
+        if (samples.size() == 0) {
+            return Double.NaN;
+        }
+
+        if (q == 0.0) {
+            return samples.getFirst().value;
+        }
+
+        if (q == 1.0) {
+            return samples.getLast().value;
+        }
+
+        int r = 0; // sum of g's left of the current sample
+        int desiredRank = (int) Math.ceil(q * n);
+        int upperBound = desiredRank + f(desiredRank) / 2;
+
+        ListIterator<Sample> iterator = samples.listIterator();
+        while (iterator.hasNext()) {
+            Sample sample = iterator.next();
+            if (r + sample.g + sample.delta > upperBound) {
+                iterator.previous(); // roll back the item.next() above
+                if (iterator.hasPrevious()) {
+                    Sample result = iterator.previous();
+                    return result.value;
+                } else {
+                    return sample.value;
+                }
+            }
+            r += sample.g;
+        }
+        return samples.getLast().value;
+    }
+
+    /**
+     * Error function, as in definition 5 of the paper.
+     */
+    int f(int r) {
+        int minResult = Integer.MAX_VALUE;
+        for (Quantile q : quantiles) {
+            if (q.quantile == 0 || q.quantile == 1) {
+                continue;
+            }
+            int result;
+            // We had a numerical error here with the following example:
+            // quantile = 0.95, epsilon = 0.01, (n-r) = 30.
+            // The expected result of (2*0.01*30)/(1-0.95) is 12. The actual result is 11.99999999999999.
+            // To avoid running into these types of error we add 0.00000000001 before rounding down.
+            if (r >= q.quantile * n) {
+                result = (int) (q.v * r + 0.00000000001);
+            } else {
+                result = (int) (q.u * (n - r) + 0.00000000001);
+            }
+            if (result < minResult) {
+                minResult = result;
+            }
+        }
+        return Math.max(minResult, 1);
+    }
+
+    /**
+     * Merge pairs of consecutive samples if this doesn't violate the error function.
+     */
+    void compress() {
+        if (samples.size() < 3) {
+            return;
+        }
+        Iterator<Sample> descendingIterator = samples.descendingIterator();
+        int r = n; // n is equal to the sum of the g's of all samples
+
+        Sample right;
+        Sample left = descendingIterator.next();
+        r -= left.g;
+
+        while (descendingIterator.hasNext()) {
+            right = left;
+            left = descendingIterator.next();
+            r = r - left.g;
+            if (left == samples.getFirst()) {
+                // The min sample must never be merged.
+                break;
+            }
+            if (left.g + right.g + right.delta < f(r)) {
+                right.g += left.g;
+                descendingIterator.remove();
+                left = right;
+            }
+        }
+    }
+
+    static class Sample {
+
+        /**
+         * Observed value.
+         */
+        final double value;
+
+        /**
+         * Difference between the lowest possible rank of this sample and its predecessor.
+         * This always starts with 1, but will be updated when compress() merges Samples.
+         */
+        int g = 1;
+
+        /**
+         * Difference between the greatest possible rank of this sample and the lowest possible rank of this sample.
+         */
+        final int delta;
+
+        Sample(double value, int delta) {
+            this.value = value;
+            this.delta = delta;
+        }
+
+        @Override
+        public String toString() {
+            return String.format("Sample{val=%.3f, g=%d, delta=%d}", value, g, delta);
+        }
+    }
+
+    static class Quantile {
+
+        /**
+         * Quantile. Must be between 0 and 1.
+         */
+        final double quantile;
+
+        /**
+         * Allowed error. Must be between 0 and 1.
+         */
+        final double epsilon;
+
+        /**
+         * Helper used in the error function f(), see definition 5 in the paper.
+         */
+        final double u;
+
+        /**
+         * Helper used in the error function f(), see definition 5 in the paper.
+         */
+        final double v;
+
+        Quantile(double quantile, double epsilon) {
+            if (quantile < 0.0 || quantile > 1.0) throw new IllegalArgumentException("Quantile must be between 0 and 1");
+            if (epsilon < 0.0 || epsilon > 1.0) throw new IllegalArgumentException("Epsilon must be between 0 and 1");
+
+            this.quantile = quantile;
+            this.epsilon = epsilon;
+            u = 2.0 * epsilon / (1.0 - quantile); // if quantile == 1 this will be Double.NaN
+            v = 2.0 * epsilon / quantile; // if quantile == 0 this will be Double.NaN
+        }
+
+        @Override
+        public String toString() {
+            return String.format("Quantile{q=%.3f, epsilon=%.3f}", quantile, epsilon);
+        }
+    }
+}u}(j  (2d9eb0b54e3b4bc1c03b730b413f2366c81c4d39j  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CallbackMetric.javaj  addedj  K*j  K j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X*  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.List;
+
+/**
+ * There are two kinds of metrics: {@code StatefulMetric} and {@code CallbackMetric}.
+ * <p>
+ * See JavaDoc on {@link StatefulMetric} for more info.
+ */
+abstract class CallbackMetric extends MetricWithFixedMetadata {
+
+    protected CallbackMetric(Builder<?, ?> builder) {
+        super(builder);
+    }
+
+    protected Labels makeLabels(String... labelValues) {
+        if (labelNames.length == 0) {
+            if (labelValues != null && labelValues.length > 0) {
+                throw new IllegalArgumentException("Cannot pass label values to a " + this.getClass().getSimpleName() + " that was created without label names.");
+            }
+            return constLabels;
+        } else {
+            if (labelValues == null) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with label names, but the callback was called without label values.");
+            }
+            if (labelValues.length != labelNames.length) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with " + labelNames.length + " label names, but the callback was called with " + labelValues.length + " label values.");
+            }
+            return constLabels.merge(Labels.of(labelNames, labelValues));
+        }
+    }
+
+    static abstract class Builder<B extends Builder<B, M>, M extends CallbackMetric> extends MetricWithFixedMetadata.Builder<B, M> {
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+    }
+}u}(j  (6b5301cc57ebbfe521e6932631c5698f192378fej  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X!  @@ -0,0 +1,252 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Counter metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Counter requestCount = Counter.newBuilder()
+ *     .withName("requests_total")
+ *     .withHelp("Total number of requests")
+ *     .withLabelNames("path", "status")
+ *     .register();
+ * requestCount.withLabelValues("/hello-world", "200").inc();
+ * requestCount.withLabelValues("/hello-world", "500").inc();
+ * }</pre>
+ */
+public class Counter extends StatefulMetric<CounterDataPoint, Counter.DataPoint> implements CounterDataPoint, Collector {
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Counter(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(long amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(double amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(long amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(double amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public CounterSnapshot collect() {
+        return (CounterSnapshot) super.collect();
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        if (isExemplarsEnabled()) {
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new DataPoint(null);
+        }
+    }
+
+    @Override
+    protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<CounterSnapshot.CounterDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new CounterSnapshot(getMetadata(), data);
+    }
+
+    static String normalizeName(String name) {
+        if (name != null && name.endsWith("_total")) {
+            name = name.substring(0, name.length() - 6);
+        }
+        return name;
+    }
+
+    class DataPoint implements CounterDataPoint {
+
+        private final DoubleAdder doubleValue = new DoubleAdder();
+        // LongAdder is 20% faster than DoubleAdder. So let's use the LongAdder for long observations,
+        // and DoubleAdder for double observations. If the user doesn't observe any double at all,
+        // we will be using the LongAdder and get the best performance.
+        private final LongAdder longValue = new LongAdder();
+        private final long createdTimeMillis = System.currentTimeMillis();
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private DataPoint(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(long amount) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(amount);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(double amount) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(amount);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(long amount, Labels labels) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(amount, labels);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(double amount, Labels labels) {
+            validateAndAdd(amount);
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(amount, labels);
+            }
+        }
+
+        private void validateAndAdd(long amount) {
+            if (amount < 0) {
+                throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
+            }
+            longValue.add(amount);
+        }
+
+        private void validateAndAdd(double amount) {
+            if (amount < 0) {
+                throw new IllegalArgumentException("Negative increment " + amount + " is illegal for Counter metrics.");
+            }
+            doubleValue.add(amount);
+        }
+
+        private CounterSnapshot.CounterDataPointSnapshot collect(Labels labels) {
+            // Read the exemplar first. Otherwise, there is a race condition where you might
+            // see an Exemplar for a value that's not counted yet.
+            // If there are multiple Exemplars (by default it's just one), use the newest.
+            Exemplar latestExemplar = null;
+            if (exemplarSampler != null) {
+                for (Exemplar exemplar : exemplarSampler.collect()) {
+                    if (latestExemplar == null || exemplar.getTimestampMillis() > latestExemplar.getTimestampMillis()) {
+                        latestExemplar = exemplar;
+                    }
+                }
+            }
+            return new CounterSnapshot.CounterDataPointSnapshot(longValue.sum() + doubleValue.sum(), labels, latestExemplar, createdTimeMillis);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, Counter> {
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Counter c1 = Counter.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * Counter c2 = Counter.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            return super.withName(normalizeName(name));
+        }
+
+        @Override
+        public Counter build() {
+            return new Counter(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (c7446f4c1b0684d4b14ed8bb39b4c655f1fd9a95j  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javaj  addedj  Kej  K j  Kej  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,101 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+ *
+ * CounterWithCallback.newBuilder()
+ *         .withName("classes_loaded_total")
+ *         .withHelp("The total number of classes that have been loaded since the JVM has started execution")
+ *         .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
+ *         .register();
+ * }</pre>
+ */
+public class CounterWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private CounterWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public CounterSnapshot collect() {
+        List<CounterSnapshot.CounterDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new CounterSnapshot.CounterDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new CounterSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<CounterWithCallback.Builder, CounterWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * CounterWithCallback c1 = CounterWithCallback.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * CounterWithCallback c2 = CounterWithCallback.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            return super.withName(Counter.normalizeName(name));
+        }
+
+        @Override
+        public CounterWithCallback build() {
+            return new CounterWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (1b0edfeb1d6fecb569272b142f57a6d39452e69bj  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,213 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * Gauge metric.
+ * <p>
+ * Example usage:
+ * <pre>{@code
+ * Gauge currentActiveUsers = Gauge.newBuilder()
+ *     .withName("current_active_users")
+ *     .withHelp("Number of users that are currently active")
+ *     .withLabelNames("region")
+ *     .register();
+ *
+ * public void login(String region) {
+ *     currentActiveUsers.withLabelValues(region).inc();
+ *     // perform login
+ * }
+ *
+ * public void logout(String region) {
+ *     currentActiveUsers.withLabelValues(region).dec();
+ *     // perform logout
+ * }
+ * }</pre>
+ */
+public class Gauge extends StatefulMetric<GaugeDataPoint, Gauge.DataPoint> implements GaugeDataPoint {
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Gauge(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        if (exemplarsEnabled) {
+            exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 1);
+        } else {
+            exemplarSamplerConfig = null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inc(double amount) {
+        getNoLabels().inc(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void incWithExemplar(double amount, Labels labels) {
+        getNoLabels().incWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void set(double value) {
+        getNoLabels().set(value);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setWithExemplar(double value, Labels labels) {
+        getNoLabels().setWithExemplar(value, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public GaugeSnapshot collect() {
+        return (GaugeSnapshot) super.collect();
+    }
+
+    @Override
+    protected GaugeSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPointSnapshots = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            dataPointSnapshots.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new GaugeSnapshot(getMetadata(), dataPointSnapshots);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        if (isExemplarsEnabled()) {
+            return new DataPoint(new ExemplarSampler(exemplarSamplerConfig));
+        } else {
+            return new DataPoint(null);
+        }
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    class DataPoint implements GaugeDataPoint {
+
+        private final ExemplarSampler exemplarSampler; // null if isExemplarsEnabled() is false
+
+        private DataPoint(ExemplarSampler exemplarSampler) {
+            this.exemplarSampler = exemplarSampler;
+        }
+
+        private final AtomicLong value = new AtomicLong(Double.doubleToRawLongBits(0));
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void inc(double amount) {
+            long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(Double.longBitsToDouble(next));
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void incWithExemplar(double amount, Labels labels) {
+            long next = value.updateAndGet(l -> Double.doubleToRawLongBits(Double.longBitsToDouble(l) + amount));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(Double.longBitsToDouble(next), labels);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void set(double value) {
+            this.value.set(Double.doubleToRawLongBits(value));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setWithExemplar(double value, Labels labels) {
+            this.value.set(Double.doubleToRawLongBits(value));
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private GaugeSnapshot.GaugeDataPointSnapshot collect(Labels labels) {
+            // Read the exemplar first. Otherwise, there is a race condition where you might
+            // see an Exemplar for a value that's not represented in getValue() yet.
+            // If there are multiple Exemplars (by default it's just one), use the oldest
+            // so that we don't violate min age.
+            Exemplar oldest = null;
+            if (isExemplarsEnabled()) {
+                for (Exemplar exemplar : exemplarSampler.collect()) {
+                    if (oldest == null || exemplar.getTimestampMillis() < oldest.getTimestampMillis()) {
+                        oldest = exemplar;
+                    }
+                }
+            }
+            return new GaugeSnapshot.GaugeDataPointSnapshot(Double.longBitsToDouble(value.get()), labels, oldest);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, Gauge> {
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        @Override
+        public Gauge build() {
+            return new Gauge(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (7a1424d95eecee5e16d7b4e3fd75278b7fff50c9j  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/GaugeWithCallback.javaj  addedj  KVj  K j  KVj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,86 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+ *
+ * GaugeWithCallback.newBuilder()
+ *     .withName("jvm_memory_bytes_used")
+ *     .withHelp("Used bytes of a given JVM memory area.")
+ *     .withUnit(Unit.BYTES)
+ *     .withLabelNames("area")
+ *     .withCallback(callback -> {
+ *         callback.call(memoryBean.getHeapMemoryUsage().getUsed(), "heap");
+ *         callback.call(memoryBean.getNonHeapMemoryUsage().getUsed(), "nonheap");
+ *     })
+ *     .register();
+ * }</pre>
+ */
+public class GaugeWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private GaugeWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public GaugeSnapshot collect() {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new GaugeSnapshot.GaugeDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new GaugeSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<GaugeWithCallback.Builder, GaugeWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        @Override
+        public GaugeWithCallback build() {
+            return new GaugeWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}uv     }(j  (50f352e26737c02cf4114fc330c1b5c573a5a3f7j  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X)  @@ -0,0 +1,926 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.ExemplarsProperties;
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import io.prometheus.metrics.core.util.Scheduler;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Histogram metric. Example usage:
+ * <pre>{@code
+ * Histogram histogram = Histogram.newBuilder()
+ *         .withName("http_request_duration_seconds")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // do something
+ * histogram.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
+ * Prometheus supports two internal representations of histograms:
+ * <ol>
+ *     <li><i>Classic Histograms</i> have a fixed number of buckets with fixed bucket boundaries.</li>
+ *     <li><i>Native Histograms</i> have an infinite number of buckets with a dynamic resolution.
+ *         Prometheus native histograms are the same as OpenTelemetry's exponential histograms.</li>
+ * </ol>
+ * By default, a histogram maintains both representations, i.e. the example above will maintain a classic
+ * histogram representation with Prometheus' default bucket boundaries as well as native histogram representation.
+ * Which representation is used depends on the exposition format, i.e. which content type the Prometheus server
+ * accepts when scraping. Exposition format "Text" exposes the classic histogram, exposition format "Protobuf"
+ * exposes both representations. This is great for migrating from classic histograms to native histograms.
+ * <p>
+ * If you want the classic representation only, use {@link Histogram.Builder#classicOnly}.
+ * If you want the native representation only, use {@link Histogram.Builder#nativeOnly}.
+ */
+public class Histogram extends StatefulMetric<DistributionDataPoint, Histogram.DataPoint> implements DistributionDataPoint {
+
+    // nativeSchema == CLASSIC_HISTOGRAM indicates that this is a classic histogram only.
+    private final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
+
+    // NATIVE_BOUNDS is used to look up the native bucket index depending on the current schema.
+    private static final double[][] NATIVE_BOUNDS;
+
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    // Upper bounds for the classic histogram buckets. Contains at least +Inf.
+    // An empty array indicates that this is a native histogram only.
+    private final double[] classicUpperBounds;
+
+    // The schema defines the resolution of the native histogram.
+    // Schema is Prometheus terminology, in OpenTelemetry it's named "scale".
+    // The formula for the bucket boundaries at position "index" is:
+    //
+    // base := base = (2^(2^-scale))
+    // lowerBound := base^(index-1)
+    // upperBound := base^(index)
+    //
+    // Note that this is off-by-one compared to OpenTelemetry.
+    //
+    // Example: With schema 0 the bucket boundaries are ... 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16, ...
+    // Each increment in schema doubles the number of buckets.
+    //
+    // The initialNativeSchema is the schema we start with. The histogram will automatically scale down
+    // if the number of native histogram buckets exceeds nativeMaxBuckets.
+    private final int nativeInitialSchema; // integer in [-4, 8]
+
+    // Native histogram buckets get smaller and smaller the closer they get to zero.
+    // To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+    // values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+    //
+    // The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+    // the number of native histogram buckets exceeds nativeMaxBuckets.
+    private final double nativeMinZeroThreshold;
+    private final double nativeMaxZeroThreshold;
+
+    // When the number of native histogram buckets becomes larger than nativeMaxBuckets,
+    // an attempt is made to reduce the number of buckets:
+    // (1) Reset if the last reset is longer than the reset duration ago
+    // (2) Increase the zero bucket width if it's smaller than nativeMaxZeroThreshold
+    // (3) Decrease the nativeSchema, i.e. merge pairs of neighboring buckets into one
+    private final int nativeMaxBuckets;
+
+    // If the number of native histogram buckets exceeds nativeMaxBuckets,
+    // the histogram may reset (all values set to zero) after nativeResetDurationSeconds is expired.
+    private final long nativeResetDurationSeconds; // 0 indicates no reset
+
+    private Histogram(Histogram.Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        nativeInitialSchema = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramClassicOnly())) {
+                return CLASSIC_HISTOGRAM;
+            } else {
+                return props.getHistogramNativeInitialSchema();
+            }
+        });
+        classicUpperBounds = getConfigProperty(properties, props -> {
+            if (Boolean.TRUE.equals(props.getHistogramNativeOnly())) {
+                return new double[]{};
+            } else if (props.getHistogramClassicUpperBounds() != null) {
+                SortedSet<Double> upperBounds = new TreeSet<>(props.getHistogramClassicUpperBounds());
+                upperBounds.add(Double.POSITIVE_INFINITY);
+                double[] result = new double[upperBounds.size()];
+                int i = 0;
+                for (double upperBound : upperBounds) {
+                    result[i++] = upperBound;
+                }
+                return result;
+            } else {
+                return null;
+            }
+        });
+        double max = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxZeroThreshold);
+        double min = getConfigProperty(properties, MetricsProperties::getHistogramNativeMinZeroThreshold);
+        nativeMaxZeroThreshold = max == builder.DEFAULT_NATIVE_MAX_ZERO_THRESHOLD && min > max ? min : max;
+        nativeMinZeroThreshold = Math.min(min, nativeMaxZeroThreshold);
+        nativeMaxBuckets = getConfigProperty(properties, MetricsProperties::getHistogramNativeMaxNumberOfBuckets);
+        nativeResetDurationSeconds = getConfigProperty(properties, MetricsProperties::getHistogramNativeResetDurationSeconds);
+        ExemplarsProperties exemplarsProperties = prometheusProperties.getExemplarProperties();
+        exemplarSamplerConfig = classicUpperBounds.length == 0 ?
+                new ExemplarSamplerConfig(exemplarsProperties, 4) :
+                new ExemplarSamplerConfig(exemplarsProperties, classicUpperBounds);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    public class DataPoint implements DistributionDataPoint {
+        private final LongAdder[] classicBuckets;
+        private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForPositiveValues = new ConcurrentHashMap<>();
+        private final ConcurrentHashMap<Integer, LongAdder> nativeBucketsForNegativeValues = new ConcurrentHashMap<>();
+        private final LongAdder nativeZeroCount = new LongAdder();
+        private final LongAdder count = new LongAdder();
+        private final DoubleAdder sum = new DoubleAdder();
+        private volatile int nativeSchema = nativeInitialSchema; // integer in [-4, 8] or CLASSIC_HISTOGRAM
+        private volatile double nativeZeroThreshold = Histogram.this.nativeMinZeroThreshold;
+        private volatile long createdTimeMillis = System.currentTimeMillis();
+        private final Buffer buffer = new Buffer();
+        private volatile boolean resetDurationExpired = false;
+        private final ExemplarSampler exemplarSampler;
+
+        private DataPoint() {
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
+            classicBuckets = new LongAdder[classicUpperBounds.length];
+            for (int i = 0; i < classicUpperBounds.length; i++) {
+                classicBuckets[i] = new LongAdder();
+            }
+            maybeScheduleNextReset();
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
+                // See https://github.com/prometheus/client_golang/issues/1275 on ignoring NaN observations.
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value, false);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observeWithExemplar(double value, Labels labels) {
+            if (Double.isNaN(value)) {
+                // See https://github.com/prometheus/client_golang/issues/1275 on ignoring NaN observations.
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value, false);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private void doObserve(double value, boolean fromBuffer) {
+            // classicUpperBounds is an empty array if this is a native histogram only.
+            for (int i = 0; i < classicUpperBounds.length; ++i) {
+                // The last bucket is +Inf, so we always increment.
+                if (value <= classicUpperBounds[i]) {
+                    classicBuckets[i].add(1);
+                    break;
+                }
+            }
+            boolean nativeBucketCreated = false;
+            if (Histogram.this.nativeInitialSchema != CLASSIC_HISTOGRAM) {
+                if (value > nativeZeroThreshold) {
+                    nativeBucketCreated = addToNativeBucket(value, nativeBucketsForPositiveValues);
+                } else if (value < -nativeZeroThreshold) {
+                    nativeBucketCreated = addToNativeBucket(-value, nativeBucketsForNegativeValues);
+                } else {
+                    nativeZeroCount.add(1);
+                }
+            }
+            sum.add(value);
+            count.increment(); // must be the last step, because count is used to signal that the operation is complete.
+            if (!fromBuffer) {
+                // maybeResetOrScaleDown will switch to the buffer,
+                // which won't work if we are currently still processing observations from the buffer.
+                // The reason is that before switching to the buffer we wait for all pending observations to be counted.
+                // If we do this while still applying observations from the buffer, the pending observations from
+                // the buffer will never be counted, and the buffer.run() method will wait forever.
+                maybeResetOrScaleDown(value, nativeBucketCreated);
+            }
+        }
+
+        private HistogramSnapshot.HistogramDataPointSnapshot collect(Labels labels) {
+            Exemplars exemplars = exemplarSampler != null ? exemplarSampler.collect() : Exemplars.EMPTY;
+            return buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    () -> {
+                        if (classicUpperBounds.length == 0) {
+                            // native only
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    nativeSchema,
+                                    nativeZeroCount.sum(),
+                                    nativeZeroThreshold,
+                                    toBucketList(nativeBucketsForPositiveValues),
+                                    toBucketList(nativeBucketsForNegativeValues),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        } else if (Histogram.this.nativeInitialSchema == CLASSIC_HISTOGRAM) {
+                            // classic only
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        } else {
+                            // hybrid: classic and native
+                            return new HistogramSnapshot.HistogramDataPointSnapshot(
+                                    ClassicHistogramBuckets.of(classicUpperBounds, classicBuckets),
+                                    nativeSchema,
+                                    nativeZeroCount.sum(),
+                                    nativeZeroThreshold,
+                                    toBucketList(nativeBucketsForPositiveValues),
+                                    toBucketList(nativeBucketsForNegativeValues),
+                                    sum.sum(),
+                                    labels,
+                                    exemplars,
+                                    createdTimeMillis);
+                        }
+                    },
+                    v -> doObserve(v, true)
+            );
+        }
+
+        private boolean addToNativeBucket(double value, ConcurrentHashMap<Integer, LongAdder> buckets) {
+            boolean newBucketCreated = false;
+            int bucketIndex;
+            if (Double.isInfinite(value)) {
+                bucketIndex = findBucketIndex(Double.MAX_VALUE) + 1;
+            } else {
+                bucketIndex = findBucketIndex(value);
+            }
+            LongAdder bucketCount = buckets.get(bucketIndex);
+            if (bucketCount == null) {
+                LongAdder newBucketCount = new LongAdder();
+                LongAdder existingBucketCount = buckets.putIfAbsent(bucketIndex, newBucketCount);
+                if (existingBucketCount == null) {
+                    newBucketCreated = true;
+                    bucketCount = newBucketCount;
+                } else {
+                    bucketCount = existingBucketCount;
+                }
+            }
+            bucketCount.increment();
+            return newBucketCreated;
+        }
+
+        private int findBucketIndex(double value) {
+            // Preconditions:
+            // Double.isNan(value) is false;
+            // Double.isInfinite(value) is false;
+            // value > 0
+            // ---
+            // The following is a naive implementation of C's frexp() function.
+            // Performance can be improved by using the internal Bit representation of floating point numbers.
+            // More info on the Bit representation of floating point numbers:
+            // https://stackoverflow.com/questions/8341395/what-is-a-subnormal-floating-point-number
+            // Result: value == frac * 2^exp where frac in [0.5, 1).
+            double frac = value;
+            int exp = 0;
+            while (frac < 0.5) {
+                frac *= 2.0;
+                exp--;
+            }
+            while (frac >= 1.0) {
+                frac /= 2.0;
+                exp++;
+            }
+            // end of frexp()
+
+            if (nativeSchema >= 1) {
+                return findIndex(NATIVE_BOUNDS[nativeSchema - 1], frac) + (exp - 1) * NATIVE_BOUNDS[nativeSchema - 1].length;
+            } else {
+                int bucketIndex = exp;
+                if (frac == 0.5) {
+                    bucketIndex--;
+                }
+                int offset = (1 << -nativeSchema) - 1;
+                bucketIndex = (bucketIndex + offset) >> -nativeSchema;
+                return bucketIndex;
+            }
+        }
+
+        private int findIndex(double[] bounds, double frac) {
+            // The following is the equivalent of golang's sort.SearchFloat64s(bounds, frac)
+            // See https://pkg.go.dev/sort#SearchFloat64s
+            int first = 0;
+            int last = bounds.length - 1;
+            while (first <= last) {
+                int mid = (first + last) / 2;
+                if (bounds[mid] == frac) {
+                    return mid;
+                } else if (bounds[mid] < frac) {
+                    first = mid + 1;
+                } else {
+                    last = mid - 1;
+                }
+            }
+            return last + 1;
+        }
+
+        /**
+         * Makes sure that the number of native buckets does not exceed nativeMaxBuckets.
+         * <ul>
+         *     <li>If the histogram has already been scaled down (nativeSchema < initialSchema)
+         *         reset after resetIntervalExpired to get back to the original schema.</li>
+         *     <li>If a new bucket was created and we now exceed nativeMaxBuckets
+         *         run maybeScaleDown() to scale down</li>
+         * </ul>
+         */
+        private void maybeResetOrScaleDown(double value, boolean nativeBucketCreated) {
+            AtomicBoolean wasReset = new AtomicBoolean(false);
+            if (resetDurationExpired && nativeSchema < nativeInitialSchema) {
+                // If nativeSchema < initialNativeSchema the histogram has been scaled down.
+                // So if resetDurationExpired we will reset it to restore the original native schema.
+                buffer.run(expectedCount -> count.sum() == expectedCount,
+                        () -> {
+                            if (maybeReset()) {
+                                wasReset.set(true);
+                            }
+                            return null;
+                        },
+                        v -> doObserve(v, true));
+            } else if (nativeBucketCreated) {
+                // If a new bucket was created we need to check if nativeMaxBuckets is exceeded
+                // and scale down if so.
+                maybeScaleDown(wasReset);
+            }
+            if (wasReset.get()) {
+                // We just discarded the newly observed value. Observe it again.
+                if (!buffer.append(value)) {
+                    doObserve(value, true);
+                }
+            }
+        }
+
+        private void maybeScaleDown(AtomicBoolean wasReset) {
+            if (nativeMaxBuckets == 0 || nativeSchema == -4) {
+                return;
+            }
+            int numberOfBuckets = nativeBucketsForPositiveValues.size() + nativeBucketsForNegativeValues.size();
+            if (numberOfBuckets <= nativeMaxBuckets) {
+                return;
+            }
+            buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    () -> {
+                        // Now we are in the synchronized block while new observations go into the buffer.
+                        // Check again if we need to limit the bucket size, because another thread might
+                        // have limited it in the meantime.
+                        int nBuckets = nativeBucketsForPositiveValues.size() + nativeBucketsForNegativeValues.size();
+                        if (nBuckets <= nativeMaxBuckets || nativeSchema == -4) {
+                            return null;
+                        }
+                        if (maybeReset()) {
+                            wasReset.set(true);
+                            return null;
+                        }
+                        if (maybeWidenZeroBucket()) {
+                            return null;
+                        }
+                        doubleBucketWidth();
+                        return null;
+                    },
+                    v -> doObserve(v, true)
+            );
+        }
+
+        // maybeReset is called in the synchronized block while new observations go into the buffer.
+        private boolean maybeReset() {
+            if (!resetDurationExpired) {
+                return false;
+            }
+            resetDurationExpired = false;
+            buffer.reset();
+            nativeBucketsForPositiveValues.clear();
+            nativeBucketsForNegativeValues.clear();
+            nativeZeroCount.reset();
+            count.reset();
+            sum.reset();
+            for (int i = 0; i < classicBuckets.length; i++) {
+                classicBuckets[i].reset();
+            }
+            nativeZeroThreshold = nativeMinZeroThreshold;
+            nativeSchema = Histogram.this.nativeInitialSchema;
+            createdTimeMillis = System.currentTimeMillis();
+            if (exemplarSampler != null) {
+                exemplarSampler.reset();
+            }
+            maybeScheduleNextReset();
+            return true;
+        }
+
+        // maybeWidenZeroBucket is called in the synchronized block while new observations go into the buffer.
+        private boolean maybeWidenZeroBucket() {
+            if (nativeZeroThreshold >= nativeMaxZeroThreshold) {
+                return false;
+            }
+            int smallestIndex = findSmallestIndex(nativeBucketsForPositiveValues);
+            int smallestNegativeIndex = findSmallestIndex(nativeBucketsForNegativeValues);
+            if (smallestNegativeIndex < smallestIndex) {
+                smallestIndex = smallestNegativeIndex;
+            }
+            if (smallestIndex == Integer.MAX_VALUE) {
+                return false;
+            }
+            double newZeroThreshold = nativeBucketIndexToUpperBound(nativeSchema, smallestIndex);
+            if (newZeroThreshold > nativeMaxZeroThreshold) {
+                return false;
+            }
+            mergeWithZeroBucket(smallestIndex, nativeBucketsForPositiveValues);
+            mergeWithZeroBucket(smallestIndex, nativeBucketsForNegativeValues);
+            nativeZeroThreshold = newZeroThreshold;
+            return true;
+        }
+
+        private void mergeWithZeroBucket(int index, Map<Integer, LongAdder> buckets) {
+            LongAdder count = buckets.remove(index);
+            if (count != null) {
+                nativeZeroCount.add(count.sum());
+            }
+        }
+
+        private double nativeBucketIndexToUpperBound(int schema, int index) {
+            double result = calcUpperBound(schema, index);
+            if (Double.isInfinite(result)) {
+                // The last bucket boundary should always be MAX_VALUE, so that the +Inf bucket counts only
+                // actual +Inf observations.
+                // However, MAX_VALUE is not a natural bucket boundary, so we introduce MAX_VALUE
+                // as an artificial boundary before +Inf.
+                double previousBucketBoundary = calcUpperBound(schema, index - 1);
+                if (Double.isFinite(previousBucketBoundary) && previousBucketBoundary < Double.MAX_VALUE) {
+                    return Double.MAX_VALUE;
+                }
+            }
+            return result;
+        }
+
+        private double calcUpperBound(int schema, int index) {
+            // The actual formula is:
+            // ---
+            // base := 2^(2^-schema);
+            // upperBound := base^index;
+            // ---
+            // The following implementation reduces the numerical error for index > 0.
+            // It's not very efficient. We should refactor and use an algorithm as in client_golang's getLe()
+            double factor = 1.0;
+            while (index > 0) {
+                if (index % 2 == 0) {
+                    index /= 2;
+                    schema -= 1;
+                } else {
+                    index -= 1;
+                    factor *= Math.pow(2, Math.pow(2, -schema));
+                }
+            }
+            return factor * Math.pow(2, index * Math.pow(2, -schema));
+        }
+
+        private int findSmallestIndex(Map<Integer, LongAdder> nativeBuckets) {
+            int result = Integer.MAX_VALUE;
+            for (int key : nativeBuckets.keySet()) {
+                if (key < result) {
+                    result = key;
+                }
+            }
+            return result;
+        }
+
+        // doubleBucketWidth is called in the synchronized block while new observations go into the buffer.
+        private void doubleBucketWidth() {
+            doubleBucketWidth(nativeBucketsForPositiveValues);
+            doubleBucketWidth(nativeBucketsForNegativeValues);
+            nativeSchema--;
+        }
+
+        private void doubleBucketWidth(Map<Integer, LongAdder> buckets) {
+            int[] keys = new int[buckets.size()];
+            long[] values = new long[keys.length];
+            int i = 0;
+            for (Map.Entry<Integer, LongAdder> entry : buckets.entrySet()) {
+                keys[i] = entry.getKey();
+                values[i] = entry.getValue().sum();
+                i++;
+            }
+            buckets.clear();
+            for (i = 0; i < keys.length; i++) {
+                int index = (keys[i] + 1) / 2;
+                LongAdder count = buckets.get(index);
+                if (count == null) {
+                    count = new LongAdder();
+                    buckets.put(index, count);
+                }
+                count.add(values[i]);
+            }
+        }
+
+        private NativeHistogramBuckets toBucketList(ConcurrentHashMap<Integer, LongAdder> map) {
+            int[] bucketIndexes = new int[map.size()];
+            long[] counts = new long[map.size()];
+            int i = 0;
+            for (Map.Entry<Integer, LongAdder> entry : map.entrySet()) {
+                bucketIndexes[i] = entry.getKey();
+                counts[i] = entry.getValue().sum();
+                i++;
+            }
+            return NativeHistogramBuckets.of(bucketIndexes, counts);
+        }
+
+        private void maybeScheduleNextReset() {
+            if (nativeResetDurationSeconds > 0) {
+                Scheduler.schedule(() -> resetDurationExpired = true, nativeResetDurationSeconds, TimeUnit.SECONDS);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public HistogramSnapshot collect() {
+        return (HistogramSnapshot) super.collect();
+    }
+
+    @Override
+    protected HistogramSnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<HistogramSnapshot.HistogramDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new HistogramSnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+    static {
+        // See bounds in client_golang's histogram implementation.
+        NATIVE_BOUNDS = new double[8][];
+        for (int schema = 1; schema <= 8; schema++) {
+            NATIVE_BOUNDS[schema - 1] = new double[1 << schema];
+            NATIVE_BOUNDS[schema - 1][0] = 0.5;
+            // https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L501
+            double base = Math.pow(2, Math.pow(2, -schema));
+            for (int i = 1; i < NATIVE_BOUNDS[schema - 1].length; i++) {
+                if (i % 2 == 0 && schema > 1) {
+                    // Use previously calculated value for increased precision, see comment in client_golang's implementation.
+                    NATIVE_BOUNDS[schema - 1][i] = NATIVE_BOUNDS[schema - 2][i / 2];
+                } else {
+                    NATIVE_BOUNDS[schema - 1][i] = NATIVE_BOUNDS[schema - 1][i - 1] * base;
+                }
+            }
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Histogram.Builder, Histogram> {
+
+        public static final double[] DEFAULT_CLASSIC_UPPER_BOUNDS = new double[]{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10};
+        private final double DEFAULT_NATIVE_MIN_ZERO_THRESHOLD = Math.pow(2.0, -128);
+        private final double DEFAULT_NATIVE_MAX_ZERO_THRESHOLD = Math.pow(2.0, -128);
+        private final int DEFAULT_NATIVE_INITIAL_SCHEMA = 5;
+        private final int DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS = 160;
+        private final long DEFAULT_NATIVE_RESET_DURATION_SECONDS = 0; // 0 means no reset
+
+        private Boolean nativeOnly;
+        private Boolean classicOnly;
+        private double[] classicUpperBounds;
+        private Integer nativeInitialSchema;
+        private Double nativeMaxZeroThreshold;
+        private Double nativeMinZeroThreshold;
+        private Integer nativeMaxNumberOfBuckets;
+        private Long nativeResetDurationSeconds;
+
+        @Override
+        public Histogram build() {
+            return new Histogram(this, properties);
+        }
+
+        @Override
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withHistogramNativeOnly(nativeOnly)
+                    .withHistogramClassicOnly(classicOnly)
+                    .withHistogramClassicUpperBounds(classicUpperBounds)
+                    .withHistogramNativeInitialSchema(nativeInitialSchema)
+                    .withHistogramNativeMinZeroThreshold(nativeMinZeroThreshold)
+                    .withHistogramNativeMaxZeroThreshold(nativeMaxZeroThreshold)
+                    .withHistogramNativeMaxNumberOfBuckets(nativeMaxNumberOfBuckets)
+                    .withHistogramNativeResetDurationSeconds(nativeResetDurationSeconds)
+                    .build();
+        }
+
+        /**
+         * Default properties for histogram metrics.
+         */
+        @Override
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withHistogramNativeOnly(false)
+                    .withHistogramClassicOnly(false)
+                    .withHistogramClassicUpperBounds(DEFAULT_CLASSIC_UPPER_BOUNDS)
+                    .withHistogramNativeInitialSchema(DEFAULT_NATIVE_INITIAL_SCHEMA)
+                    .withHistogramNativeMinZeroThreshold(DEFAULT_NATIVE_MIN_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxZeroThreshold(DEFAULT_NATIVE_MAX_ZERO_THRESHOLD)
+                    .withHistogramNativeMaxNumberOfBuckets(DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS)
+                    .withHistogramNativeResetDurationSeconds(DEFAULT_NATIVE_RESET_DURATION_SECONDS)
+                    .build();
+        }
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.singletonList("le"), config);
+        }
+
+        /**
+         * Use the native histogram representation only, i.e. don't maintain classic histogram buckets.
+         * See {@link Histogram} for more info.
+         */
+        public Builder nativeOnly() {
+            if (Boolean.TRUE.equals(classicOnly)) {
+                throw new IllegalArgumentException("Cannot call nativeOnly() after calling classicOnly().");
+            }
+            nativeOnly = true;
+            return this;
+        }
+
+        /**
+         * Use the classic histogram representation only, i.e. don't maintain native histogram buckets.
+         * See {@link Histogram} for more info.
+         */
+        public Builder classicOnly() {
+            if (Boolean.TRUE.equals(nativeOnly)) {
+                throw new IllegalArgumentException("Cannot call classicOnly() after calling nativeOnly().");
+            }
+            classicOnly = true;
+            return this;
+        }
+
+
+        /**
+         * Set the upper bounds for the classic histogram buckets.
+         * Default is {@link Builder#DEFAULT_CLASSIC_UPPER_BOUNDS}.
+         * If the +Inf bucket is missing it will be added.
+         * If upperBounds contains duplicates the duplicates will be removed.
+         */
+        public Builder withClassicBuckets(double... upperBounds) {
+            this.classicUpperBounds = upperBounds;
+            for (double bound : upperBounds) {
+                if (Double.isNaN(bound)) {
+                    throw new IllegalArgumentException("Cannot use NaN as upper bound for a histogram");
+                }
+            }
+            return this;
+        }
+
+        /**
+         * Create classic histogram buckets with linear bucket boundaries.
+         * <p>
+         * Example: {@code withClassicLinearBuckets(1.0, 0.5, 10)} creates bucket boundaries
+         * {@code [[1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5]}.
+         *
+         * @param start is the first bucket boundary
+         * @param width is the width of each bucket
+         * @param count is the total number of buckets, including start
+         */
+        public Builder withClassicLinearBuckets(double start, double width, int count) {
+            this.classicUpperBounds = new double[count];
+            // Use BigDecimal to avoid weird bucket boundaries like 0.7000000000000001.
+            BigDecimal s = new BigDecimal(Double.toString(start));
+            BigDecimal w = new BigDecimal(Double.toString(width));
+            for (int i = 0; i < count; i++) {
+                classicUpperBounds[i] = s.add(w.multiply(new BigDecimal(i))).doubleValue();
+            }
+            return this;
+        }
+
+        /**
+         * Create classic histogram bucxkets with exponential boundaries.
+         * <p>
+         * Example: {@code withClassicExponentialBuckets(1.0, 2.0, 10)} creates bucket bounaries
+         * {@code [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0]}
+         *
+         * @param start  is the first bucket boundary
+         * @param factor growth factor
+         * @param count  total number of buckets, including start
+         */
+        public Builder withClassicExponentialBuckets(double start, double factor, int count) {
+            classicUpperBounds = new double[count];
+            for (int i = 0; i < count; i++) {
+                classicUpperBounds[i] = start * Math.pow(factor, i);
+            }
+            return this;
+        }
+
+        /**
+         * The schema is a number in [-4, 8] defining the resolution of the native histogram.
+         * Default is {@link Builder#DEFAULT_NATIVE_INITIAL_SCHEMA}.
+         * <p>
+         * The higher the schema, the finer the resolution.
+         * Schema is Prometheus terminology. In OpenTelemetry it's called "scale".
+         * <p>
+         * Note that the schema for a histogram may be automatically decreased at runtime if the number
+         * of native histogram buckets exceeds {@link #withNativeMaxNumberOfBuckets(int)}.
+         * <p>
+         * The following table shows:
+         * <ul>
+         *     <li>factor: The growth factor for bucket boundaries, i.e. next bucket boundary = growth factor * previous bucket boundary.
+         *     <li>max quantile error: The maximum error for quantiles calculated using the Prometheus histogram_quantile() function, relative to the observed value, assuming harmonic mean.
+         * </ul>
+         * <table border>
+         *     <tr>
+         *         <td>schema</td><td>factor</td><td>max quantile error</td>
+         *     </tr>
+         *     <tr>
+         *         <td>-4</td><td>65.536</td>99%<td></td>
+         *     </tr>
+         *     <tr>
+         *         <td>-3</td><td>256</td>99%<td></td>
+         *     </tr>
+         *     <tr>
+         *         <td>-2</td><td>16</td><td>88%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>-1</td><td>4</td><td>60%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>0</td><td>2</td><td>33%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>1</td><td>1.4142...</td><td>17%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>2</td><td>1.1892...</td><td>9%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>3</td><td>1.1090...</td><td>4%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>4</td><td>1.0442...</td><td>2%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>5</td><td>1.0218...</td><td>1%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>6</td><td>1.0108...</td><td>0.5%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>7</td><td>1.0054...</td><td>0.3%</td>
+         *     </tr>
+         *     <tr>
+         *         <td>8</td><td>1.0027...</td><td>0.1%</td>
+         *     </tr>
+         * </table>
+         */
+        public Builder withNativeInitialSchema(int nativeSchema) {
+            if (nativeSchema < -4 || nativeSchema > 8) {
+                throw new IllegalArgumentException("Unsupported native histogram schema " + nativeSchema + ": expecting -4 <= schema <= 8.");
+            }
+            this.nativeInitialSchema = nativeSchema;
+            return this;
+        }
+
+        /**
+         * Native histogram buckets get smaller and smaller the closer they get to zero.
+         * To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+         * values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+         * <p>
+         * The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+         * the number of native histogram buckets exceeds nativeMaxBuckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS}.
+         */
+        public Builder withNativeMaxZeroThreshold(double nativeMaxZeroThreshold) {
+            if (nativeMaxZeroThreshold < 0) {
+                throw new IllegalArgumentException("Illegal native max zero threshold " + nativeMaxZeroThreshold + ": must be >= 0");
+            }
+            this.nativeMaxZeroThreshold = nativeMaxZeroThreshold;
+            return this;
+        }
+
+        /**
+         * Native histogram buckets get smaller and smaller the closer they get to zero.
+         * To avoid wasting a lot of buckets for observations fluctuating around zero, we consider all
+         * values in [-zeroThreshold, +zeroThreshold] to be equal to zero.
+         * <p>
+         * The zeroThreshold is initialized with minZeroThreshold, and will grow up to maxZeroThreshold if
+         * the number of native histogram buckets exceeds nativeMaxBuckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MIN_ZERO_THRESHOLD}.
+         */
+        public Builder withNativeMinZeroThreshold(double nativeMinZeroThreshold) {
+            if (nativeMinZeroThreshold < 0) {
+                throw new IllegalArgumentException("Illegal native min zero threshold " + nativeMinZeroThreshold + ": must be >= 0");
+            }
+            this.nativeMinZeroThreshold = nativeMinZeroThreshold;
+            return this;
+        }
+
+        /**
+         * Limit the number of native buckets.
+         * <p>
+         * If the number of native buckets exceeds the maximum, the {@link #withNativeInitialSchema(int)} is decreased,
+         * i.e. the resolution of the histogram is decreased to reduce the number of buckets.
+         * <p>
+         * Default is {@link Builder#DEFAULT_NATIVE_MAX_NUMBER_OF_BUCKETS}.
+         */
+        public Builder withNativeMaxNumberOfBuckets(int nativeMaxBuckets) {
+            this.nativeMaxNumberOfBuckets = nativeMaxBuckets;
+            return this;
+        }
+
+        /**
+         * If the histogram needed to be scaled down because {@link #withNativeMaxNumberOfBuckets(int)} was exceeded,
+         * reset the histogram after a certain time interval to go back to the original {@link #withNativeInitialSchema(int)}.
+         * <p>
+         * Reset means all values are set to zero. A good value might be 24h or 7d.
+         * <p>
+         * Default is no reset.
+         */
+        public Builder withNativeResetDuration(long duration, TimeUnit unit) {
+            // TODO: reset interval isn't tested yet
+            if (duration <= 0) {
+                throw new IllegalArgumentException(duration + ": value > 0 expected");
+            }
+            nativeResetDurationSeconds = unit.toSeconds(duration);
+            return this;
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (9d6675dbb86e65db74b02e8eedafd51293d16c71j  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XS  @@ -0,0 +1,132 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * Info metric. Example:
+ * <pre>{@code
+ * Info info = Info.newBuilder()
+ *         .withName("java_runtime_info")
+ *         .withHelp("Java runtime info")
+ *         .withLabelNames("env", "version", "vendor", "runtime")
+ *         .register();
+ *
+ * String version = System.getProperty("java.runtime.version", "unknown");
+ * String vendor = System.getProperty("java.vm.vendor", "unknown");
+ * String runtime = System.getProperty("java.runtime.name", "unknown");
+ *
+ * info.infoLabelValues("prod", version, vendor, runtime);
+ * info.infoLabelValues("dev", version, vendor, runtime);
+ * }</pre>
+ */
+public class Info extends MetricWithFixedMetadata {
+
+    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+
+    private Info(Builder builder) {
+        super(builder);
+    }
+
+    /**
+     * Create an info data point with the given label values.
+     */
+    public void infoLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            }
+        }
+        labels.add(Labels.of(labelNames, labelValues));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public InfoSnapshot collect() {
+        List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        }
+        return new InfoSnapshot(getMetadata(), data);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends MetricWithFixedMetadata.Builder<Builder, Info> {
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        /**
+         * The {@code _info} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * Info info1 = Info.newBuilder()
+         *     .withName("runtime_info")
+         *     .build();
+         * Info info2 = Info.newBuilder()
+         *     .withName("runtime")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code info1} and {@code info2} will be named {@code "runtime_info"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            if (name != null && name.endsWith("_info")) {
+                name = name.substring(0, name.length() - 5);
+            }
+            return super.withName(name);
+        }
+
+        /**
+         * Throws an {@link UnsupportedOperationException} because Info metrics cannot have a unit.
+         */
+        @Override
+        public Builder withUnit(Unit unit) {
+            if (unit != null) {
+                throw new UnsupportedOperationException("Info metrics cannot have a unit.");
+            }
+            return this;
+        }
+
+        private static String normalizeName(String name) {
+            if (name != null && name.endsWith("_info")) {
+                name = name.substring(0, name.length() - 5);
+            }
+            return name;
+        }
+
+        @Override
+        public Info build() {
+            return new Info(withName(normalizeName(name)));
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (81ff931ce511e1e05fd6ea3ef92a646983553542j  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj  addedj  KDj  K j  KDj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X	  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.Collector;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Common base class for all metrics.
+ */
+public abstract class Metric implements Collector {
+
+    protected final Labels constLabels;
+
+    protected Metric(Builder<?, ?> builder) {
+        this.constLabels = builder.constLabels;
+    }
+
+    @Override
+    public abstract MetricSnapshot collect();
+
+    protected static abstract class Builder<B extends Builder<B, M>, M extends Metric> {
+
+        protected final List<String> illegalLabelNames;
+        protected final PrometheusProperties properties;
+        private Labels constLabels = Labels.EMPTY;
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            this.illegalLabelNames = new ArrayList<>(illegalLabelNames);
+            this.properties = properties;
+        }
+
+        // ConstLabels are only used rarely. In particular, do not use them to
+        // attach the same labels to all your metrics. Those use cases are
+        // better covered by target labels set by the scraping Prometheus
+        // server, or by one specific metric (e.g. a build_info or a
+        // machine_role metric). See also
+        // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels
+        public B withConstLabels(Labels constLabels) {
+            for (Label label : constLabels) { // NPE if constLabels is null
+                if (illegalLabelNames.contains(label.getName())) {
+                    throw new IllegalArgumentException(label.getName() + ": illegal label name for this metric type");
+                }
+            }
+            this.constLabels = constLabels;
+            return self();
+        }
+
+        public M register() {
+            return register(PrometheusRegistry.defaultRegistry);
+        }
+
+        public M register(PrometheusRegistry registry) {
+            M metric = build();
+            registry.register(metric);
+            return metric;
+        }
+
+        public abstract M build();
+
+        protected abstract B self();
+    }
+}u}(j  (22b6076542f6da856dc1fcbf50bfbd65793fc501j  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj  addedj  KZj  K j  KZj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,90 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Almost all metrics have fixed metadata, i.e. the metric name is known when the metric is created.
+ * <p>
+ * An exception would be a metric that is a bridge to a 3rd party metric library, where the metric name
+ * has to be retrieved from the 3rd party metric library at scrape time.
+ */
+public abstract class MetricWithFixedMetadata extends Metric {
+
+    private final MetricMetadata metadata;
+    protected final String[] labelNames;
+
+    protected MetricWithFixedMetadata(Builder<?, ?> builder) {
+        super(builder);
+        this.metadata = new MetricMetadata(makeName(builder.name, builder.unit), builder.help, builder.unit);
+        this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
+    }
+
+    protected MetricMetadata getMetadata() {
+        return metadata;
+    }
+
+    private String makeName(String name, Unit unit) {
+        if (unit != null) {
+            String suffix = "_" + unit;
+            if (!name.endsWith(suffix)) {
+                name = name + suffix;
+            }
+        }
+        return name;
+    }
+
+    public static abstract class Builder<B extends Builder<B, M>, M extends MetricWithFixedMetadata> extends Metric.Builder<B, M> {
+
+        protected String name;
+        private Unit unit;
+        private String help;
+        private String[] labelNames = new String[0];
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+
+        public B withName(String name) {
+            if (!MetricMetadata.isValidMetricName(name)) {
+                throw new IllegalArgumentException("'" + name + "': Illegal metric name.");
+            }
+            this.name = name;
+            return self();
+        }
+
+        public B withUnit(Unit unit) {
+            this.unit = unit;
+            return self();
+        }
+
+        public B withHelp(String help) {
+            this.help = help;
+            return self();
+        }
+
+        public B withLabelNames(String... labelNames) {
+            for (String labelName : labelNames) {
+                if (!Labels.isValidLabelName(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name");
+                }
+                if (illegalLabelNames.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
+                }
+            }
+            this.labelNames = labelNames;
+            return self();
+        }
+
+        @Override
+        public abstract M build();
+
+        @Override
+        protected abstract B self();
+    }
+}u}(j  (b789e809c567a46ce3105496d4ce072af3057489j  [prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.javaj  addedj  KJj  K j  KJj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSlidingWindow.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,74 @@
+package io.prometheus.metrics.core.metrics;
+
+import java.lang.reflect.Array;
+import java.util.concurrent.TimeUnit;
+import java.util.function.ObjDoubleConsumer;
+import java.util.function.Supplier;
+
+/**
+ * Maintains a ring buffer of T to implement a sliding time window.
+ * <p>
+ * This is used to maintain a sliding window of {@link CKMSQuantiles} for {@link Summary} metrics.
+ * <p>
+ * It is implemented in a generic way so that 3rd party libraries can use it for implementing sliding windows.
+ * <p>
+ * TODO: The current implementation is {@code synchronized}. There is likely room for optimization.
+ */
+public class SlidingWindow<T> {
+
+    private final Supplier<T> constructor;
+    private final ObjDoubleConsumer<T> observeFunction;
+    private final T[] ringBuffer;
+    private int currentBucket;
+    private long lastRotateTimestampMillis;
+    private final long durationBetweenRotatesMillis;
+
+    /**
+     * Example: If the {@code maxAgeSeconds} is 60 and {@code ageBuckets} is 3, then 3 instances of {@code T}
+     * are maintained and the sliding window moves to the next instance of T every 20 seconds.
+     *
+     * @param clazz type of T
+     * @param constructor for creating a new instance of T as the old one gets evicted
+     * @param observeFunction for observing a value (e.g. calling {@code t.observe(value)}
+     * @param maxAgeSeconds after this amount of time an instance of T gets evicted.
+     * @param ageBuckets number of age buckets.
+     */
+    public SlidingWindow(Class<T> clazz, Supplier<T> constructor, ObjDoubleConsumer<T> observeFunction, long maxAgeSeconds, int ageBuckets) {
+        this.constructor = constructor;
+        this.observeFunction = observeFunction;
+        this.ringBuffer = (T[]) Array.newInstance(clazz, ageBuckets);
+        for (int i = 0; i < ringBuffer.length; i++) {
+            this.ringBuffer[i] = constructor.get();
+        }
+        this.currentBucket = 0;
+        this.lastRotateTimestampMillis = System.currentTimeMillis();
+        this.durationBetweenRotatesMillis = TimeUnit.SECONDS.toMillis(maxAgeSeconds) / ageBuckets;
+    }
+
+    /**
+     * Get the currently active instance of {@code T}.
+     */
+    public synchronized T current() {
+        return rotate();
+    }
+
+    /**
+     * Observe a value.
+     */
+    public synchronized void observe(double value) {
+        observeFunction.accept(rotate(), value);
+    }
+
+    private T rotate() {
+        long timeSinceLastRotateMillis = System.currentTimeMillis() - lastRotateTimestampMillis;
+        while (timeSinceLastRotateMillis > durationBetweenRotatesMillis) {
+            ringBuffer[currentBucket] = constructor.get();
+            if (++currentBucket >= ringBuffer.length) {
+                currentBucket = 0;
+            }
+            timeSinceLastRotateMillis -= durationBetweenRotatesMillis;
+            lastRotateTimestampMillis += durationBetweenRotatesMillis;
+        }
+        return ringBuffer[currentBucket];
+    }
+}u}(j  (308c61be14cdabfa86b8ab39f5bfee20bfcebd8dj  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,194 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * StateSet metric. Example:
+ * <pre>{@code
+ * public enum Feature {
+ *
+ *     FEATURE_1("feature1"),
+ *     FEATURE_2("feature2");
+ *
+ *     private final String name;
+ *
+ *     Feature(String name) {
+ *         this.name = name;
+ *     }
+ *
+ *     @Override
+ *     public String toString() {
+ *         return name;
+ *     }
+ * }
+ *
+ * public static void main(String[] args) {
+ *
+ *     StateSet stateSet = StateSet.newBuilder()
+ *             .withName("feature_flags")
+ *             .withHelp("Feature flags")
+ *             .withLabelNames("env")
+ *             .withStates(Feature.class)
+ *             .register();
+ *
+ *     stateSet.withLabelValues("dev").setFalse(FEATURE_1);
+ *     stateSet.withLabelValues("dev").setTrue(FEATURE_2);
+ * }
+ * }</pre>
+ * The example above shows how to use a StateSet with an enum.
+ * You don't have to use enum, you can use regular strings as well.
+ */
+public class StateSet extends StatefulMetric<StateSetDataPoint, StateSet.DataPoint> implements StateSetDataPoint {
+
+    private final boolean exemplarsEnabled;
+    private final String[] names;
+
+    private StateSet(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        this.names = builder.names; // builder.names is already a validated copy
+        for (String name : names) {
+            if (this.getMetadata().getName().equals(name)) {
+                throw new IllegalArgumentException("Label name " + name + " is illegal (can't use the metric name as label name in state set metrics)");
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public StateSetSnapshot collect() {
+        return (StateSetSnapshot) super.collect();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setTrue(String state) {
+        getNoLabels().setTrue(state);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setFalse(String state) {
+        getNoLabels().setFalse(state);
+    }
+
+    @Override
+    protected StateSetSnapshot collect(List<Labels> labels, List<DataPoint> metricDataList) {
+        List<StateSetSnapshot.StateSetDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(new StateSetSnapshot.StateSetDataPointSnapshot(names, metricDataList.get(i).values, labels.get(i)));
+        }
+        return new StateSetSnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    class DataPoint implements StateSetDataPoint {
+
+        private final boolean[] values = new boolean[names.length];
+
+        private DataPoint() {
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setTrue(String state) {
+            set(state, true);
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void setFalse(String state) {
+            set(state, false);
+        }
+
+        private void set(String name, boolean value) {
+            for (int i = 0; i < names.length; i++) {
+                if (names[i].equals(name)) {
+                    values[i] = value;
+                    return;
+                }
+            }
+            throw new IllegalArgumentException(name + ": unknown state");
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Builder, StateSet> {
+
+        private String[] names;
+
+        private Builder(PrometheusProperties config) {
+            super(Collections.emptyList(), config);
+        }
+
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
+        public Builder withStates(Class<? extends Enum<?>> enumClass) {
+            return withStates(Stream.of(enumClass.getEnumConstants()).map(Enum::toString).toArray(String[]::new));
+        }
+
+        /**
+         * Declare the states that should be represented by this StateSet.
+         */
+        public Builder withStates(String... stateNames) {
+            if (stateNames.length == 0) {
+                throw new IllegalArgumentException("states cannot be empty");
+            }
+            this.names = Stream.of(stateNames)
+                    .distinct()
+                    .sorted()
+                    .toArray(String[]::new);
+            return this;
+        }
+
+        @Override
+        public StateSet build() {
+            if (names == null) {
+                throw new IllegalStateException("State names are required when building a StateSet.");
+            }
+            return new StateSet(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u      }(j  (591c16e6b22cd0145f4996d95ad1102ea430320fj  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xw  @@ -0,0 +1,158 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.core.datapoints.DataPoint;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
+
+import static java.lang.Boolean.FALSE;
+import static java.lang.Boolean.TRUE;
+
+/**
+ * There are two kinds of metrics:
+ * <ul>
+ *     <li>A {@code StatefulMetric} actively maintains its current values, e.g. a stateful counter actively stores its current count.</li>
+ *     <li>A {@code CallbackMetric} gets its values on demand when it is collected, e.g. a callback gauge representing the current heap size.</li>
+ * </ul>
+ * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
+ * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
+ * but this has nothing to do with multi-threading.
+ */
+abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
+
+    /**
+     * Map label values to data points.
+     */
+    private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
+
+    /**
+     * Shortcut for data.get(Collections.emptyList())
+     */
+    private volatile T noLabels;
+
+    protected StatefulMetric(Builder<?, ?> builder) {
+        super(builder);
+    }
+
+    /**
+     * labels and metricData have the same size. labels.get(i) are the labels for metricData.get(i).
+     */
+    protected abstract MetricSnapshot collect(List<Labels> labels, List<T> metricData);
+
+    public MetricSnapshot collect() {
+        if (labelNames.length == 0 && data.size() == 0) {
+            // This is a metric without labels that has not been used yet. Initialize the data on the fly.
+            withLabelValues();
+        }
+        List<Labels> labels = new ArrayList<>(data.size());
+        List<T> metricData = new ArrayList<>(data.size());
+        for (Map.Entry<List<String>, T> entry : data.entrySet()) {
+            String[] labelValues = entry.getKey().toArray(new String[labelNames.length]);
+            labels.add(constLabels.merge(labelNames, labelValues));
+            metricData.add(entry.getValue());
+        }
+        return collect(labels, metricData);
+    }
+
+    public D withLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            if (labelValues.length == 0) {
+                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
+            } else {
+                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
+            }
+        }
+        return data.computeIfAbsent(Arrays.asList(labelValues), l -> newDataPoint());
+    }
+
+    // TODO: Remove automatically if label values have not been used in a while?
+    public void remove(String... labelValues) {
+        data.remove(Arrays.asList(labelValues));
+    }
+
+    protected abstract T newDataPoint();
+
+    protected T getNoLabels() {
+        if (noLabels == null) {
+            // Note that this will throw an IllegalArgumentException if labelNames is not empty.
+            noLabels = (T) withLabelValues();
+        }
+        return noLabels;
+    }
+
+    protected MetricsProperties[] getMetricProperties(Builder builder, PrometheusProperties prometheusProperties) {
+        String metricName = getMetadata().getName();
+        if (prometheusProperties.getMetricProperties(metricName) != null) {
+            return new MetricsProperties[]{
+                    prometheusProperties.getMetricProperties(metricName), // highest precedence
+                    builder.toProperties(), // second-highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // third-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        } else {
+            return new MetricsProperties[]{
+                    builder.toProperties(), // highest precedence
+                    prometheusProperties.getDefaultMetricProperties(), // second-highest precedence
+                    builder.getDefaultProperties() // fallback
+            };
+        }
+    }
+
+    protected <T> T getConfigProperty(MetricsProperties[] properties, Function<MetricsProperties, T> getter) {
+        T result;
+        for (MetricsProperties props : properties) {
+            result = getter.apply(props);
+            if (result != null) {
+                return result;
+            }
+        }
+        throw new IllegalStateException("Missing default config. This is a bug in the Prometheus metrics core library.");
+    }
+
+    protected abstract boolean isExemplarsEnabled();
+
+    static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
+
+        protected Boolean exemplarsEnabled;
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties config) {
+            super(illegalLabelNames, config);
+        }
+
+        public B withExemplars() {
+            this.exemplarsEnabled = TRUE;
+            return self();
+        }
+
+        public B withoutExemplars() {
+            this.exemplarsEnabled = FALSE;
+            return self();
+        }
+
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
+        protected MetricsProperties toProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .build();
+        }
+
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .build();
+        }
+    }
+}u}(j  (d461162f149129f72af0f2b4224ed5b895ba6ac8j  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaj  addedj  Mcj  K j  Mcj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xg6  @@ -0,0 +1,355 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.MetricsProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.exemplars.ExemplarSampler;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Summary metric. Example:
+ * <pre>{@code
+ * Summary summary = Summary.newBuilder()
+ *         .withName("http_request_duration_seconds_hi")
+ *         .withHelp("HTTP request service time in seconds")
+ *         .withUnit(SECONDS)
+ *         .withLabelNames("method", "path", "status_code")
+ *         .withQuantile(0.5, 0.01)
+ *         .withQuantile(0.95, 0.001)
+ *         .withQuantile(0.99, 0.001)
+ *         .register();
+ *
+ * long start = System.nanoTime();
+ * // process a request, duration will be observed
+ * summary.withLabelValues("GET", "/", "200").observe(Unit.nanosToSeconds(System.nanoTime() - start));
+ * }</pre>
+ * See {@link Summary.Builder} for configuration options.
+ */
+public class Summary extends StatefulMetric<DistributionDataPoint, Summary.DataPoint> implements DistributionDataPoint {
+
+    private final List<CKMSQuantiles.Quantile> quantiles; // May be empty, but cannot be null.
+    private final long maxAgeSeconds;
+    private final int ageBuckets;
+    private final boolean exemplarsEnabled;
+    private final ExemplarSamplerConfig exemplarSamplerConfig;
+
+    private Summary(Builder builder, PrometheusProperties prometheusProperties) {
+        super(builder);
+        MetricsProperties[] properties = getMetricProperties(builder, prometheusProperties);
+        this.exemplarsEnabled = getConfigProperty(properties, MetricsProperties::getExemplarsEnabled);
+        this.quantiles = Collections.unmodifiableList(makeQuantiles(properties));
+        this.maxAgeSeconds = getConfigProperty(properties, MetricsProperties::getSummaryMaxAgeSeconds);
+        this.ageBuckets = getConfigProperty(properties, MetricsProperties::getSummaryNumberOfAgeBuckets);
+        this.exemplarSamplerConfig = new ExemplarSamplerConfig(prometheusProperties.getExemplarProperties(), 4);
+    }
+
+    private List<CKMSQuantiles.Quantile> makeQuantiles(MetricsProperties[] properties) {
+        List<CKMSQuantiles.Quantile> result = new ArrayList<>();
+        List<Double> quantiles = getConfigProperty(properties, MetricsProperties::getSummaryQuantiles);
+        List<Double> quantileErrors = getConfigProperty(properties, MetricsProperties::getSummaryQuantileErrors);
+        if (quantiles != null) {
+            for (int i = 0; i < quantiles.size(); i++) {
+                if (quantileErrors.size() > 0) {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), quantileErrors.get(i)));
+                } else {
+                    result.add(new CKMSQuantiles.Quantile(quantiles.get(i), Builder.defaultError(quantiles.get(i))));
+                }
+            }
+        }
+        return result;
+    }
+
+    @Override
+    protected boolean isExemplarsEnabled() {
+        return exemplarsEnabled;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observe(double amount) {
+        getNoLabels().observe(amount);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void observeWithExemplar(double amount, Labels labels) {
+        getNoLabels().observeWithExemplar(amount, labels);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public SummarySnapshot collect() {
+        return (SummarySnapshot) super.collect();
+    }
+
+    @Override
+    protected SummarySnapshot collect(List<Labels> labels, List<DataPoint> metricData) {
+        List<SummarySnapshot.SummaryDataPointSnapshot> data = new ArrayList<>(labels.size());
+        for (int i = 0; i < labels.size(); i++) {
+            data.add(metricData.get(i).collect(labels.get(i)));
+        }
+        return new SummarySnapshot(getMetadata(), data);
+    }
+
+    @Override
+    protected DataPoint newDataPoint() {
+        return new DataPoint();
+    }
+
+
+    public class DataPoint implements DistributionDataPoint {
+
+        private final LongAdder count = new LongAdder();
+        private final DoubleAdder sum = new DoubleAdder();
+        private final SlidingWindow<CKMSQuantiles> quantileValues;
+        private final Buffer buffer = new Buffer();
+        private final ExemplarSampler exemplarSampler;
+
+        private final long createdTimeMillis = System.currentTimeMillis();
+
+        private DataPoint() {
+            if (quantiles.size() > 0) {
+                CKMSQuantiles.Quantile[] quantilesArray = quantiles.toArray(new CKMSQuantiles.Quantile[0]);
+                quantileValues = new SlidingWindow<>(CKMSQuantiles.class, () -> new CKMSQuantiles(quantilesArray), CKMSQuantiles::insert, maxAgeSeconds, ageBuckets);
+            } else {
+                quantileValues = null;
+            }
+            if (exemplarsEnabled) {
+                exemplarSampler = new ExemplarSampler(exemplarSamplerConfig);
+            } else {
+                exemplarSampler = null;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observe(double value) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observe(value);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void observeWithExemplar(double value, Labels labels) {
+            if (Double.isNaN(value)) {
+                return;
+            }
+            if (!buffer.append(value)) {
+                doObserve(value);
+            }
+            if (isExemplarsEnabled()) {
+                exemplarSampler.observeWithExemplar(value, labels);
+            }
+        }
+
+        private void doObserve(double amount) {
+            sum.add(amount);
+            if (quantileValues != null) {
+                quantileValues.observe(amount);
+            }
+            // count must be incremented last, because in collect() the count
+            // indicates the number of completed observations.
+            count.increment();
+        }
+
+        private SummarySnapshot.SummaryDataPointSnapshot collect(Labels labels) {
+            return buffer.run(
+                    expectedCount -> count.sum() == expectedCount,
+                    // TODO Exemplars (are hard-coded as empty in the line below)
+                    () -> new SummarySnapshot.SummaryDataPointSnapshot(count.sum(), sum.sum(), makeQuantiles(), labels, Exemplars.EMPTY, createdTimeMillis),
+                    this::doObserve
+            );
+        }
+
+        private List<CKMSQuantiles.Quantile> getQuantiles() {
+            return quantiles;
+        }
+
+        private Quantiles makeQuantiles() {
+            Quantile[] quantiles = new Quantile[getQuantiles().size()];
+            for (int i = 0; i < getQuantiles().size(); i++) {
+                CKMSQuantiles.Quantile quantile = getQuantiles().get(i);
+                quantiles[i] = new Quantile(quantile.quantile, quantileValues.current().get(quantile.quantile));
+            }
+            return Quantiles.of(quantiles);
+        }
+    }
+
+    public static Summary.Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Summary.Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder extends StatefulMetric.Builder<Summary.Builder, Summary> {
+
+        /**
+         * 5 minutes. See {@link #withMaxAgeSeconds(long)}.
+         */
+        public static final long DEFAULT_MAX_AGE_SECONDS = TimeUnit.MINUTES.toSeconds(5);
+
+        /**
+         * 5. See {@link #withNumberOfAgeBuckets(int)}
+         */
+        public static final int DEFAULT_NUMBER_OF_AGE_BUCKETS = 5;
+        private final List<CKMSQuantiles.Quantile> quantiles = new ArrayList<>();
+        private Long maxAgeSeconds;
+        private Integer ageBuckets;
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
+        }
+
+        private static double defaultError(double quantile) {
+            if (quantile <= 0.01 || quantile >= 0.99) {
+                return 0.001;
+            } else if (quantile <= 0.02 || quantile >= 0.98) {
+                return 0.005;
+            } else {
+                return 0.01;
+            }
+        }
+
+        /**
+         * See {@link #withQuantile(double, double)}.
+         * <p>
+         * Default errors are:
+         * <ul>
+         *     <li>error = 0.001 if quantile &lt;= 0.01 or quantile &gt;= 0.99</li>
+         *     <li>error = 0.005 if quantile &lt;= 0.02 or quantile &gt;= 0.98</li>
+         *     <li>error = 0.01 else.
+         * </ul>
+         */
+        public Builder withQuantile(double quantile) {
+            return withQuantile(quantile, defaultError(quantile));
+        }
+
+        /**
+         * Example: The following will track the 0.95 quantile:
+         * <pre>{@code
+         * .withQuantile(0.95, 0.001)
+         * }</pre>
+         * The second argument is the acceptable error margin, i.e. with the code above the quantile
+         * will not be exactly the 0.95 quantile but something between 0.949 and 0.951.
+         * <p>
+         * There are two special cases:
+         * <ul>
+         *     <li>{@code .withQuantile(0.0, 0.0)} gives you the minimum observed value</li>
+         *     <li>{@code .withQuantile(1.0, 0.0)} gives you the maximum observed value</li>
+         * </ul>
+         */
+        public Builder withQuantile(double quantile, double error) {
+            if (quantile < 0.0 || quantile > 1.0) {
+                throw new IllegalArgumentException("Quantile " + quantile + " invalid: Expected number between 0.0 and 1.0.");
+            }
+            if (error < 0.0 || error > 1.0) {
+                throw new IllegalArgumentException("Error " + error + " invalid: Expected number between 0.0 and 1.0.");
+            }
+            quantiles.add(new CKMSQuantiles.Quantile(quantile, error));
+            return this;
+        }
+
+        /**
+         * The quantiles are relative to a moving time window.
+         * {@code maxAgeSeconds} is the size of that time window.
+         * Default is {@link #DEFAULT_MAX_AGE_SECONDS}.
+         */
+        public Builder withMaxAgeSeconds(long maxAgeSeconds) {
+            if (maxAgeSeconds <= 0) {
+                throw new IllegalArgumentException("maxAgeSeconds cannot be " + maxAgeSeconds);
+            }
+            this.maxAgeSeconds = maxAgeSeconds;
+            return this;
+        }
+
+        /**
+         * The quantiles are relative to a moving time window.
+         * The {@code numberOfAgeBuckets} defines how smoothly the time window moves forward.
+         * For example, if the time window is 5 minutes and has 5 age buckets,
+         * then it is moving forward every minute by one minute.
+         * Default is {@link #DEFAULT_NUMBER_OF_AGE_BUCKETS}.
+         */
+        public Builder withNumberOfAgeBuckets(int ageBuckets) {
+            if (ageBuckets <= 0) {
+                throw new IllegalArgumentException("ageBuckets cannot be " + ageBuckets);
+            }
+            this.ageBuckets = ageBuckets;
+            return this;
+        }
+
+        @Override
+        protected MetricsProperties toProperties() {
+            double[] quantiles = null;
+            double[] quantileErrors = null;
+            if (!this.quantiles.isEmpty()) {
+                quantiles = new double[this.quantiles.size()];
+                quantileErrors = new double[this.quantiles.size()];
+                for (int i = 0; i < this.quantiles.size(); i++) {
+                    quantiles[i] = this.quantiles.get(i).quantile;
+                    quantileErrors[i] = this.quantiles.get(i).epsilon;
+                }
+            }
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(exemplarsEnabled)
+                    .withSummaryQuantiles(quantiles)
+                    .withSummaryQuantileErrors(quantileErrors)
+                    .withSummaryNumberOfAgeBuckets(ageBuckets)
+                    .withSummaryMaxAgeSeconds(maxAgeSeconds)
+                    .build();
+        }
+
+        /**
+         * Default properties for summary metrics.
+         */
+        @Override
+        public MetricsProperties getDefaultProperties() {
+            return MetricsProperties.newBuilder()
+                    .withExemplarsEnabled(true)
+                    .withSummaryQuantiles()
+                    .withSummaryNumberOfAgeBuckets(DEFAULT_NUMBER_OF_AGE_BUCKETS)
+                    .withSummaryMaxAgeSeconds(DEFAULT_MAX_AGE_SECONDS)
+                    .build();
+        }
+
+        @Override
+        public Summary build() {
+            return new Summary(this, properties);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (c9bdcfdfe9d0a497adf1d44e909971dd5b2f301fj  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SummaryWithCallback.javaj  addedj  K]j  K j  K]j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X$  @@ -0,0 +1,93 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * double MILLISECONDS_PER_SECOND = 1E3;
+ *
+ * SummaryWithCallback.newBuilder()
+ *         .withName("jvm_gc_collection_seconds")
+ *         .withHelp("Time spent in a given JVM garbage collector in seconds.")
+ *         .withUnit(Unit.SECONDS)
+ *         .withLabelNames("gc")
+ *         .withCallback(callback -> {
+ *             for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
+ *                 callback.call(
+ *                         gc.getCollectionCount(),
+ *                         gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
+ *                         Quantiles.EMPTY,
+ *                         gc.getName()
+ *                 );
+ *             }
+ *         })
+ *         .register();
+ * }</pre>
+ */
+public class SummaryWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(long count, double sum, Quantiles quantiles, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private SummaryWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public SummarySnapshot collect() {
+        List<SummarySnapshot.SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((count, sum, quantiles, labelValues) -> {
+            dataPoints.add(new SummarySnapshot.SummaryDataPointSnapshot(count, sum, quantiles, makeLabels(labelValues), Exemplars.EMPTY, 0L));
+        });
+        return new SummarySnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<SummaryWithCallback.Builder, SummaryWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
+        }
+
+        @Override
+        public SummaryWithCallback build() {
+            return new SummaryWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(j  (22780819e6adf7e63bae34f0a2a01aba5c9a3c1cj  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/util/Scheduler.javaj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Futil%2FScheduler.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XK  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.core.util;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Used for scheduling maintenance tasks like purging outdated Exemplars or resetting native histograms.
+ */
+public class Scheduler {
+
+    private static class DaemonThreadFactory implements ThreadFactory {
+        public Thread newThread(Runnable runnable) {
+            Thread thread = new Thread(runnable);
+            thread.setDaemon(true);
+            return thread;
+        }
+    }
+
+    private static final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
+
+    public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
+        return executor.schedule(command, delay, unit);
+    }
+
+    /**
+     * For unit test. Wait until the executor Thread is running.
+     */
+    public static void awaitInitialization() throws InterruptedException {
+        CountDownLatch latch = new CountDownLatch(1);
+        Scheduler.schedule(latch::countDown, 0, TimeUnit.MILLISECONDS);
+        latch.await();
+    }
+}u}(j  (c20482e44fd4dbf031a75df60a851bb089bd8bfdj  mprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerConfigTestUtil.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerConfigTestUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,30 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
+
+import java.lang.reflect.Field;
+
+public class ExemplarSamplerConfigTestUtil {
+
+    private static ExemplarSamplerConfig getConfig(Object metric, String fieldName) throws NoSuchFieldException, IllegalAccessException {
+        Field configField = metric.getClass().getDeclaredField(fieldName);
+        configField.setAccessible(true);
+        return (ExemplarSamplerConfig) configField.get(metric);
+    }
+
+    private static void setRetentionPeriod(ExemplarSamplerConfig config, String name, long value) throws IllegalAccessException, NoSuchFieldException {
+        Field field = config.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        field.set(config, value);
+    }
+
+    public static void setMinRetentionPeriodMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "minRetentionPeriodMillis", value);
+    }
+
+    public static void setSampleIntervalMillis(Object metric, long value) throws NoSuchFieldException, IllegalAccessException {
+        ExemplarSamplerConfig config = getConfig(metric, "exemplarSamplerConfig");
+        setRetentionPeriod(config, "sampleIntervalMillis", value);
+    }
+}u}(j  (24882065e45e4858ab4effaa4916b86015ea8c9ej  cprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/exemplars/ExemplarSamplerTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fexemplars%2FExemplarSamplerTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X$  @@ -0,0 +1,234 @@
+package io.prometheus.metrics.core.exemplars;
+
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Label;
+import io.prometheus.metrics.core.util.Scheduler;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ExemplarSamplerTest {
+
+    private final int tick = 10; // Time step in milliseconds. Make this larger if the test is flaky.
+    private final int sampleInterval = 10 * tick; // do not change this
+    private final int minAge = 50 * tick; // do not change this
+    private final int maxAge = 200 * tick; // do not change this
+
+    private ExemplarSamplerConfig makeConfig(double... buckets) {
+        return new ExemplarSamplerConfig(
+                minAge,
+                maxAge,
+                sampleInterval,
+                buckets.length == 0 ? 4 : buckets.length, // number of exemplars
+                buckets.length == 0 ? null : buckets
+        );
+    }
+
+
+    private static class SpanContext implements io.prometheus.metrics.tracer.common.SpanContext {
+
+        int callCount = 0;
+        boolean isSampled = true;
+        boolean isExemplar = false;
+
+        @Override
+        public String getCurrentTraceId() {
+            return "" + (callCount++);
+        }
+
+        @Override
+        public String getCurrentSpanId() {
+            return "" + callCount;
+        }
+
+        @Override
+        public boolean isCurrentSpanSampled() {
+            return isSampled;
+        }
+
+        @Override
+        public void markCurrentSpanAsExemplar() {
+            isExemplar = true;
+        }
+    }
+
+    @Test
+    public void testCustomExemplarsBuckets() throws Exception {
+        // TODO
+    }
+
+    private io.prometheus.metrics.tracer.common.SpanContext origContext;
+
+    @Before
+    public void setUp() {
+        origContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origContext);
+    }
+
+    @Test
+    public void testIsSampled() throws Exception {
+        SpanContext context = new SpanContext();
+        context.isSampled = false;
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3); // no sampled, because isSampled() returns false
+        assertExemplars(sampler); // empty
+    }
+
+    @Test
+    public void testDefaultConfigHasFourExemplars() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3);
+        Thread.sleep(sampleInterval + tick); // t = 12 tick
+        sampler.observe(0.8);
+        Thread.sleep(sampleInterval + tick); // t = 23 tick
+        sampler.observe(0.4);
+        Thread.sleep(sampleInterval + tick); // t = 34 tick
+        sampler.observe(0.6);
+        Thread.sleep(sampleInterval + tick); // t = 45 tick
+        sampler.observe(0.2); // not observed, we got 4 Exemplars already and non reached min age
+        assertExemplars(sampler, 0.3, 0.8, 0.4, 0.6);
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testEmptyBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(Double.POSITIVE_INFINITY));
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.8); // observed in the +Inf bucket
+        Thread.sleep(sampleInterval + tick); // t = 12 tick
+        sampler.observe(0.5); // not observed, because +Inf is the only bucket
+        assertExemplars(sampler, 0.8);
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testDefaultExemplarsBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig(0.2, 0.4, 0.6, 0.8, 1.0, Double.POSITIVE_INFINITY));
+        Scheduler.awaitInitialization();
+        Thread.sleep(tick); // t = 1 tick
+        sampler.observe(0.3);
+        sampler.observe(0.5); // not observed, previous observation is less than sample interval ms ago
+        assertExemplars(sampler, 0.3);
+        Thread.sleep(sampleInterval + tick); // t = 12 ticks
+        sampler.observe(0.5); // observed
+        assertExemplars(sampler, 0.3, 0.5);
+        Thread.sleep(sampleInterval + tick); // t = 23 ticks
+        sampler.observe(0.4); // not observed, because 0.3 hasn't reached min age yet
+        assertExemplars(sampler, 0.3, 0.5);
+        Thread.sleep(sampleInterval + tick); // t = 34 ticks
+        sampler.observe(1.1); // observed
+        assertExemplars(sampler, 0.3, 0.5, 1.1);
+        Thread.sleep(20 * tick); // t = 54 ticks
+        assertExemplars(sampler, 0.3, 0.5, 1.1);
+        sampler.observe(0.4); // observed
+        assertExemplars(sampler, 0.4, 0.5, 1.1);
+        Thread.sleep(159 * tick); // t = 213 ticks
+        assertExemplars(sampler, 0.4, 1.1); // 0.5 evicted because it has reached max age
+        print(sampler.collect());
+    }
+
+    @Test
+    public void testCustomExemplarsNoBuckets() throws Exception {
+        // TODO
+    }
+
+    @Test
+    public void testDefaultExemplarsNoBuckets() throws Exception {
+        SpanContext context = new SpanContext();
+        SpanContextSupplier.setSpanContext(context);
+        ExemplarSampler sampler = new ExemplarSampler(makeConfig());
+        Scheduler.awaitInitialization();
+        Thread.sleep(tick);           // t = 1 tick
+        sampler.observe(1);    // observed
+        assertExemplars(sampler, 1);
+        sampler.observe(2);    // not observed, previous observation is less than sample interval ms ago
+        Thread.sleep(sampleInterval + tick); // t = 12 ticks
+        sampler.observe(3);    // observed
+        assertExemplars(sampler, 1, 3);
+        Thread.sleep(2 * tick);    // t = 14 ticks
+        sampler.observe(4);    // not observed, previous observation is less than sample interval ms ago
+        Thread.sleep(sampleInterval + tick); // t = 25 ticks
+        sampler.observe(5);    // observed
+        assertExemplars(sampler, 1, 3, 5);
+        Thread.sleep(sampleInterval + tick); // t = 36 ticks
+        sampler.observe(6);    // observed
+        assertExemplars(sampler, 1, 3, 5, 6);
+        Thread.sleep(sampleInterval + tick);  // t = 47 ticks
+        sampler.observe(7);    // not observed, because no Exemplar has reached the minimum age yet
+        Thread.sleep(5 * tick); // t = 52 ticks
+        sampler.observe(2); // not observed. 1 is older than min age, but kept because it's the minimum
+        assertExemplars(sampler, 1, 3, 5, 6);
+        Thread.sleep(sampleInterval + tick); // t = 63 ticks
+        sampler.observe(2); // observed
+        assertExemplars(sampler, 1, 2, 5, 6);
+        Thread.sleep(27 * tick); // t = 90 ticks
+        sampler.observe(7); // observed, replaces 6 because 7 > 6 even though 5 is older
+        assertExemplars(sampler, 1, 2, 5, 7);
+        sampler.observe(8); // not observed, sample interval not done
+        assertExemplars(sampler, 1, 2, 5, 7);
+        Thread.sleep(sampleInterval + tick); // t = 101 ticks
+        sampler.observe(8); // observed
+        assertExemplars(sampler, 1, 2, 8, 7);
+        Thread.sleep(101 * tick); // t = 202 ticks
+        sampler.observe(5); // observed, replaces 1 because 1 reached the max age
+        assertExemplars(sampler, 5, 2, 8, 7);
+        print(sampler.collect());
+    }
+
+    private void assertExemplars(ExemplarSampler sampler, double... values) {
+        Exemplars exemplars = sampler.collect();
+        Assert.assertEquals(values.length, exemplars.size());
+        for (double value : values) {
+            boolean found = false;
+            for (Exemplar exemplar : exemplars) {
+                if (exemplar.getValue() == value) {
+                    found = true;
+                    break;
+                }
+            }
+            Assert.assertTrue(value + " not found", found);
+        }
+    }
+
+    private void print(Exemplars exemplars) {
+        System.out.print("[");
+        boolean farst = true;
+        for (Exemplar exemplar : exemplars) {
+            if (!farst) {
+                System.out.print(",");
+            }
+            farst = false;
+            System.out.print(exemplar.getValue() + "{");
+            boolean first = true;
+            for (Label label : exemplar.getLabels()) {
+                if (!first) {
+                    System.out.print(",");
+                }
+                System.out.print(label.getName() + "=" + label.getValue());
+                first = false;
+            }
+            if (!first) {
+                System.out.print(",");
+            }
+            System.out.print("age=" + (System.currentTimeMillis() - exemplar.getTimestampMillis()));
+            System.out.print("}");
+        }
+        System.out.println("]");
+    }
+}u}(j  (0efa6ee4a3d203aa207aa48ea48c63f7416c9a43j  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj  addedj  M,j  K j  M,j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X71  @@ -0,0 +1,300 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import java.util.Iterator;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.rules.ExpectedException.none;
+
+public class CounterTest {
+
+    Counter noLabels;
+    Counter labels;
+    private static final long exemplarSampleIntervalMillis = 10;
+    private static final long exemplarMinAgeMillis = 100;
+    SpanContext origSpanContext;
+
+    @Rule
+    public final ExpectedException thrown = none();
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        noLabels = Counter.newBuilder().withName("nolabels").build();
+        labels = Counter.newBuilder().withName("labels")
+                .withHelp("help")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("l")
+                .build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(noLabels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(noLabels, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(labels, exemplarSampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(labels, exemplarMinAgeMillis);
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    private CounterSnapshot.CounterDataPointSnapshot getData(Counter counter, String... labels) {
+        return counter.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("counter with labels " + labels + " not found"));
+    }
+
+    private double getValue(Counter counter, String... labels) {
+        return getData(counter, labels).getValue();
+    }
+
+
+    private int getNumberOfLabels(Counter counter) {
+        return ((CounterSnapshot) counter.collect()).getData().size();
+    }
+
+    @Test
+    public void testIncrement() {
+        noLabels.inc();
+        assertEquals(1.0, getValue(noLabels), .001);
+        noLabels.inc(2);
+        assertEquals(3.0, getValue(noLabels), .001);
+        noLabels.withLabelValues().inc(4);
+        assertEquals(7.0, getValue(noLabels), .001);
+        noLabels.withLabelValues().inc();
+        assertEquals(8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testNegativeIncrementFails() {
+        thrown.expect(IllegalArgumentException.class);
+        thrown.expectMessage("Negative increment -1 is illegal for Counter metrics.");
+        noLabels.inc(-1);
+    }
+
+    @Test
+    public void testEmptyCountersHaveNoLabels() {
+        assertEquals(1, getNumberOfLabels(noLabels));
+        assertEquals(0, getNumberOfLabels(labels));
+    }
+
+    @Test
+    public void testLabels() {
+        assertEquals(0, getNumberOfLabels(labels));
+        labels.withLabelValues("a").inc();
+        assertEquals(1, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        labels.withLabelValues("b").inc(3);
+        assertEquals(2, getNumberOfLabels(labels));
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        assertEquals(3.0, getValue(labels, "l", "b"), .001);
+    }
+
+    @Test
+    public void testTotalStrippedFromName() {
+        Counter counter = Counter.newBuilder()
+                .withName("my_counter_total")
+                .withUnit(Unit.SECONDS)
+                .build();
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+
+        counter = Counter.newBuilder()
+                .withName("my_counter")
+                .build();
+        protobufData = new PrometheusProtobufWriter().convert(counter.collect());
+        assertEquals("name: \"my_counter_total\" type: COUNTER metric { counter { value: 0.0 } }", TextFormat.printer().shortDebugString(protobufData));
+    }
+
+    @Test
+    public void testSnapshotComplete() {
+        long before = System.currentTimeMillis();
+        Counter counter = Counter.newBuilder()
+                .withName("test_seconds_total")
+                .withUnit(Unit.SECONDS)
+                .withHelp("help message")
+                .withConstLabels(Labels.of("const1name", "const1value", "const2name", "const2value"))
+                .withLabelNames("path", "status")
+                .build();
+        counter.withLabelValues("/", "200").inc(2);
+        counter.withLabelValues("/", "500").inc();
+        CounterSnapshot snapshot = (CounterSnapshot) counter.collect();
+        Assert.assertEquals("test_seconds", snapshot.getMetadata().getName());
+        Assert.assertEquals("seconds", snapshot.getMetadata().getUnit().toString());
+        Assert.assertEquals("help message", snapshot.getMetadata().getHelp());
+        Assert.assertEquals(2, snapshot.getData().size());
+        Iterator<CounterSnapshot.CounterDataPointSnapshot> iter = snapshot.getData().iterator();
+        // data is ordered by labels, so 200 comes before 500
+        CounterSnapshot.CounterDataPointSnapshot data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "200"), data.getLabels());
+        Assert.assertEquals(2, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+        // 500
+        data = iter.next();
+        Assert.assertEquals(Labels.of("const1name", "const1value", "const2name", "const2value", "path", "/", "status", "500"), data.getLabels());
+        Assert.assertEquals(1, data.getValue(), 0.0001);
+        Assert.assertTrue(data.getCreatedTimestampMillis() >= before);
+        Assert.assertTrue(data.getCreatedTimestampMillis() <= System.currentTimeMillis());
+    }
+
+    @Test
+    public void testIncWithExemplar() throws Exception {
+        noLabels.incWithExemplar(Labels.of("key", "value"));
+        assertExemplar(noLabels, 1.0, "key", "value");
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(Labels.EMPTY);
+        assertExemplar(noLabels, 1.0);
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        noLabels.incWithExemplar(3, Labels.of("key1", "value1", "key2", "value2"));
+        assertExemplar(noLabels, 3, "key1", "value1", "key2", "value2");
+    }
+
+    private void assertExemplar(Counter counter, double value, String... labels) {
+        Exemplar exemplar = getData(counter).getExemplar();
+        Assert.assertEquals(value, exemplar.getValue(), 0.0001);
+        assertEquals(Labels.of(labels), exemplar.getLabels());
+    }
+
+    @Test
+    public void testExemplarSampler() throws Exception {
+        final Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(2.0)
+                .withTraceId("abc")
+                .withSpanId("123")
+                .build();
+        final Exemplar exemplar2 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("def")
+                .withSpanId("456")
+                .build();
+        final Exemplar exemplar3 = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("123")
+                .withSpanId("abc")
+                .build();
+        final Exemplar customExemplar = Exemplar.newBuilder()
+                .withValue(1.0)
+                .withTraceId("bab")
+                .withSpanId("cdc")
+                .withLabels(Labels.of("test", "test"))
+                .build();
+        SpanContext spanContext = new SpanContext() {
+            private int callNumber = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                switch (callNumber) {
+                    case 1:
+                        return "abc";
+                    case 3:
+                        return "def";
+                    case 4:
+                        return "123";
+                    case 5:
+                        return "bab";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                switch (callNumber) {
+                    case 1:
+                        return "123";
+                    case 3:
+                        return "456";
+                    case 4:
+                        return "abc";
+                    case 5:
+                        return "cdc";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callNumber++;
+                if (callNumber == 2) {
+                    return false;
+                }
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Counter counter = Counter.newBuilder()
+                .withName("count_total")
+                .build();
+
+        SpanContextSupplier.setSpanContext(spanContext);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(counter, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(counter, exemplarSampleIntervalMillis);
+
+        counter.inc(2.0);
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
+        assertExemplarEquals(exemplar1, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar2, getData(counter).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        counter.inc(1.0); // sampled
+        assertExemplarEquals(exemplar3, getData(counter).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        counter.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
+        assertExemplarEquals(customExemplar, getData(counter).getExemplar());
+    }
+
+    @Test
+    public void testExemplarSamplerDisabled() {
+        Counter counter = Counter.newBuilder()
+                //.withExemplarSampler((inc, prev) -> {throw new RuntimeException("unexpected call to exemplar sampler");})
+                .withName("count_total")
+                .withoutExemplars()
+                .build();
+        counter.incWithExemplar(3.0, Labels.of("a", "b"));
+        Assert.assertNull(getData(counter).getExemplar());
+        counter.inc(2.0);
+        Assert.assertNull(getData(counter).getExemplar());
+    }
+}u}(j  (4c437281ec73d4eac29e975d8eb7535918ff37d0j  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,222 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.datapoints.Timer;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+
+public class GaugeTest {
+
+    private static final long exemplarSampleIntervalMillis = 10;
+    private static final long exemplarMinAgeMillis = 100;
+
+    private Gauge noLabels, labels;
+
+    private SpanContext origSpanContext;
+
+    @Before
+    public void setUp() {
+        noLabels = Gauge.newBuilder().withName("nolabels").build();
+        labels = Gauge.newBuilder().withName("labels").withLabelNames("l").build();
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    private GaugeSnapshot.GaugeDataPointSnapshot getData(Gauge gauge, String... labels) {
+        return ((GaugeSnapshot) gauge.collect()).getData().stream()
+                .filter(data -> data.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(RuntimeException::new);
+    }
+
+    private double getValue(Gauge gauge, String... labels) {
+        return getData(gauge, labels).getValue();
+    }
+
+    @Test
+    public void testIncrement() {
+        noLabels.inc();
+        assertEquals(1.0, getValue(noLabels), .001);
+        noLabels.inc(2);
+        assertEquals(3.0, getValue(noLabels), .001);
+        noLabels.inc(4);
+        assertEquals(7.0, getValue(noLabels), .001);
+        noLabels.inc();
+        assertEquals(8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testDecrement() {
+        noLabels.dec();
+        assertEquals(-1.0, getValue(noLabels), .001);
+        noLabels.dec(2);
+        assertEquals(-3.0, getValue(noLabels), .001);
+        noLabels.dec(4);
+        assertEquals(-7.0, getValue(noLabels), .001);
+        noLabels.dec();
+        assertEquals(-8.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testSet() {
+        noLabels.set(42);
+        assertEquals(42, getValue(noLabels), .001);
+        noLabels.set(7);
+        assertEquals(7.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testTimer() throws InterruptedException {
+        try (Timer timer = noLabels.startTimer()) {
+            Thread.sleep(12);
+        }
+        assertEquals(0.012, getValue(noLabels), 0.005); // 5ms delta should be enough so this isn't flaky
+    }
+
+    @Test
+    public void noLabelsDefaultZeroValue() {
+        assertEquals(0.0, getValue(noLabels), .001);
+    }
+
+    @Test
+    public void testLabels() {
+        labels.withLabelValues("a").inc();
+        labels.withLabelValues("b").inc(3);
+        assertEquals(1.0, getValue(labels, "l", "a"), .001);
+        assertEquals(3.0, getValue(labels, "l", "b"), .001);
+    }
+
+    @Test
+    public void testExemplarSampler() throws Exception {
+        final Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(2.0)
+                .withTraceId("abc")
+                .withSpanId("123")
+                .build();
+        final Exemplar exemplar2 = Exemplar.newBuilder()
+                .withValue(6.5)
+                .withTraceId("def")
+                .withSpanId("456")
+                .build();
+        final Exemplar exemplar3 = Exemplar.newBuilder()
+                .withValue(7.0)
+                .withTraceId("123")
+                .withSpanId("abc")
+                .build();
+        final Exemplar customExemplar = Exemplar.newBuilder()
+                .withValue(8.0)
+                .withTraceId("bab")
+                .withSpanId("cdc")
+                .withLabels(Labels.of("test", "test"))
+                .build();
+        SpanContext spanContext = new SpanContext() {
+            private int callNumber = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                switch (callNumber) {
+                    case 1:
+                        return "abc";
+                    case 3:
+                        return "def";
+                    case 4:
+                        return "123";
+                    case 5:
+                        return "bab";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                switch (callNumber) {
+                    case 1:
+                        return "123";
+                    case 3:
+                        return "456";
+                    case 4:
+                        return "abc";
+                    case 5:
+                        return "cdc";
+                    default:
+                        throw new RuntimeException("unexpected call");
+                }
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callNumber++;
+                if (callNumber == 2) {
+                    return false;
+                }
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Gauge gauge = Gauge.newBuilder()
+                .withName("my_gauge")
+                .build();
+
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(gauge, exemplarMinAgeMillis);
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(gauge, exemplarSampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        gauge.inc(2.0);
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.inc(3.0); // min age not reached -> keep the previous exemplar, exemplar sampler not called
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        gauge.inc(2.0); // 2nd call: isSampled() returns false -> not sampled
+        assertExemplarEquals(exemplar1, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.dec(0.5); // sampled
+        assertExemplarEquals(exemplar2, getData(gauge).getExemplar());
+
+        Thread.sleep(exemplarMinAgeMillis + 2 * exemplarSampleIntervalMillis);
+
+        gauge.set(7.0); // sampled
+        assertExemplarEquals(exemplar3, getData(gauge).getExemplar());
+
+        Thread.sleep(2 * exemplarSampleIntervalMillis);
+
+        gauge.incWithExemplar(Labels.of("test", "test")); // custom exemplar sampled even though the automatic exemplar hasn't reached min age yet
+        assertExemplarEquals(customExemplar, getData(gauge).getExemplar());
+    }
+
+    @Test
+    public void testExemplarSamplerDisabled() {
+        Gauge gauge = Gauge.newBuilder()
+                .withName("test")
+                .withoutExemplars()
+                .build();
+        gauge.setWithExemplar(3.0, Labels.of("a", "b"));
+        Assert.assertNull(getData(gauge).getExemplar());
+        gauge.inc(2.0);
+        Assert.assertNull(getData(gauge).getExemplar());
+    }
+}u}(j  (393e2c876c0c08a41b6c11231a31214ecc6b981bj  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XR @@ -0,0 +1,1306 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.initializer.SpanContextSupplier;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.Collectors;
+
+import static io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+public class HistogramTest {
+
+    private static final double RESET_DURATION_REACHED = -123.456; // just a random value indicating that we should simulate that the reset duration has been reached
+
+    private SpanContext origSpanContext;
+
+    @Before
+    public void setUp() {
+        origSpanContext = SpanContextSupplier.getSpanContext();
+    }
+
+    @After
+    public void tearDown() {
+        SpanContextSupplier.setSpanContext(origSpanContext);
+    }
+
+    /**
+     * Mimic the tests in client_golang.
+     */
+    private static class GolangTestCase {
+        final String name;
+        final String expected;
+        final Histogram histogram;
+        final double[] observations;
+
+        private GolangTestCase(String name, String expected, Histogram histogram, double... observations) {
+            this.name = name;
+            this.expected = expected;
+            this.histogram = histogram;
+            this.observations = observations;
+        }
+
+        private void run() throws NoSuchFieldException, IllegalAccessException {
+            System.out.println("Running " + name + "...");
+            for (double observation : observations) {
+                if (observation == RESET_DURATION_REACHED) {
+                    Field resetAllowed = Histogram.DataPoint.class.getDeclaredField("resetDurationExpired");
+                    resetAllowed.setAccessible(true);
+                    resetAllowed.set(histogram.getNoLabels(), true);
+                } else {
+                    histogram.observe(observation);
+                }
+            }
+            Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(histogram.collect());
+            String expectedWithMetadata = "name: \"test\" type: HISTOGRAM metric { histogram { " + expected + " } }";
+            assertEquals("test \"" + name + "\" failed", expectedWithMetadata, TextFormat.printer().shortDebugString(protobufData));
+        }
+    }
+
+    /**
+     * Test cases copied from histogram_test.go in client_golang.
+     */
+    @Test
+    public void testGolangTests() throws NoSuchFieldException, IllegalAccessException {
+        GolangTestCase[] testCases = new GolangTestCase[]{
+                new GolangTestCase("'no sparse buckets' from client_golang",
+                        "sample_count: 3 " +
+                                "sample_sum: 6.0 " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.005 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.01 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.025 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.05 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.1 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.25 } " +
+                                "bucket { cumulative_count: 0 upper_bound: 0.5 } " +
+                                "bucket { cumulative_count: 1 upper_bound: 1.0 } " +
+                                "bucket { cumulative_count: 2 upper_bound: 2.5 } " +
+                                "bucket { cumulative_count: 3 upper_bound: 5.0 } " +
+                                "bucket { cumulative_count: 3 upper_bound: 10.0 } " +
+                                "bucket { cumulative_count: 3 upper_bound: Infinity }",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .classicOnly()
+                                .build(),
+                        1.0, 2.0, 3.0),
+                new GolangTestCase("'factor 1.1 results in schema 3' from client_golang",
+                        "sample_count: 4 " +
+                                "sample_sum: 6.0 " +
+                                "schema: 3 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 1 } " +
+                                "positive_span { offset: 7 length: 1 } " +
+                                "positive_span { offset: 4 length: 1 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(3)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0, 1.0, 2.0, 3.0),
+                new GolangTestCase("'factor 1.2 results in schema 2' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: 7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2),
+                new GolangTestCase("'factor 4 results in schema -1' from client_golang",
+                        "sample_count: 14 " +
+                                "sample_sum: 63.2581251 " +
+                                "schema: -1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: -2 length: 6 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: -2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(-1)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0156251, 0.0625, // Bucket -2: (0.015625, 0.0625)
+                        0.1, 0.25, // Bucket -1: (0.0625, 0.25]
+                        0.5, 1, // Bucket 0: (0.25, 1]
+                        1.5, 2, 3, 3.5, // Bucket 1: (1, 4]
+                        5, 6, 7, // Bucket 2: (4, 16]
+                        33.33 // Bucket 3: (16, 64]
+                ),
+                new GolangTestCase("'factor 17 results in schema -2' from client_golang",
+                        "sample_count: 14 " +
+                                "sample_sum: 63.2581251 " +
+                                "schema: -2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: -1 length: 4 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: 3 " +
+                                "positive_delta: -6",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(-2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0156251, 0.0625, // Bucket -1: (0.015625, 0.0625]
+                        0.1, 0.25, 0.5, 1, // Bucket 0: (0.0625, 1]
+                        1.5, 2, 3, 3.5, 5, 6, 7, // Bucket 1: (1, 16]
+                        33.33 // Bucket 2: (16, 256]
+                ),
+                new GolangTestCase("'negative buckets' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: -7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2
+                ),
+                new GolangTestCase("'negative and positive buckets' from client_golang",
+                        "sample_count: 11 " +
+                                "sample_sum: 0.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2, 1, 1.2, 1.4, 1.8, 2
+                ),
+                new GolangTestCase("'wide zero bucket' from client_golang",
+                        "sample_count: 11 " +
+                                "sample_sum: 0.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.4 " +
+                                "zero_count: 7 " +
+                                "negative_span { offset: 4 length: 1 } " +
+                                "negative_delta: 2 " +
+                                "positive_span { offset: 4 length: 1 } " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMinZeroThreshold(1.4)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2, 1, 1.2, 1.4, 1.8, 2
+                ),
+                /*
+                // See https://github.com/prometheus/client_golang/issues/1275
+                new TestCase("'NaN observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: NaN " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .asNativeHistogram()
+                                .withNativeSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.NaN
+                ),
+                */
+                new GolangTestCase("'+Inf observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: Infinity " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_span { offset: 4092 length: 1 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.POSITIVE_INFINITY
+                ),
+                new GolangTestCase("'-Inf observation' from client_golang",
+                        "sample_count: 7 " +
+                                "sample_sum: -Infinity " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 4097 length: 1 } " +
+                                "negative_delta: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2, Double.NEGATIVE_INFINITY
+                ),
+                new GolangTestCase("'limited buckets but nothing triggered' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: 7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.2, 1.4, 1.8, 2
+                ),
+                new GolangTestCase("'buckets limited by halving resolution' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: 11.5 " +
+                                "schema: 1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: 0 length: 5 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -1 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3
+                ),
+                new GolangTestCase("'buckets limited by widening the zero bucket' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: 11.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.0 " +
+                                "zero_count: 2 " +
+                                "positive_span { offset: 1 length: 7 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 1 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3
+                ),
+                new GolangTestCase("'buckets limited by widening the zero bucket twice' from client_golang",
+                        "sample_count: 9 " +
+                                "sample_sum: 15.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.189207115002721 " +
+                                "zero_count: 3 " +
+                                "positive_span { offset: 2 length: 7 } " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 2 " +
+                                "positive_delta: -2 " +
+                                "positive_delta: 0 " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 3, 4),
+                new GolangTestCase("'buckets limited by reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMinZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, RESET_DURATION_REACHED, 3, 4),
+                new GolangTestCase("'limited buckets but nothing triggered, negative observations' from client_golang",
+                        "sample_count: 6 " +
+                                "sample_sum: -7.4 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.2, -1.4, -1.8, -2),
+                new GolangTestCase("'buckets limited by halving resolution, negative observations' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: -11.5 " +
+                                "schema: 1 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "negative_span { offset: 0 length: 5 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -1 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3),
+                new GolangTestCase("'buckets limited by widening the zero bucket, negative observations' from client_golang",
+                        "sample_count: 8 " +
+                                "sample_sum: -11.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.0 " +
+                                "zero_count: 2 " +
+                                "negative_span { offset: 1 length: 7 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 1 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 0 " +
+                                "negative_delta: 1",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3),
+                new GolangTestCase("'buckets limited by widening the zero bucket twice, negative observations' from client_golang",
+                        "sample_count: 9 " +
+                                "sample_sum: -15.5 " +
+                                "schema: 2 " +
+                                "zero_threshold: 1.189207115002721 " +
+                                "zero_count: 3 " +
+                                "negative_span { offset: 2 length: 7 } " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 2 " +
+                                "negative_delta: -2 " +
+                                "negative_delta: 0 " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, -3, -4),
+                new GolangTestCase("'buckets limited by reset, negative observations' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: -7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 2.9387358770557188E-39 " +
+                                "zero_count: 0 " +
+                                "negative_span { offset: 7 length: 2 } " +
+                                "negative_delta: 1 " +
+                                "negative_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, -1, -1.1, -1.2, -1.4, -1.8, -2, RESET_DURATION_REACHED, -3, -4),
+                new GolangTestCase("'buckets limited by halving resolution, then reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(0)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 5, 5.1, RESET_DURATION_REACHED, 3, 4),
+                new GolangTestCase("'buckets limited by widening the zero bucket, then reset' from client_golang",
+                        "sample_count: 2 " +
+                                "sample_sum: 7.0 " +
+                                "schema: 2 " +
+                                "zero_threshold: 2.9387358770557188E-39 " +
+                                "zero_count: 0 " +
+                                "positive_span { offset: 7 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(2)
+                                .withNativeMaxZeroThreshold(1.2)
+                                .withNativeMaxNumberOfBuckets(4)
+                                .build(),
+                        0, 1, 1.1, 1.2, 1.4, 1.8, 2, 5, 5.1, RESET_DURATION_REACHED, 3, 4)
+        };
+        for (GolangTestCase testCase : testCases) {
+            testCase.run();
+        }
+    }
+
+    /**
+     * Additional tests that are not part of client_golang's test suite.
+     */
+    @Test
+    public void testAdditional() throws NoSuchFieldException, IllegalAccessException {
+        GolangTestCase[] testCases = new GolangTestCase[]{
+                new GolangTestCase("observed values are exactly at bucket boundaries",
+                        "sample_count: 3 " +
+                                "sample_sum: 1.5 " +
+                                "schema: 0 " +
+                                "zero_threshold: 0.0 " +
+                                "zero_count: 1 " +
+                                "positive_span { offset: -1 length: 2 } " +
+                                "positive_delta: 1 " +
+                                "positive_delta: 0",
+                        Histogram.newBuilder()
+                                .withName("test")
+                                .nativeOnly()
+                                .withNativeInitialSchema(0)
+                                .withNativeMaxZeroThreshold(0)
+                                .build(),
+                        0.0, 0.5, 1.0)
+        };
+        for (GolangTestCase testCase : testCases) {
+            testCase.run();
+        }
+    }
+
+    /**
+     * Tests HistogramData.nativeBucketIndexToUpperBound(int, int).
+     * <p>
+     * This test is ported from client_golang's TestGetLe().
+     */
+    @Test
+    public void testNativeBucketIndexToUpperBound() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
+        int[] indexes = new int[]{-1, 0, 1, 512, 513, -1, 0, 1, 1024, 1025, -1, 0, 1, 4096, 4097};
+        int[] schemas = new int[]{-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2};
+        double[] expectedUpperBounds = new double[]{0.25, 1, 4, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
+                0.5, 1, 2, Double.MAX_VALUE, Double.POSITIVE_INFINITY,
+                0.8408964152537144, 1, 1.189207115002721, Double.MAX_VALUE, Double.POSITIVE_INFINITY};
+        Method method = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        method.setAccessible(true);
+        for (int i = 0; i < indexes.length; i++) {
+            Histogram histogram = Histogram.newBuilder()
+                    .withName("test")
+                    .withNativeInitialSchema(schemas[i])
+                    .build();
+            Histogram.DataPoint histogramData = histogram.newDataPoint();
+            double result = (double) method.invoke(histogramData, schemas[i], indexes[i]);
+            Assert.assertEquals("index=" + indexes[i] + ", schema=" + schemas[i], expectedUpperBounds[i], result, 0.0000000000001);
+        }
+    }
+
+    /**
+     * Test if lowerBound < value <= upperBound is true for the bucket index returned by findBucketIndex()
+     */
+    @Test
+    public void testFindBucketIndex() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
+        Random rand = new Random();
+        Method findBucketIndex = Histogram.DataPoint.class.getDeclaredMethod("findBucketIndex", double.class);
+        Method nativeBucketIndexToUpperBound = Histogram.DataPoint.class.getDeclaredMethod("nativeBucketIndexToUpperBound", int.class, int.class);
+        findBucketIndex.setAccessible(true);
+        nativeBucketIndexToUpperBound.setAccessible(true);
+        for (int schema = -4; schema <= 8; schema++) {
+            Histogram histogram = Histogram.newBuilder()
+                    .nativeOnly()
+                    .withName("test")
+                    .withNativeInitialSchema(schema)
+                    .build();
+            for (int i = 0; i < 10_000; i++) {
+                for (int zeros = -5; zeros <= 10; zeros++) {
+                    double value = rand.nextDouble() * Math.pow(10, zeros);
+                    int bucketIndex = (int) findBucketIndex.invoke(histogram.getNoLabels(), value);
+                    double lowerBound = (double) nativeBucketIndexToUpperBound.invoke(histogram.getNoLabels(), schema, bucketIndex - 1);
+                    double upperBound = (double) nativeBucketIndexToUpperBound.invoke(histogram.getNoLabels(), schema, bucketIndex);
+                    Assert.assertTrue("Bucket index " + bucketIndex + " with schema " + schema + " has range [" + lowerBound + ", " + upperBound + "]. Value " + value + " is outside of that range.", lowerBound < value && upperBound >= value);
+                }
+            }
+        }
+    }
+
+    @Test
+    public void testDefaults() throws IOException {
+        Histogram histogram = Histogram.newBuilder().withName("test").build();
+        histogram.observe(0.5);
+        HistogramSnapshot snapshot = histogram.collect();
+        String expectedNative = "" +
+                "name: \"test\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                "histogram { " +
+                "sample_count: 1 " +
+                "sample_sum: 0.5 " +
+                // default native schema is 5
+                "schema: 5 " +
+                // default zero threshold is 2^-128
+                "zero_threshold: " + Math.pow(2.0, -128.0) + " " +
+                "zero_count: 0 " +
+                "positive_span { offset: -32 length: 1 } " +
+                "positive_delta: 1 " +
+                "} }";
+        String expectedClassic = "" +
+                // default classic buckets
+                "# TYPE test histogram\n" +
+                "test_bucket{le=\"0.005\"} 0\n" +
+                "test_bucket{le=\"0.01\"} 0\n" +
+                "test_bucket{le=\"0.025\"} 0\n" +
+                "test_bucket{le=\"0.05\"} 0\n" +
+                "test_bucket{le=\"0.1\"} 0\n" +
+                "test_bucket{le=\"0.25\"} 0\n" +
+                "test_bucket{le=\"0.5\"} 1\n" +
+                "test_bucket{le=\"1.0\"} 1\n" +
+                "test_bucket{le=\"2.5\"} 1\n" +
+                "test_bucket{le=\"5.0\"} 1\n" +
+                "test_bucket{le=\"10.0\"} 1\n" +
+                "test_bucket{le=\"+Inf\"} 1\n" +
+                "test_count 1\n" +
+                "test_sum 0.5\n" +
+                "# EOF\n";
+
+        // protobuf
+        Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(snapshot);
+        Assert.assertEquals(expectedNative, TextFormat.printer().shortDebugString(protobufData));
+
+        // text
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expectedClassic, out.toString());
+    }
+
+    @Test
+    public void testExemplarsClassicHistogram() throws Exception {
+        SpanContext spanContext = new SpanContext() {
+            int callCount = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                return "traceId-" + callCount;
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                return "spanId-" + callCount;
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callCount++;
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                // The default number of Exemplars is 4.
+                // Use 5 buckets to verify that the exemplar sample is configured with the buckets.
+                .withClassicBuckets(1.0, 2.0, 3.0, 4.0, Double.POSITIVE_INFINITY)
+                .withLabelNames("path")
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        Exemplar ex1a = Exemplar.newBuilder()
+                .withValue(0.5)
+                .withSpanId("spanId-1")
+                .withTraceId("traceId-1")
+                .build();
+        Exemplar ex1b = Exemplar.newBuilder()
+                .withValue(0.5)
+                .withSpanId("spanId-2")
+                .withTraceId("traceId-2")
+                .build();
+        Exemplar ex2a = Exemplar.newBuilder()
+                .withValue(4.5)
+                .withSpanId("spanId-3")
+                .withTraceId("traceId-3")
+                .build();
+        Exemplar ex2b = Exemplar.newBuilder()
+                .withValue(4.5)
+                .withSpanId("spanId-4")
+                .withTraceId("traceId-4")
+                .build();
+        Exemplar ex3a = Exemplar.newBuilder()
+                .withValue(1.5)
+                .withSpanId("spanId-5")
+                .withTraceId("traceId-5")
+                .build();
+        Exemplar ex3b = Exemplar.newBuilder()
+                .withValue(1.5)
+                .withSpanId("spanId-6")
+                .withTraceId("traceId-6")
+                .build();
+        Exemplar ex4a = Exemplar.newBuilder()
+                .withValue(2.5)
+                .withSpanId("spanId-7")
+                .withTraceId("traceId-7")
+                .build();
+        Exemplar ex4b = Exemplar.newBuilder()
+                .withValue(2.5)
+                .withSpanId("spanId-8")
+                .withTraceId("traceId-8")
+                .build();
+        Exemplar ex5a = Exemplar.newBuilder()
+                .withValue(3.5)
+                .withSpanId("spanId-9")
+                .withTraceId("traceId-9")
+                .build();
+        Exemplar ex5b = Exemplar.newBuilder()
+                .withValue(3.5)
+                .withSpanId("spanId-10")
+                .withTraceId("traceId-10")
+                .build();
+        histogram.withLabelValues("/hello").observe(0.5);
+        histogram.withLabelValues("/world").observe(0.5); // different labels are tracked independently, i.e. we don't need to wait for sampleIntervalMillis
+
+        HistogramSnapshot snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertNull(getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(4.5);
+        histogram.withLabelValues("/world").observe(4.5);
+
+        snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 2.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 3.0, "path", "/world"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertNull(getExemplar(snapshot, 4.0, "path", "/world"));
+        assertExemplarEquals(ex2a, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertExemplarEquals(ex2b, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(1.5);
+        histogram.withLabelValues("/world").observe(1.5);
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(2.5);
+        histogram.withLabelValues("/world").observe(2.5);
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observe(3.5);
+        histogram.withLabelValues("/world").observe(3.5);
+
+        snapshot = histogram.collect();
+        assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
+        assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));
+        assertExemplarEquals(ex3a, getExemplar(snapshot, 2.0, "path", "/hello"));
+        assertExemplarEquals(ex3b, getExemplar(snapshot, 2.0, "path", "/world"));
+        assertExemplarEquals(ex4a, getExemplar(snapshot, 3.0, "path", "/hello"));
+        assertExemplarEquals(ex4b, getExemplar(snapshot, 3.0, "path", "/world"));
+        assertExemplarEquals(ex5a, getExemplar(snapshot, 4.0, "path", "/hello"));
+        assertExemplarEquals(ex5b, getExemplar(snapshot, 4.0, "path", "/world"));
+        assertExemplarEquals(ex2a, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/hello"));
+        assertExemplarEquals(ex2b, getExemplar(snapshot, Double.POSITIVE_INFINITY, "path", "/world"));
+
+        Exemplar custom = Exemplar.newBuilder()
+                .withValue(3.4)
+                .withLabels(Labels.of("key2", "value2", "key1", "value1", "trace_id", "traceId-11", "span_id", "spanId-11"))
+                .build();
+        Thread.sleep(sampleIntervalMillis + 1);
+        histogram.withLabelValues("/hello").observeWithExemplar(3.4, Labels.of("key1", "value1", "key2", "value2"));
+        snapshot = histogram.collect();
+        // custom exemplars have preference, so the automatic exemplar is replaced
+        assertExemplarEquals(custom, getExemplar(snapshot, 4.0, "path", "/hello"));
+    }
+
+    private Exemplar getExemplar(HistogramSnapshot snapshot, double le, String... labels) {
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findFirst()
+                .orElseThrow(() -> new RuntimeException("Labels not found"));
+        double lowerBound = Double.NEGATIVE_INFINITY;
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            if (bucket.getUpperBound() == le) {
+                break;
+            } else {
+                lowerBound = bucket.getUpperBound();
+            }
+        }
+        return data.getExemplars().get(lowerBound, le);
+    }
+
+    @Test
+    public void testCustomExemplarsClassicHistogram() throws InterruptedException, NoSuchFieldException, IllegalAccessException {
+
+        // TODO: This was copied from the old simpleclient, can probably be refactored.
+
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withExemplars()
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        ExemplarSamplerConfigTestUtil.setMinRetentionPeriodMillis(histogram, 3 * sampleIntervalMillis);
+
+        Labels labels = Labels.of("mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        histogram.observeWithExemplar(0.5, Labels.of("key", "value"));
+        assertExemplar(histogram, 0.5, "key", "value");
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.5, Labels.EMPTY);
+        assertExemplar(histogram, 0.5);
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.5, labels);
+        assertExemplar(histogram, 0.5, "mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        // default buckets are {.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(2.0, Labels.of("key1", "value1", "key2", "value2"));
+        assertExemplar(histogram, 2.0, "key1", "value1", "key2", "value2");
+        assertExemplar(histogram, 0.5, "mapKey1", "mapValue1", "mapKey2", "mapValue2");
+
+        Thread.sleep(sampleIntervalMillis * 3 + 1);
+        histogram.observeWithExemplar(0.4, Labels.EMPTY); // same bucket as 0.5
+        assertExemplar(histogram, 0.4);
+        assertExemplar(histogram, 2.0, "key1", "value1", "key2", "value2");
+    }
+
+    private void assertExemplar(Histogram histogram, double value, String... labels) {
+        double lowerBound = Double.NEGATIVE_INFINITY;
+        double upperBound = Double.POSITIVE_INFINITY;
+        HistogramSnapshot snapshot = histogram.collect();
+        HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream()
+                .filter(d -> d.getLabels().isEmpty())
+                .findFirst()
+                .orElseThrow(() -> new RuntimeException("No data without labels found"));
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            if (bucket.getUpperBound() >= value) {
+                upperBound = bucket.getUpperBound();
+                break;
+            } else {
+                lowerBound = bucket.getUpperBound();
+            }
+        }
+        Exemplar exemplar = data.getExemplars().get(lowerBound, upperBound);
+        Assert.assertNotNull("No exemplar found in bucket [" + lowerBound + ", " + upperBound + "]", exemplar);
+        Assert.assertEquals(value, exemplar.getValue(), 0.0);
+        Assert.assertEquals("" + exemplar.getLabels(), labels.length / 2, exemplar.getLabels().size());
+        for (int i = 0; i < labels.length; i += 2) {
+            Assert.assertEquals(labels[i], exemplar.getLabels().getName(i / 2));
+            Assert.assertEquals(labels[i + 1], exemplar.getLabels().getValue(i / 2));
+        }
+    }
+
+
+    @Test
+    public void testExemplarsNativeHistogram() throws NoSuchFieldException, IllegalAccessException {
+
+        SpanContext spanContext = new SpanContext() {
+            int callCount = 0;
+
+            @Override
+            public String getCurrentTraceId() {
+                return "traceId-" + callCount;
+            }
+
+            @Override
+            public String getCurrentSpanId() {
+                return "spanId-" + callCount;
+            }
+
+            @Override
+            public boolean isCurrentSpanSampled() {
+                callCount++;
+                return true;
+            }
+
+            @Override
+            public void markCurrentSpanAsExemplar() {
+            }
+        };
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .nativeOnly()
+                .withLabelNames("path")
+                .build();
+
+        long sampleIntervalMillis = 10;
+        ExemplarSamplerConfigTestUtil.setSampleIntervalMillis(histogram, sampleIntervalMillis);
+        SpanContextSupplier.setSpanContext(spanContext);
+
+        Exemplar ex1 = Exemplar.newBuilder()
+                .withValue(3.11)
+                .withSpanId("spanId-1")
+                .withTraceId("traceId-1")
+                .build();
+        Exemplar ex2 = Exemplar.newBuilder()
+                .withValue(3.12)
+                .withSpanId("spanId-2")
+                .withTraceId("traceId-2")
+                .build();
+        Exemplar ex3 = Exemplar.newBuilder()
+                .withValue(3.13)
+                .withSpanId("spanId-3")
+                .withTraceId("traceId-3")
+                .withLabels(Labels.of("key1", "value1", "key2", "value2"))
+                .build();
+
+        histogram.withLabelValues("/hello").observe(3.11);
+        histogram.withLabelValues("/world").observe(3.12);
+        assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
+        assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
+        assertEquals(1, getData(histogram, "path", "/world").getExemplars().size());
+        assertExemplarEquals(ex2, getData(histogram, "path", "/world").getExemplars().iterator().next());
+
+        histogram.withLabelValues("/world").observeWithExemplar(3.13, Labels.of("key1", "value1", "key2", "value2"));
+        assertEquals(1, getData(histogram, "path", "/hello").getExemplars().size());
+        assertExemplarEquals(ex1, getData(histogram, "path", "/hello").getExemplars().iterator().next());
+        assertEquals(2, getData(histogram, "path", "/world").getExemplars().size());
+        Exemplars exemplars = getData(histogram, "path", "/world").getExemplars();
+        List<Exemplar> exemplarList = new ArrayList<>(exemplars.size());
+        for (Exemplar exemplar : exemplars) {
+            exemplarList.add(exemplar);
+        }
+        exemplarList.sort(Comparator.comparingDouble(Exemplar::getValue));
+        assertEquals(2, exemplars.size());
+        assertExemplarEquals(ex2, exemplarList.get(0));
+        assertExemplarEquals(ex3, exemplarList.get(1));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelName() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("label", "le");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNameConstLabels() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withConstLabels(Labels.of("label1", "value1", "le", "0.3"));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNamePrefix() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("__hello");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelNameDot() {
+        // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid.
+        // The reason is that you cannot use illegal label names in the Prometheus query language.
+        Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("http.status");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalName() {
+        Histogram.newBuilder()
+                .withName("server.durations");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNoName() {
+        Histogram.newBuilder().build();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void testNullName() {
+        Histogram.newBuilder()
+                .withName(null);
+    }
+
+    @Test
+    public void testDuplicateClassicBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0, 3, 17, 3, 21)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.0, 3.0, 17.0, 21.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testUnsortedBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.2, 0.1)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.1, 0.2, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testEmptyBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets()
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Collections.singletonList(Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testBucketsIncludePositiveInfinity() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.01, 0.1, 1.0, Double.POSITIVE_INFINITY)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.01, 0.1, 1.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testLinearBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withClassicLinearBuckets(0.1, 0.1, 10)
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test
+    public void testExponentialBuckets() {
+        Histogram histogram = Histogram.newBuilder()
+                .withClassicExponentialBuckets(2, 2.5, 3)
+                .withName("test")
+                .build();
+        List<Double> upperBounds = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getUpperBound)
+                .collect(Collectors.toList());
+        assertEquals(Arrays.asList(2.0, 5.0, 12.5, Double.POSITIVE_INFINITY), upperBounds);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testBucketsIncludeNaN() {
+        Histogram.newBuilder()
+                .withName("test")
+                .withClassicBuckets(0.01, 0.1, 1.0, Double.NaN);
+    }
+
+    @Test
+    public void testNoLabelsDefaultZeroValue() {
+        Histogram noLabels = Histogram.newBuilder().withName("test").build();
+        assertEquals(0.0, getBucket(noLabels, 0.005).getCount(), 0.0);
+        assertEquals(0, getData(noLabels).getCount());
+        assertEquals(0.0, getData(noLabels).getSum(), 0.0);
+    }
+
+    private ClassicHistogramBucket getBucket(Histogram histogram, double le, String... labels) {
+        return getData(histogram, labels).getClassicBuckets().stream()
+                .filter(b -> b.getUpperBound() == le)
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("bucket with le=" + le + " not found."));
+    }
+
+    @Test
+    public void testObserve() {
+        Histogram noLabels = Histogram.newBuilder()
+                .withName("test")
+                .build();
+        noLabels.observe(2);
+        assertEquals(1, getData(noLabels).getCount());
+        assertEquals(2.0, getData(noLabels).getSum(), .0);
+        assertEquals(0.0, getBucket(noLabels, 1).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 2.5).getCount(), .0);
+        noLabels.observe(4);
+        assertEquals(2.0, getData(noLabels).getCount(), .0);
+        assertEquals(6.0, getData(noLabels).getSum(), .0);
+        assertEquals(0.0, getBucket(noLabels, 1).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 2.5).getCount(), .0);
+        assertEquals(1.0, getBucket(noLabels, 5).getCount(), .0);
+        assertEquals(0.0, getBucket(noLabels, 10).getCount(), .0);
+        assertEquals(0.0, getBucket(noLabels, Double.POSITIVE_INFINITY).getCount(), .0);
+    }
+
+    @Test
+    // See https://github.com/prometheus/client_java/issues/646
+    public void testNegativeAmount() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("histogram")
+                .withHelp("test histogram for negative values")
+                .withClassicBuckets(-10, -5, 0, 5, 10)
+                .build();
+        double expectedCount = 0;
+        double expectedSum = 0;
+        for (int i = 10; i >= -11; i--) {
+            histogram.observe(i);
+            expectedCount++;
+            expectedSum += i;
+            assertEquals(expectedSum, getData(histogram).getSum(), .001);
+            assertEquals(expectedCount, getData(histogram).getCount(), .001);
+        }
+        List<Long> expectedBucketCounts = Arrays.asList(2L, 5L, 5L, 5L, 5L, 0L); // buckets -10, -5, 0, 5, 10, +Inf
+        List<Long> actualBucketCounts = getData(histogram).getClassicBuckets().stream()
+                .map(ClassicHistogramBucket::getCount)
+                .collect(Collectors.toList());
+        assertEquals(expectedBucketCounts, actualBucketCounts);
+    }
+
+    @Test
+    public void testBoundaryConditions() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .build();
+        histogram.observe(2.5);
+        assertEquals(0, getBucket(histogram, 1).getCount());
+        assertEquals(1, getBucket(histogram, 2.5).getCount());
+
+        histogram.observe(Double.POSITIVE_INFINITY);
+        assertEquals(0, getBucket(histogram, 1).getCount());
+        assertEquals(1, getBucket(histogram, 2.5).getCount());
+        assertEquals(0, getBucket(histogram, 5).getCount());
+        assertEquals(0, getBucket(histogram, 10).getCount());
+        assertEquals(1, getBucket(histogram, Double.POSITIVE_INFINITY).getCount());
+    }
+
+    @Test
+    public void testObserveWithLabels() {
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withConstLabels(Labels.of("env", "prod"))
+                .withLabelNames("path", "status")
+                .build();
+        histogram.withLabelValues("/hello", "200").observe(0.11);
+        histogram.withLabelValues("/hello", "200").observe(0.2);
+        histogram.withLabelValues("/hello", "500").observe(0.19);
+        HistogramSnapshot.HistogramDataPointSnapshot data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        HistogramSnapshot.HistogramDataPointSnapshot data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        assertEquals(2, data200.getCount());
+        assertEquals(0.31, data200.getSum(), 0.0000001);
+        assertEquals(1, data500.getCount());
+        assertEquals(0.19, data500.getSum(), 0.0000001);
+        histogram.withLabelValues("/hello", "200").observe(0.13);
+        data200 = getData(histogram, "env", "prod", "path", "/hello", "status", "200");
+        data500 = getData(histogram, "env", "prod", "path", "/hello", "status", "500");
+        assertEquals(3, data200.getCount());
+        assertEquals(0.44, data200.getSum(), 0.0000001);
+        assertEquals(1, data500.getCount());
+        assertEquals(0.19, data500.getSum(), 0.0000001);
+    }
+
+    @Test
+    public void testObserveMultithreaded() throws InterruptedException, ExecutionException, TimeoutException {
+        // Hard to test concurrency, but let's run a couple of observations in parallel and assert none gets lost.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("test")
+                .withLabelNames("status")
+                .build();
+        int nThreads = 8;
+        DistributionDataPoint obs = histogram.withLabelValues("200");
+        ExecutorService executor = Executors.newFixedThreadPool(nThreads);
+        CompletionService<List<HistogramSnapshot>> completionService = new ExecutorCompletionService<>(executor);
+        CountDownLatch startSignal = new CountDownLatch(nThreads);
+        for (int t = 0; t < nThreads; t++) {
+            completionService.submit(() -> {
+                List<HistogramSnapshot> snapshots = new ArrayList<>();
+                startSignal.countDown();
+                startSignal.await();
+                for (int i = 0; i < 10; i++) {
+                    for (int j = 0; j < 1000; j++) {
+                        obs.observe(1.1);
+                    }
+                    snapshots.add(histogram.collect());
+                }
+                return snapshots;
+            });
+        }
+        long maxCount = 0;
+        for (int i = 0; i < nThreads; i++) {
+            Future<List<HistogramSnapshot>> future = completionService.take();
+            List<HistogramSnapshot> snapshots = future.get(5, TimeUnit.SECONDS);
+            long count = 0;
+            for (HistogramSnapshot snapshot : snapshots) {
+                Assert.assertEquals(1, snapshot.getData().size());
+                HistogramSnapshot.HistogramDataPointSnapshot data = snapshot.getData().stream().findFirst().orElseThrow(RuntimeException::new);
+                Assert.assertTrue(data.getCount() >= (count + 1000)); // 1000 own observations plus the ones from other threads
+                count = data.getCount();
+            }
+            if (count > maxCount) {
+                maxCount = count;
+            }
+        }
+        Assert.assertEquals(nThreads * 10_000, maxCount); // the last collect() has seen all observations
+        Assert.assertEquals(getBucket(histogram, 2.5, "status", "200").getCount(), nThreads * 10_000);
+        executor.shutdown();
+        Assert.assertTrue(executor.awaitTermination(5, TimeUnit.SECONDS));
+    }
+
+
+    private HistogramSnapshot.HistogramDataPointSnapshot getData(Histogram histogram, String... labels) {
+        return histogram.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("histogram with labels " + labels + " not found"));
+    }
+}	     u}(j  (4cca37ef6fcd66eac25335f3a703067cb33fb77cj  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xs  @@ -0,0 +1,23 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class InfoTest {
+
+    @Test
+    public void testIncrement() {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withLabelNames("key")
+                .build();
+        info.infoLabelValues("value");
+        InfoSnapshot snapshot = info.collect();
+        Assert.assertEquals("target", snapshot.getMetadata().getName());
+        Assert.assertEquals(1, snapshot.getData().size());
+        InfoSnapshot.InfoDataPointSnapshot data = snapshot.getData().stream().findAny().orElseThrow(RuntimeException::new);
+        Assert.assertEquals(Labels.of("key", "value"), data.getLabels());
+    }
+}u}(j  (1babd430cd9fc54a09561e9adcfb9db80c452152j  Zprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StateSetTest.javaj  addedj  KKj  K j  KKj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSetTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,75 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class StateSetTest {
+
+    enum MyFeatureFlag {
+        EXPERIMENTAL_FEATURE_1 {
+            @Override
+            public String toString() {
+                return "feature1";
+            }
+        },
+
+        EXPERIMENTAL_FEATURE_2 {
+            @Override
+            public String toString() {
+                return "feature2";
+            }
+        }
+    }
+
+    @Test
+    public void testEnumStateSet() {
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("environment")
+                .withStates(MyFeatureFlag.class)
+                .build();
+        stateSet.withLabelValues("dev").setTrue(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        stateSet.withLabelValues("prod").setFalse(MyFeatureFlag.EXPERIMENTAL_FEATURE_2);
+        StateSetSnapshot snapshot = stateSet.collect();
+        Assert.assertEquals(2, snapshot.getData().size());
+        Assert.assertEquals(2, getData(stateSet, "environment", "dev").size());
+        Assert.assertEquals("feature1", getData(stateSet, "environment", "dev").getName(0));
+        Assert.assertFalse(getData(stateSet, "environment", "dev").isTrue(0));
+        Assert.assertEquals("feature2", getData(stateSet, "environment", "dev").getName(1));
+        Assert.assertTrue(getData(stateSet, "environment", "dev").isTrue(1));
+        Assert.assertEquals(2, getData(stateSet, "environment", "prod").size());
+        Assert.assertEquals("feature1", getData(stateSet, "environment", "prod").getName(0));
+        Assert.assertFalse(getData(stateSet, "environment", "prod").isTrue(0));
+        Assert.assertEquals("feature2", getData(stateSet, "environment", "prod").getName(1));
+        Assert.assertFalse(getData(stateSet, "environment", "prod").isTrue(1));
+    }
+
+    @Test
+    public void testDefaultFalse() {
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("test")
+                .withStates("state1", "state2", "state3")
+                .build();
+        Assert.assertEquals(3, getData(stateSet).size());
+        Assert.assertEquals("state1", getData(stateSet).getName(0));
+        Assert.assertFalse(getData(stateSet).isTrue(0));
+        Assert.assertEquals("state2", getData(stateSet).getName(1));
+        Assert.assertFalse(getData(stateSet).isTrue(1));
+        Assert.assertEquals("state3", getData(stateSet).getName(2));
+        Assert.assertFalse(getData(stateSet).isTrue(2));
+    }
+
+    private StateSetSnapshot.StateSetDataPointSnapshot getData(StateSet stateSet, String... labels) {
+        return stateSet.collect().getData().stream()
+                .filter(d -> d.getLabels().equals(Labels.of(labels)))
+                .findAny()
+                .orElseThrow(() -> new RuntimeException("stateset with labels " + labels + " not found"));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testStatesCannotBeEmpty() {
+        StateSet.newBuilder().withName("invalid").build();
+    }
+}u}(j  (3b947e73e91e7464b7db1ac75c0a90462277241cj  `prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/StatefulMetricTest.javaj  addedj  K$j  K j  K$j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetricTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,36 @@
+package io.prometheus.metrics.core.metrics;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.lang.reflect.Field;
+import java.util.Map;
+
+public class StatefulMetricTest {
+
+    @Test
+    public void testLabelRemoveWhileCollecting() throws Exception {
+        Counter counter = Counter.newBuilder().withName("test").withLabelNames("label1", "label2").build();
+        Field data = counter.getClass().getSuperclass().getDeclaredField("data");
+        data.setAccessible(true);
+
+        counter.withLabelValues("a", "b").inc(1.0);
+        counter.withLabelValues("c", "d").inc(3.0);
+        counter.withLabelValues("e", "f").inc(7.0);
+
+        // collect() iterates over data.entrySet().
+        // remove() removes entries from data.
+        // Make sure iterating does not yield null while removing.
+
+        int i = 0;
+        for (Map.Entry<?, ?> entry : ((Map<?, ?>) data.get(counter)).entrySet()) {
+            i++;
+            if (i == 2) {
+                counter.remove("c", "d");
+                counter.remove("e", "f");
+            }
+            Assert.assertNotNull(entry.getKey());
+            Assert.assertNotNull(entry.getValue());
+        }
+    }
+}u}(j  (489bcac335a186d9d220a1b4bd74329e5bbb5d4fj  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TestUtil.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTestUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import org.junit.Assert;
+
+public class TestUtil {
+
+    public static void assertExemplarEquals(Exemplar expected, Exemplar actual) {
+        // ignore timestamp
+        Assert.assertEquals(expected.getValue(), actual.getValue(), 0.00001);
+        Assert.assertEquals(expected.getLabels(), actual.getLabels());
+    }
+}u}(j  (996e199db1f7bd41488532f5dccdd98e8fe8f0f4j  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TodoTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTodoTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XB  @@ -0,0 +1,17 @@
+package io.prometheus.metrics.core.metrics;
+
+public class TodoTest {
+
+    // if a metric with labels is created but never used it has no data.
+    // The registry's collect() method should skip those metrics to avoid illegal protobuf or text format.
+
+    // callback versions of metrics
+
+    // build() called with name == null
+
+    // call inc() without labels, but the metric was created with labels
+
+    // call inc() with labels, but the metric was created without labels
+
+    // for performance: Use return value of withLabels() directly
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  )prometheus-metrics-core/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-core%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (a6038dd91dba826120715c7e078e7ce43c97945aj  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj  addedj  K6j  K j  K6j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xz  @@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exporter Servlet Jakarta</name>
+    <description>
+        Jakarta Servlet for exposing a Prometheus scrape endpoint.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+</project>u}(j  (ef36568754f16e97d951e0383f9711a7defa29aej  prometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javaj  addedj  KYj  K j  KYj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X<  @@ -0,0 +1,89 @@
+package io.prometheus.metrics.exporter.servlet.jakarta;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.function.Predicate;
+
+/**
+ * Initial example exporter so that we can try the new metrics library out.
+ * <p>
+ * We'll add a Jakarta servlet, the built-in HTTPServer, etc. soon, and likely move common code into a common module.
+ */
+public class PrometheusMetricsServlet extends HttpServlet {
+
+    private final PrometheusRegistry registry;
+
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+
+    public PrometheusMetricsServlet() {
+        this(PrometheusProperties.get(), PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusRegistry registry) {
+        this(PrometheusProperties.get(), registry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusProperties config) {
+        this(config, PrometheusRegistry.defaultRegistry);
+    }
+
+    public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        Predicate<String> filter = nameFilter;
+        String[] allowedNames = request.getParameterValues("name[]");
+        if (allowedNames != null) {
+            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
+        }
+        String debugParam = request.getParameter("debug");
+        if (debugParam != null) {
+            switch (debugParam) {
+                case "openmetrics":
+                    response.setContentType("text/plain");
+                    expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "text":
+                    response.setContentType("text/plain");
+                    expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                    return;
+                case "prometheus-protobuf":
+                    response.setContentType("text/plain");
+                    String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
+                    response.getWriter().write(debugString);
+                    return;
+            }
+        }
+        String acceptHeader = request.getHeader("Accept");
+        ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+        response.setContentType(writer.getContentType());
+        writer.write(response.getOutputStream(), registry.scrape(filter));
+    }
+}u}(j  (318e865f55bdd893d762a5f4e759a502e8bbc983j  =prometheus-metrics-exporter-servlet-jakarta/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(j  (e61d58055ffd21473320045871e6c8b4bfe02e84j  :prometheus-metrics-exposition-formats/generate-protobuf.shj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X+  @@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# We use the shaded protobuf JAR from the protobuf-shaded module.
+# I could not figure out how to use a protoc Maven plugin to use the shaded module, so I ran this command to generate the sources manually.
+
+# The version string must be the same as in protobuf-shaded/pom.xml.
+export PROTOBUF_VERSION_STRING="3_21_7"
+
+rm -rf src/main/protobuf/*
+curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/prometheus/client/metrics.proto -o src/main/protobuf/metrics.proto
+sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
+rm -rf src/main/generated/*
+protoc --java_out src/main/generated src/main/protobuf/metrics.proto
+sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j  (9de57e88c1af8a760a686bc89243e55a89a2457aj  -prometheus-metrics-exposition-formats/pom.xmlj  addedj  KUj  K j  KUj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xx  @@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exposition-formats</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Exposition Formats</name>
+    <description>
+        Prometheus exposition formats.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>protobuf-shaded</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.2.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/main/generated/</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (94e92a1f394b020fd8bad9690393661e0bb3ad4fj  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj  addedj  M7j  K j  M7j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bu}(j  (2d1ce9dcdeb3a31694fd5f5620ca04ab951c8b35j  wprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatWriter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,12 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface ExpositionFormatWriter {
+    boolean accepts(String acceptHeader);
+    void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException;
+    String getContentType();
+}u}(j  (f913753cd1f16ea1413664649faefc42c89b8a23j  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormats.javaj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormats.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.config.ExporterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+
+public class ExpositionFormats {
+
+    private final PrometheusProtobufWriter prometheusProtobufWriter;
+    private final PrometheusTextFormatWriter prometheusTextFormatWriter;
+    private final OpenMetricsTextFormatWriter openMetricsTextFormatWriter;
+
+    private ExpositionFormats(PrometheusProtobufWriter prometheusProtobufWriter,
+                              PrometheusTextFormatWriter prometheusTextFormatWriter,
+                              OpenMetricsTextFormatWriter openMetricsTextFormatWriter) {
+        this.prometheusProtobufWriter = prometheusProtobufWriter;
+        this.prometheusTextFormatWriter = prometheusTextFormatWriter;
+        this.openMetricsTextFormatWriter = openMetricsTextFormatWriter;
+    }
+
+    public static ExpositionFormats init() {
+        return init(PrometheusProperties.get().getExporterProperties());
+    }
+
+    public static ExpositionFormats init(ExporterProperties properties) {
+        return new ExpositionFormats(
+                new PrometheusProtobufWriter(),
+                new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),
+                new OpenMetricsTextFormatWriter(properties.getIncludeCreatedTimestamps(), properties.getExemplarsOnAllMetricTypes())
+        );
+    }
+
+    public ExpositionFormatWriter findWriter(String acceptHeader) {
+        if (prometheusProtobufWriter.accepts(acceptHeader)) {
+            return prometheusProtobufWriter;
+        }
+        if (openMetricsTextFormatWriter.accepts(acceptHeader)) {
+            return openMetricsTextFormatWriter;
+        }
+        return prometheusTextFormatWriter;
+    }
+
+    public PrometheusProtobufWriter getPrometheusProtobufWriter() {
+        return prometheusProtobufWriter;
+    }
+
+    public PrometheusTextFormatWriter getPrometheusTextFormatWriter() {
+        return prometheusTextFormatWriter;
+    }
+
+    public OpenMetricsTextFormatWriter getOpenMetricsTextFormatWriter() {
+        return openMetricsTextFormatWriter;
+    }
+}u}(j  (0559ce0bef9d73bef4ca2c69da261ba53075c975j  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javaj  addedj  MUj  K j  MUj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XA  @@ -0,0 +1,341 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+
+/**
+ * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.
+ */
+public class OpenMetricsTextFormatWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "application/openmetrics-text; version=1.0.0; charset=utf-8";
+    private final boolean createdTimestampsEnabled;
+    private final boolean exemplarsOnAllMetricTypesEnabled;
+
+    /**
+     * @param createdTimestampsEnabled defines if {@code _created} timestamps should be included in the output or not.
+     */
+    public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled, boolean exemplarsOnAllMetricTypesEnabled) {
+        this.createdTimestampsEnabled = createdTimestampsEnabled;
+        this.exemplarsOnAllMetricTypesEnabled = exemplarsOnAllMetricTypesEnabled;
+    }
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        }
+        return acceptHeader.contains("application/openmetrics-text");
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                if (snapshot instanceof CounterSnapshot) {
+                    writeCounter(writer, (CounterSnapshot) snapshot);
+                } else if (snapshot instanceof GaugeSnapshot) {
+                    writeGauge(writer, (GaugeSnapshot) snapshot);
+                } else if (snapshot instanceof HistogramSnapshot) {
+                    writeHistogram(writer, (HistogramSnapshot) snapshot);
+                } else if (snapshot instanceof SummarySnapshot) {
+                    writeSummary(writer, (SummarySnapshot) snapshot);
+                } else if (snapshot instanceof InfoSnapshot) {
+                    writeInfo(writer, (InfoSnapshot) snapshot);
+                } else if (snapshot instanceof StateSetSnapshot) {
+                    writeStateSet(writer, (StateSetSnapshot) snapshot);
+                } else if (snapshot instanceof UnknownSnapshot) {
+                    writeUnknown(writer, (UnknownSnapshot) snapshot);
+                }
+            }
+        }
+        writer.write("# EOF\n");
+        writer.flush();
+    }
+
+    private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "counter", metadata);
+        for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "gauge", metadata);
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            if (exemplarsOnAllMetricTypesEnabled) {
+                writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        if (snapshot.isGaugeHistogram()) {
+            writeMetadata(writer, "gaugehistogram", metadata);
+            writeClassicHistogramBuckets(writer, metadata, "_gcount", "_gsum", snapshot.getData());
+        } else {
+            writeMetadata(writer, "histogram", metadata);
+            writeClassicHistogramBuckets(writer, metadata, "_count", "_sum", snapshot.getData());
+        }
+    }
+
+    private void writeClassicHistogramBuckets(OutputStreamWriter writer, MetricMetadata metadata, String countSuffix, String sumSuffix, List<HistogramSnapshot.HistogramDataPointSnapshot> dataList) throws IOException {
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : dataList) {
+            ClassicHistogramBuckets buckets = getClassicBuckets(data);
+            Exemplars exemplars = data.getExemplars();
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeLong(writer, cumulativeCount);
+                Exemplar exemplar;
+                if (i == 0) {
+                    exemplar = exemplars.get(Double.NEGATIVE_INFINITY, buckets.getUpperBound(i));
+                } else {
+                    exemplar = exemplars.get(buckets.getUpperBound(i - 1), buckets.getUpperBound(i));
+                }
+                writeScrapeTimestampAndExemplar(writer, data, exemplar);
+            }
+            if (data.hasCount() && data.hasSum()) {
+                // In OpenMetrics format, histogram _count and _sum are either both present or both absent.
+                // While Prometheus allows Exemplars for histogram's _count and _sum now, we don't
+                // use Exemplars here to be backwards compatible with previous behavior.
+                writeCountAndSum(writer, metadata, data, countSuffix, sumSuffix, Exemplars.EMPTY);
+            }
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.getClassicBuckets().isEmpty()) {
+            return ClassicHistogramBuckets.of(
+                    new double[]{Double.POSITIVE_INFINITY},
+                    new long[]{data.getCount()}
+            );
+        } else {
+            return data.getClassicBuckets();
+        }
+    }
+
+    private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
+        boolean metadataWritten = false;
+        MetricMetadata metadata = snapshot.getMetadata();
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
+            if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
+                continue;
+            }
+            if (!metadataWritten) {
+                writeMetadata(writer, "summary", metadata);
+                metadataWritten = true;
+            }
+            Exemplars exemplars = data.getExemplars();
+            // Exemplars for summaries are new, and there's no best practice yet which Exemplars to choose for which
+            // time series. We select exemplars[0] for _count, exemplars[1] for _sum, and exemplars[2...] for the
+            // quantiles, all indexes modulo exemplars.length.
+            int exemplarIndex = 1;
+            for (Quantile quantile : data.getQuantiles()) {
+                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeDouble(writer, quantile.getValue());
+                if (exemplars.size() > 0 && exemplarsOnAllMetricTypesEnabled) {
+                    exemplarIndex = (exemplarIndex + 1) % exemplars.size();
+                    writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+                } else {
+                    writeScrapeTimestampAndExemplar(writer, data, null);
+                }
+            }
+            // Unlike histograms, summaries can have only a count or only a sum according to OpenMetrics.
+            writeCountAndSum(writer, metadata, data, "_count", "_sum", exemplars);
+            writeCreated(writer, metadata, data);
+        }
+    }
+
+    private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "info", metadata);
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writer.write("1");
+            writeScrapeTimestampAndExemplar(writer, data, null);
+        }
+    }
+
+    private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "stateset", metadata);
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
+            for (int i = 0; i < data.size(); i++) {
+                writer.write(metadata.getName());
+                writer.write('{');
+                for (int j = 0; j < data.getLabels().size(); j++) {
+                    if (j > 0) {
+                        writer.write(",");
+                    }
+                    writer.write(data.getLabels().getName(j));
+                    writer.write("=\"");
+                    writeEscapedLabelValue(writer, data.getLabels().getValue(j));
+                    writer.write("\"");
+                }
+                if (!data.getLabels().isEmpty()) {
+                    writer.write(",");
+                }
+                writer.write(metadata.getName());
+                writer.write("=\"");
+                writeEscapedLabelValue(writer, data.getName(i));
+                writer.write("\"} ");
+                if (data.isTrue(i)) {
+                    writer.write("1");
+                } else {
+                    writer.write("0");
+                }
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "unknown", metadata);
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            if (exemplarsOnAllMetricTypesEnabled) {
+            writeScrapeTimestampAndExemplar(writer, data, data.getExemplar());
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeCountAndSum(OutputStreamWriter writer, MetricMetadata metadata, DistributionDataPointSnapshot data, String countSuffix, String sumSuffix, Exemplars exemplars) throws IOException {
+        int exemplarIndex = 0;
+        if (data.hasCount()) {
+            writeNameAndLabels(writer, metadata.getName(), countSuffix, data.getLabels());
+            writeLong(writer, data.getCount());
+            if (exemplars.size() > 0) {
+                writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+                exemplarIndex = exemplarIndex + 1 % exemplars.size();
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+        if (data.hasSum()) {
+            writeNameAndLabels(writer, metadata.getName(), sumSuffix, data.getLabels());
+            writeDouble(writer, data.getSum());
+            if (exemplars.size() > 0) {
+                writeScrapeTimestampAndExemplar(writer, data, exemplars.get(exemplarIndex));
+            } else {
+                writeScrapeTimestampAndExemplar(writer, data, null);
+            }
+        }
+    }
+
+    private void writeCreated(OutputStreamWriter writer, MetricMetadata metadata, DataPointSnapshot data) throws IOException {
+        if (createdTimestampsEnabled && data.hasCreatedTimestamp()) {
+            writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+            writeTimestamp(writer, data.getCreatedTimestampMillis());
+            if (data.hasScrapeTimestamp()) {
+                writer.write(' ');
+                writeTimestamp(writer, data.getScrapeTimestampMillis());
+            }
+            writer.write('\n');
+        }
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels) throws IOException {
+        writeNameAndLabels(writer, name, suffix, labels, null, 0.0);
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels,
+                                    String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write(name);
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        if (!labels.isEmpty() || additionalLabelName != null) {
+            writeLabels(writer, labels, additionalLabelName, additionalLabelValue);
+        }
+        writer.write(' ');
+    }
+
+    private void writeScrapeTimestampAndExemplar(OutputStreamWriter writer, DataPointSnapshot data, Exemplar exemplar) throws IOException {
+        if (data.hasScrapeTimestamp()) {
+            writer.write(' ');
+            writeTimestamp(writer, data.getScrapeTimestampMillis());
+        }
+        if (exemplar != null) {
+            writer.write(" # ");
+            writeLabels(writer, exemplar.getLabels(), null, 0);
+            writer.write(' ');
+            writeDouble(writer, exemplar.getValue());
+            if (exemplar.hasTimestamp()) {
+                writer.write(' ');
+                writeTimestamp(writer, exemplar.getTimestampMillis());
+            }
+        }
+        writer.write('\n');
+    }
+
+    private void writeMetadata(OutputStreamWriter writer, String typeName, MetricMetadata metadata) throws IOException {
+        writer.write("# TYPE ");
+        writer.write(metadata.getName());
+        writer.write(' ');
+        writer.write(typeName);
+        writer.write('\n');
+        if (metadata.getUnit() != null) {
+            writer.write("# UNIT ");
+            writer.write(metadata.getName());
+            writer.write(' ');
+            writeEscapedLabelValue(writer, metadata.getUnit().toString());
+            writer.write('\n');
+        }
+        if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
+            writer.write("# HELP ");
+            writer.write(metadata.getName());
+            writer.write(' ');
+            writeEscapedLabelValue(writer, metadata.getHelp());
+            writer.write('\n');
+        }
+    }
+}u}(j  (d6de08114a9b4472ec47d05337365c3f4f83b52ej  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj  addedj  Mpj  K j  Mpj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
F  @@ -0,0 +1,368 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
+
+/**
+ * Write the Prometheus protobuf format as defined in
+ * <a href="https://github.com/prometheus/client_model/tree/master/io/prometheus/client">github.com/prometheus/client_model</a>.
+ * <p>
+ * As of today, this is the only exposition format that supports native histograms.
+ */
+public class PrometheusProtobufWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited";
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+            return acceptHeader.contains("application/vnd.google.protobuf")
+                    && acceptHeader.contains("proto=io.prometheus.client.MetricFamily");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public String toDebugString(MetricSnapshots metricSnapshots) {
+        StringBuilder stringBuilder = new StringBuilder();
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                stringBuilder.append(TextFormat.printer().printToString(convert(snapshot)));
+            }
+        }
+        return stringBuilder.toString();
+    }
+
+    @Override
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                convert(snapshot).writeDelimitedTo(out);
+            }
+        }
+    }
+
+    public Metrics.MetricFamily convert(MetricSnapshot snapshot) {
+        Metrics.MetricFamily.Builder builder = Metrics.MetricFamily.newBuilder();
+        if (snapshot instanceof CounterSnapshot) {
+            for (CounterDataPointSnapshot data : ((CounterSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_total", Metrics.MetricType.COUNTER);
+        } else if (snapshot instanceof GaugeSnapshot) {
+            for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof HistogramSnapshot) {
+            HistogramSnapshot histogram = (HistogramSnapshot) snapshot;
+            for (HistogramSnapshot.HistogramDataPointSnapshot data : histogram.getData()) {
+                builder.addMetric(convert(data));
+            }
+            Metrics.MetricType type = histogram.isGaugeHistogram() ? Metrics.MetricType.GAUGE_HISTOGRAM : Metrics.MetricType.HISTOGRAM;
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, type);
+        } else if (snapshot instanceof SummarySnapshot) {
+            for (SummarySnapshot.SummaryDataPointSnapshot data : ((SummarySnapshot) snapshot).getData()) {
+                if (data.hasCount() || data.hasSum() || data.getQuantiles().size() > 0) {
+                    builder.addMetric(convert(data));
+                }
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.SUMMARY);
+        } else if (snapshot instanceof InfoSnapshot) {
+            for (InfoSnapshot.InfoDataPointSnapshot data : ((InfoSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), "_info", Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof StateSetSnapshot) {
+            for (StateSetSnapshot.StateSetDataPointSnapshot data : ((StateSetSnapshot) snapshot).getData()) {
+                for (int i = 0; i < data.size(); i++) {
+                    builder.addMetric(convert(data, snapshot.getMetadata().getName(), i));
+                }
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.GAUGE);
+        } else if (snapshot instanceof UnknownSnapshot) {
+            for (UnknownSnapshot.UnknownDataPointSnapshot data : ((UnknownSnapshot) snapshot).getData()) {
+                builder.addMetric(convert(data));
+            }
+            setMetadataUnlessEmpty(builder, snapshot.getMetadata(), null, Metrics.MetricType.UNTYPED);
+        }
+        return builder.build();
+    }
+
+    private void setMetadataUnlessEmpty(Metrics.MetricFamily.Builder builder, MetricMetadata metadata, String nameSuffix, Metrics.MetricType type) {
+        if (builder.getMetricCount() == 0) {
+            return;
+        }
+        if (nameSuffix == null) {
+            builder.setName(metadata.getName());
+        } else {
+            builder.setName(metadata.getName() + nameSuffix);
+        }
+        if (metadata.getHelp() != null) {
+            builder.setHelp(metadata.getHelp());
+        }
+        builder.setType(type);
+    }
+
+    private Metrics.Metric.Builder convert(CounterDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Counter.Builder counterBuilder = Metrics.Counter.newBuilder();
+        counterBuilder.setValue(data.getValue());
+        if (data.getExemplar() != null) {
+            counterBuilder.setExemplar(convert(data.getExemplar()));
+        }
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setCounter(counterBuilder.build());
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(GaugeSnapshot.GaugeDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        gaugeBuilder.setValue(data.getValue());
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Histogram.Builder histogramBuilder = Metrics.Histogram.newBuilder();
+        if (data.hasNativeHistogramData()) {
+            histogramBuilder.setSchema(data.getNativeSchema());
+            histogramBuilder.setZeroCount(data.getNativeZeroCount());
+            histogramBuilder.setZeroThreshold(data.getNativeZeroThreshold());
+            addBuckets(histogramBuilder, data.getNativeBucketsForPositiveValues(), +1);
+            addBuckets(histogramBuilder, data.getNativeBucketsForNegativeValues(), -1);
+
+            // Add a single +Inf bucket for the exemplar.
+            // It is currently not possible to have more than one exemplar in a native histogram,
+            // see https://cloud-native.slack.com/archives/C02KR205UMU/p1688414381799849
+            Exemplar exemplar = data.getExemplars().getLatest();
+            if (exemplar != null) {
+                Metrics.Bucket.Builder bucketBuilder = Metrics.Bucket.newBuilder()
+                        .setCumulativeCount(getNativeCount(data))
+                        .setUpperBound(Double.POSITIVE_INFINITY);
+                bucketBuilder.setExemplar(convert(exemplar));
+                histogramBuilder.addBucket(bucketBuilder);
+            }
+        } else if (data.hasClassicHistogramData()) {
+
+            // Once native histograms support multiple exemplars the above can be changed from "else if" to "if",
+            // so that we always add the complete classic buckets and exemplars.
+
+            ClassicHistogramBuckets buckets = data.getClassicBuckets();
+            double lowerBound = Double.NEGATIVE_INFINITY;
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                double upperBound = buckets.getUpperBound(i);
+                Metrics.Bucket.Builder bucketBuilder = Metrics.Bucket.newBuilder()
+                        .setCumulativeCount(cumulativeCount)
+                        .setUpperBound(upperBound);
+                Exemplar exemplar = data.getExemplars().get(lowerBound, upperBound);
+                if (exemplar != null) {
+                    bucketBuilder.setExemplar(convert(exemplar));
+                }
+                histogramBuilder.addBucket(bucketBuilder);
+                lowerBound = upperBound;
+            }
+        }
+        addLabels(metricBuilder, data.getLabels());
+        setScrapeTimestamp(metricBuilder, data);
+        if (data.hasCount()) {
+            histogramBuilder.setSampleCount(data.getCount());
+        }
+        if (data.hasSum()) {
+            histogramBuilder.setSampleSum(data.getSum());
+        }
+        metricBuilder.setHistogram(histogramBuilder.build());
+        return metricBuilder;
+    }
+
+    private long getNativeCount(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.hasCount()) {
+            return data.getCount();
+        } else {
+            long count = data.getNativeZeroCount();
+            for (int i = 0; i < data.getNativeBucketsForPositiveValues().size(); i++) {
+                count += data.getNativeBucketsForPositiveValues().getCount(i);
+            }
+            for (int i = 0; i < data.getNativeBucketsForNegativeValues().size(); i++) {
+                count += data.getNativeBucketsForNegativeValues().getCount(i);
+            }
+            return count;
+        }
+    }
+
+    private void addBuckets(Metrics.Histogram.Builder histogramBuilder, NativeHistogramBuckets buckets, int sgn) {
+        if (buckets.size() > 0) {
+            Metrics.BucketSpan.Builder currentSpan = Metrics.BucketSpan.newBuilder();
+            currentSpan.setOffset(buckets.getBucketIndex(0));
+            currentSpan.setLength(0);
+            int previousIndex = currentSpan.getOffset();
+            long previousCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                if (buckets.getBucketIndex(i) > previousIndex + 1) {
+                    // If the gap between bucketIndex and previousIndex is just 1 or 2,
+                    // we don't start a new span but continue the existing span and add 1 or 2 empty buckets.
+                    if (buckets.getBucketIndex(i) <= previousIndex + 3) {
+                        while (buckets.getBucketIndex(i) > previousIndex + 1) {
+                            currentSpan.setLength(currentSpan.getLength() + 1);
+                            previousIndex++;
+                            if (sgn > 0) {
+                                histogramBuilder.addPositiveDelta(-previousCount);
+                            } else {
+                                histogramBuilder.addNegativeDelta(-previousCount);
+                            }
+                            previousCount = 0;
+                        }
+                    } else {
+                        if (sgn > 0) {
+                            histogramBuilder.addPositiveSpan(currentSpan.build());
+                        } else {
+                            histogramBuilder.addNegativeSpan(currentSpan.build());
+                        }
+                        currentSpan = Metrics.BucketSpan.newBuilder();
+                        currentSpan.setOffset(buckets.getBucketIndex(i) - (previousIndex + 1));
+                    }
+                }
+                currentSpan.setLength(currentSpan.getLength() + 1);
+                previousIndex = buckets.getBucketIndex(i);
+                if (sgn > 0) {
+                    histogramBuilder.addPositiveDelta(buckets.getCount(i) - previousCount);
+                } else {
+                    histogramBuilder.addNegativeDelta(buckets.getCount(i) - previousCount);
+                }
+                previousCount = buckets.getCount(i);
+            }
+            if (sgn > 0) {
+                histogramBuilder.addPositiveSpan(currentSpan.build());
+            } else {
+                histogramBuilder.addNegativeSpan(currentSpan.build());
+            }
+        }
+    }
+
+    private Metrics.Metric.Builder convert(SummarySnapshot.SummaryDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Summary.Builder summaryBuilder = Metrics.Summary.newBuilder();
+        if (data.hasCount()) {
+            summaryBuilder.setSampleCount(data.getCount());
+        }
+        if (data.hasSum()) {
+            summaryBuilder.setSampleSum(data.getSum());
+        }
+        Quantiles quantiles = data.getQuantiles();
+        for (int i = 0; i < quantiles.size(); i++) {
+            summaryBuilder.addQuantile(Metrics.Quantile.newBuilder()
+                    .setQuantile(quantiles.get(i).getQuantile())
+                    .setValue(quantiles.get(i).getValue())
+                    .build());
+        }
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setSummary(summaryBuilder.build());
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(InfoSnapshot.InfoDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        gaugeBuilder.setValue(1);
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(StateSetSnapshot.StateSetDataPointSnapshot data, String name, int i) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Gauge.Builder gaugeBuilder = Metrics.Gauge.newBuilder();
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                .setName(name)
+                .setValue(data.getName(i))
+                .build());
+        if (data.isTrue(i)) {
+            gaugeBuilder.setValue(1);
+        } else {
+            gaugeBuilder.setValue(0);
+        }
+        metricBuilder.setGauge(gaugeBuilder);
+        setScrapeTimestamp(metricBuilder, data);
+        return metricBuilder;
+    }
+
+    private Metrics.Metric.Builder convert(UnknownSnapshot.UnknownDataPointSnapshot data) {
+        Metrics.Metric.Builder metricBuilder = Metrics.Metric.newBuilder();
+        Metrics.Untyped.Builder untypedBuilder = Metrics.Untyped.newBuilder();
+        untypedBuilder.setValue(data.getValue());
+        addLabels(metricBuilder, data.getLabels());
+        metricBuilder.setUntyped(untypedBuilder);
+        return metricBuilder;
+    }
+
+    private void addLabels(Metrics.Metric.Builder metricBuilder, Labels labels) {
+        for (int i = 0; i < labels.size(); i++) {
+            metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                    .setName(labels.getName(i))
+                    .setValue(labels.getValue(i))
+                    .build());
+        }
+    }
+
+    private void addLabels(Metrics.Exemplar.Builder metricBuilder, Labels labels) {
+        for (int i = 0; i < labels.size(); i++) {
+            metricBuilder.addLabel(Metrics.LabelPair.newBuilder()
+                    .setName(labels.getName(i))
+                    .setValue(labels.getValue(i))
+                    .build());
+        }
+    }
+
+    private Metrics.Exemplar.Builder convert(Exemplar exemplar) {
+        Metrics.Exemplar.Builder builder = Metrics.Exemplar.newBuilder();
+        builder.setValue(exemplar.getValue());
+        addLabels(builder, exemplar.getLabels());
+        if (exemplar.hasTimestamp()) {
+            builder.setTimestamp(timestampFromMillis(exemplar.getTimestampMillis()));
+        }
+        return builder;
+    }
+
+    private void setScrapeTimestamp(Metrics.Metric.Builder metricBuilder, DataPointSnapshot data) {
+        if (data.hasScrapeTimestamp()) {
+            metricBuilder.setTimestampMs(data.getScrapeTimestampMillis());
+        }
+    }
+}uq      }(j  (a4499dd9da43bb6d1dc392d8c42a6880bc985fadj  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javaj  addedj  M[j  K j  M[j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X>  @@ -0,0 +1,347 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.StandardCharsets;
+
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
+
+/**
+ * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.
+ */
+public class PrometheusTextFormatWriter implements ExpositionFormatWriter {
+
+    public static final String CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
+
+    private final boolean writeCreatedTimestamps;
+
+    public PrometheusTextFormatWriter(boolean writeCreatedTimestamps) {
+        this.writeCreatedTimestamps = writeCreatedTimestamps;
+    }
+
+    @Override
+    public boolean accepts(String acceptHeader) {
+        if (acceptHeader == null) {
+            return false;
+        } else {
+        return acceptHeader.contains("text/plain");
+        }
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE;
+    }
+
+    public void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException {
+        // See https://prometheus.io/docs/instrumenting/exposition_formats/
+        // "unknown", "gauge", "counter", "stateset", "info", "histogram", "gaugehistogram", and "summary".
+        OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
+        for (MetricSnapshot snapshot : metricSnapshots) {
+            if (snapshot.getData().size() > 0) {
+                if (snapshot instanceof CounterSnapshot) {
+                    writeCounter(writer, (CounterSnapshot) snapshot);
+                } else if (snapshot instanceof GaugeSnapshot) {
+                    writeGauge(writer, (GaugeSnapshot) snapshot);
+                } else if (snapshot instanceof HistogramSnapshot) {
+                    writeHistogram(writer, (HistogramSnapshot) snapshot);
+                } else if (snapshot instanceof SummarySnapshot) {
+                    writeSummary(writer, (SummarySnapshot) snapshot);
+                } else if (snapshot instanceof InfoSnapshot) {
+                    writeInfo(writer, (InfoSnapshot) snapshot);
+                } else if (snapshot instanceof StateSetSnapshot) {
+                    writeStateSet(writer, (StateSetSnapshot) snapshot);
+                } else if (snapshot instanceof UnknownSnapshot) {
+                    writeUnknown(writer, (UnknownSnapshot) snapshot);
+                }
+            }
+        }
+        if (writeCreatedTimestamps) {
+            for (MetricSnapshot snapshot : metricSnapshots) {
+                if (snapshot.getData().size() > 0) {
+                    if (snapshot instanceof CounterSnapshot) {
+                        writeCreated(writer, snapshot);
+                    } else if (snapshot instanceof HistogramSnapshot) {
+                        writeCreated(writer, snapshot);
+                    } else if (snapshot instanceof SummarySnapshot) {
+                        writeCreated(writer, snapshot);
+                    }
+                }
+            }
+        }
+        writer.flush();
+    }
+
+    public void writeCreated(OutputStreamWriter writer, MetricSnapshot snapshot) throws IOException {
+            boolean metadataWritten = false;
+            MetricMetadata metadata = snapshot.getMetadata();
+            for (DataPointSnapshot data : snapshot.getData()) {
+                if (data.hasCreatedTimestamp()) {
+                    if (!metadataWritten) {
+                        writeMetadata(writer, "_created", "gauge", metadata);
+                        metadataWritten = true;
+                    }
+                    writeNameAndLabels(writer, metadata.getName(), "_created", data.getLabels());
+                    writeTimestamp(writer, data.getCreatedTimestampMillis());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+            }
+
+    }
+
+    private void writeCounter(OutputStreamWriter writer, CounterSnapshot snapshot) throws IOException {
+        if (snapshot.getData().size() > 0) {
+            MetricMetadata metadata = snapshot.getMetadata();
+            writeMetadata(writer, "_total", "counter", metadata);
+            for (CounterSnapshot.CounterDataPointSnapshot data : snapshot.getData()) {
+                writeNameAndLabels(writer, metadata.getName(), "_total", data.getLabels());
+                writeDouble(writer, data.getValue());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeGauge(OutputStreamWriter writer, GaugeSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "gauge", metadata);
+        for (GaugeSnapshot.GaugeDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeHistogram(OutputStreamWriter writer, HistogramSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "histogram", metadata);
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            ClassicHistogramBuckets buckets = getClassicBuckets(data);
+            long cumulativeCount = 0;
+            for (int i = 0; i < buckets.size(); i++) {
+                cumulativeCount += buckets.getCount(i);
+                writeNameAndLabels(writer, metadata.getName(), "_bucket", data.getLabels(), "le", buckets.getUpperBound(i));
+                writeLong(writer, cumulativeCount);
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (!snapshot.isGaugeHistogram()) {
+                if (data.hasCount()) {
+                    writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                    writeLong(writer, data.getCount());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+                if (data.hasSum()) {
+                    writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                    writeDouble(writer, data.getSum());
+                    writeScrapeTimestampAndNewline(writer, data);
+                }
+            }
+        }
+        if (snapshot.isGaugeHistogram()) {
+            writeGaugeCountSum(writer, snapshot, metadata);
+        }
+    }
+
+    private ClassicHistogramBuckets getClassicBuckets(HistogramSnapshot.HistogramDataPointSnapshot data) {
+        if (data.getClassicBuckets().isEmpty()) {
+            return ClassicHistogramBuckets.of(
+                    new double[]{Double.POSITIVE_INFINITY},
+                    new long[]{data.getCount()}
+            );
+        } else {
+            return data.getClassicBuckets();
+        }
+    }
+
+    private void writeGaugeCountSum(OutputStreamWriter writer, HistogramSnapshot snapshot, MetricMetadata metadata) throws IOException {
+        // Prometheus text format does not support gaugehistogram's _gcount and _gsum.
+        // So we append _gcount and _gsum as gauge metrics.
+        boolean metadataWritten = false;
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            if (data.hasCount()) {
+                if (!metadataWritten) {
+                    writeMetadata(writer, "_gcount", "gauge", metadata);
+                    metadataWritten = true;
+                }
+                writeNameAndLabels(writer, metadata.getName(), "_gcount", data.getLabels());
+                writeLong(writer, data.getCount());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+        metadataWritten = false;
+        for (HistogramSnapshot.HistogramDataPointSnapshot data : snapshot.getData()) {
+            if (data.hasSum()) {
+                if (!metadataWritten) {
+                    writeMetadata(writer, "_gsum", "gauge", metadata);
+                    metadataWritten = true;
+                }
+                writeNameAndLabels(writer, metadata.getName(), "_gsum", data.getLabels());
+                writeDouble(writer, data.getSum());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeSummary(OutputStreamWriter writer, SummarySnapshot snapshot) throws IOException {
+        boolean metadataWritten = false;
+        MetricMetadata metadata = snapshot.getMetadata();
+        for (SummarySnapshot.SummaryDataPointSnapshot data : snapshot.getData()) {
+            if (data.getQuantiles().size() == 0 && !data.hasCount() && !data.hasSum()) {
+                continue;
+            }
+            if (!metadataWritten) {
+                writeMetadata(writer, "", "summary", metadata);
+                metadataWritten = true;
+            }
+            for (Quantile quantile : data.getQuantiles()) {
+                writeNameAndLabels(writer, metadata.getName(), null, data.getLabels(), "quantile", quantile.getQuantile());
+                writeDouble(writer, quantile.getValue());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (data.hasCount()) {
+                writeNameAndLabels(writer, metadata.getName(), "_count", data.getLabels());
+                writeLong(writer, data.getCount());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+            if (data.hasSum()) {
+                writeNameAndLabels(writer, metadata.getName(), "_sum", data.getLabels());
+                writeDouble(writer, data.getSum());
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeInfo(OutputStreamWriter writer, InfoSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "_info", "gauge", metadata);
+        for (InfoSnapshot.InfoDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), "_info", data.getLabels());
+            writer.write("1");
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeStateSet(OutputStreamWriter writer, StateSetSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "gauge", metadata);
+        for (StateSetSnapshot.StateSetDataPointSnapshot data : snapshot.getData()) {
+            for (int i = 0; i < data.size(); i++) {
+                writer.write(metadata.getName());
+                writer.write('{');
+                for (int j = 0; j < data.getLabels().size(); j++) {
+                    if (j > 0) {
+                        writer.write(",");
+                    }
+                    writer.write(data.getLabels().getName(j));
+                    writer.write("=\"");
+                    writeEscapedLabelValue(writer, data.getLabels().getValue(j));
+                    writer.write("\"");
+                }
+                if (!data.getLabels().isEmpty()) {
+                    writer.write(",");
+                }
+                writer.write(metadata.getName());
+                writer.write("=\"");
+                writeEscapedLabelValue(writer, data.getName(i));
+                writer.write("\"} ");
+                if (data.isTrue(i)) {
+                    writer.write("1");
+                } else {
+                    writer.write("0");
+                }
+                writeScrapeTimestampAndNewline(writer, data);
+            }
+        }
+    }
+
+    private void writeUnknown(OutputStreamWriter writer, UnknownSnapshot snapshot) throws IOException {
+        MetricMetadata metadata = snapshot.getMetadata();
+        writeMetadata(writer, "", "untyped", metadata);
+        for (UnknownSnapshot.UnknownDataPointSnapshot data : snapshot.getData()) {
+            writeNameAndLabels(writer, metadata.getName(), null, data.getLabels());
+            writeDouble(writer, data.getValue());
+            writeScrapeTimestampAndNewline(writer, data);
+        }
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels) throws IOException {
+        writeNameAndLabels(writer, name, suffix, labels, null, 0.0);
+    }
+
+    private void writeNameAndLabels(OutputStreamWriter writer, String name, String suffix, Labels labels,
+                                    String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write(name);
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        if (!labels.isEmpty() || additionalLabelName != null) {
+            writeLabels(writer, labels, additionalLabelName, additionalLabelValue);
+        }
+        writer.write(' ');
+    }
+
+    private void writeMetadata(OutputStreamWriter writer, String suffix, String typeString, MetricMetadata metadata) throws IOException {
+        if (metadata.getHelp() != null && !metadata.getHelp().isEmpty()) {
+            writer.write("# HELP ");
+            writer.write(metadata.getName());
+            if (suffix != null) {
+                writer.write(suffix);
+            }
+            writer.write(' ');
+            writeEscapedHelp(writer, metadata.getHelp());
+            writer.write('\n');
+        }
+        writer.write("# TYPE ");
+        writer.write(metadata.getName());
+        if (suffix != null) {
+            writer.write(suffix);
+        }
+        writer.write(' ');
+        writer.write(typeString);
+        writer.write('\n');
+    }
+
+    private void writeEscapedHelp(Writer writer, String s) throws IOException {
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            switch (c) {
+                case '\\':
+                    writer.append("\\\\");
+                    break;
+                case '\n':
+                    writer.append("\\n");
+                    break;
+                default:
+                    writer.append(c);
+            }
+        }
+    }
+
+    private void writeScrapeTimestampAndNewline(OutputStreamWriter writer, DataPointSnapshot data) throws IOException {
+        if (data.hasScrapeTimestamp()) {
+            writer.write(' ');
+            writeTimestamp(writer, data.getScrapeTimestampMillis());
+        }
+        writer.write('\n');
+    }
+}u}(j  (fe496df8cc566d382273276004503e749ef8c547j  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj  addedj  K
j  K j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+
+public class ProtobufUtil {
+
+    static Timestamp timestampFromMillis(long timestampMillis) {
+        return Timestamp.newBuilder()
+                .setSeconds(timestampMillis / 1000L)
+                .setNanos((int) (timestampMillis % 1000L * 1000000L))
+                .build();
+    }
+}u}(j  (5bb15c3125a289df669735841e1f8458ed9b3950j  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xe
  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+
+public class TextFormatUtil {
+
+    static void writeLong(OutputStreamWriter writer, long value) throws IOException {
+        writer.append(Long.toString(value));
+    }
+
+    static void writeDouble(OutputStreamWriter writer, double d) throws IOException {
+        if (d == Double.POSITIVE_INFINITY) {
+            writer.write("+Inf");
+        } else if (d == Double.NEGATIVE_INFINITY) {
+            writer.write("-Inf");
+        } else {
+            writer.write(Double.toString(d));
+            // FloatingDecimal.getBinaryToASCIIConverter(d).appendTo(writer);
+        }
+    }
+
+    static void writeTimestamp(OutputStreamWriter writer, long timestampMs) throws IOException {
+        writer.write(Long.toString(timestampMs / 1000L));
+        writer.write(".");
+        long ms = timestampMs % 1000;
+        if (ms < 100) {
+            writer.write("0");
+        }
+        if (ms < 10) {
+            writer.write("0");
+        }
+        writer.write(Long.toString(ms));
+    }
+
+    static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            switch (c) {
+                case '\\':
+                    writer.append("\\\\");
+                    break;
+                case '\"':
+                    writer.append("\\\"");
+                    break;
+                case '\n':
+                    writer.append("\\n");
+                    break;
+                default:
+                    writer.append(c);
+            }
+        }
+    }
+
+    static void writeLabels(OutputStreamWriter writer, Labels labels, String additionalLabelName, double additionalLabelValue) throws IOException {
+        writer.write('{');
+        for (int i = 0; i < labels.size(); i++) {
+            if (i > 0) {
+                writer.write(",");
+            }
+            writer.write(labels.getName(i));
+            writer.write("=\"");
+            writeEscapedLabelValue(writer, labels.getValue(i));
+            writer.write("\"");
+        }
+        if (additionalLabelName != null) {
+            if (!labels.isEmpty()) {
+                writer.write(",");
+            }
+            writer.write(additionalLabelName);
+            writer.write("=\"");
+            writeDouble(writer, additionalLabelValue);
+            writer.write("\"");
+        }
+        writer.write('}');
+    }
+}u}(j  (b351b6d5a74d51e4487d4c5661a9d6c1d723d2c5j  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protoj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,144 @@
+// Copyright 2013 Prometheus Team
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto2";
+
+package io.prometheus.client;
+option java_package = "io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7";
+option go_package = "github.com/prometheus/client_model/go;io_prometheus_client";
+
+import "google/protobuf/timestamp.proto";
+
+message LabelPair {
+  optional string name  = 1;
+  optional string value = 2;
+}
+
+enum MetricType {
+  // COUNTER must use the Metric field "counter".
+  COUNTER = 0;
+  // GAUGE must use the Metric field "gauge".
+  GAUGE = 1;
+  // SUMMARY must use the Metric field "summary".
+  SUMMARY = 2;
+  // UNTYPED must use the Metric field "untyped".
+  UNTYPED = 3;
+  // HISTOGRAM must use the Metric field "histogram".
+  HISTOGRAM = 4;
+  // GAUGE_HISTOGRAM must use the Metric field "histogram".
+  GAUGE_HISTOGRAM = 5;
+}
+
+message Gauge {
+  optional double value = 1;
+}
+
+message Counter {
+  optional double   value    = 1;
+  optional Exemplar exemplar = 2;
+}
+
+message Quantile {
+  optional double quantile = 1;
+  optional double value    = 2;
+}
+
+message Summary {
+  optional uint64   sample_count = 1;
+  optional double   sample_sum   = 2;
+  repeated Quantile quantile     = 3;
+}
+
+message Untyped {
+  optional double value = 1;
+}
+
+message Histogram {
+  optional uint64 sample_count       = 1;
+  optional double sample_count_float = 4; // Overrides sample_count if > 0.
+  optional double sample_sum         = 2;
+  // Buckets for the conventional histogram.
+  repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
+
+  // Everything below here is for native histograms (also known as sparse histograms).
+  // Native histograms are an experimental feature without stability guarantees.
+
+  // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
+  // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
+  // then each power of two is divided into 2^n logarithmic buckets.
+  // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
+  // In the future, more bucket schemas may be added using numbers < -4 or > 8.
+  optional sint32 schema           = 5;
+  optional double zero_threshold   = 6; // Breadth of the zero bucket.
+  optional uint64 zero_count       = 7; // Count in zero bucket.
+  optional double zero_count_float = 8; // Overrides sb_zero_count if > 0.
+
+  // Negative buckets for the native histogram.
+  repeated BucketSpan negative_span =  9;
+  // Use either "negative_delta" or "negative_count", the former for
+  // regular histograms with integer counts, the latter for float
+  // histograms.
+  repeated sint64 negative_delta    = 10; // Count delta of each bucket compared to previous one (or to zero for 1st bucket).
+  repeated double negative_count    = 11; // Absolute count of each bucket.
+
+  // Positive buckets for the native histogram.
+  repeated BucketSpan positive_span = 12;
+  // Use either "positive_delta" or "positive_count", the former for
+  // regular histograms with integer counts, the latter for float
+  // histograms.
+  repeated sint64 positive_delta    = 13; // Count delta of each bucket compared to previous one (or to zero for 1st bucket).
+  repeated double positive_count    = 14; // Absolute count of each bucket.
+}
+
+// A Bucket of a conventional histogram, each of which is treated as
+// an individual counter-like time series by Prometheus.
+message Bucket {
+  optional uint64   cumulative_count       = 1; // Cumulative in increasing order.
+  optional double   cumulative_count_float = 4; // Overrides cumulative_count if > 0.
+  optional double   upper_bound            = 2; // Inclusive.
+  optional Exemplar exemplar               = 3;
+}
+
+// A BucketSpan defines a number of consecutive buckets in a native
+// histogram with their offset. Logically, it would be more
+// straightforward to include the bucket counts in the Span. However,
+// the protobuf representation is more compact in the way the data is
+// structured here (with all the buckets in a single array separate
+// from the Spans).
+message BucketSpan {
+  optional sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative).
+  optional uint32 length = 2; // Length of consecutive buckets.
+}
+
+message Exemplar {
+  repeated LabelPair                 label     = 1;
+  optional double                    value     = 2;
+  optional google.protobuf.Timestamp timestamp = 3; // OpenMetrics-style.
+}
+
+message Metric {
+  repeated LabelPair label        = 1;
+  optional Gauge     gauge        = 2;
+  optional Counter   counter      = 3;
+  optional Summary   summary      = 4;
+  optional Untyped   untyped      = 5;
+  optional Histogram histogram    = 7;
+  optional int64     timestamp_ms = 6;
+}
+
+message MetricFamily {
+  optional string     name   = 1;
+  optional string     help   = 2;
+  optional MetricType type   = 3;
+  repeated Metric     metric = 4;
+}u}(j  (233953e00da552de8ff77e414dbe85fca017c63fj  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XI @@ -0,0 +1,1471 @@
+package io.prometheus.metrics.expositionformats;
+
+import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot.SummaryDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot.UnknownDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+public class ExpositionFormatsTest {
+
+    private final String exemplar1String = "{env=\"prod\",span_id=\"12345\",trace_id=\"abcde\"} 1.7 1672850685.829";
+    private final String exemplar2String = "{env=\"dev\",span_id=\"23456\",trace_id=\"bcdef\"} 2.4 1672850685.830";
+
+    private final String exemplar1protoString = "exemplar { " +
+            "label { name: \"env\" value: \"prod\" } " +
+            "label { name: \"span_id\" value: \"12345\" } " +
+            "label { name: \"trace_id\" value: \"abcde\" } " +
+            "value: 1.7 " +
+            "timestamp { seconds: 1672850685 nanos: 829000000 } }";
+
+    private final String exemplar2protoString = "exemplar { " +
+            "label { name: \"env\" value: \"dev\" } " +
+            "label { name: \"span_id\" value: \"23456\" } " +
+            "label { name: \"trace_id\" value: \"bcdef\" } " +
+            "value: 2.4 " +
+            "timestamp { seconds: 1672850685 nanos: 830000000 } }";
+
+    private final String createdTimestamp1s = "1672850385.800";
+    private final long createdTimestamp1 = (long) (1000 * Double.parseDouble(createdTimestamp1s));
+    private final String createdTimestamp2s = "1672850285.000";
+    private final long createdTimestamp2 = (long) (1000 * Double.parseDouble(createdTimestamp2s));
+    private final String scrapeTimestamp1s = "1672850685.829";
+    private final long scrapeTimestamp1 = (long) (1000 * Double.parseDouble(scrapeTimestamp1s));
+    private final String scrapeTimestamp2s = "1672850585.820";
+    private final long scrapeTimestamp2 = (long) (1000 * Double.parseDouble(scrapeTimestamp2s));
+
+    private final Exemplar exemplar1 = Exemplar.newBuilder()
+            .withSpanId("12345")
+            .withTraceId("abcde")
+            .withLabels(Labels.of("env", "prod"))
+            .withValue(1.7)
+            .withTimestampMillis(1672850685829L)
+            .build();
+
+    private final Exemplar exemplar2 = Exemplar.newBuilder()
+            .withSpanId("23456")
+            .withTraceId("bcdef")
+            .withLabels(Labels.of("env", "dev"))
+            .withValue(2.4)
+            .withTimestampMillis(1672850685830L)
+            .build();
+
+    @Test
+    public void testCounterComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE service_time_seconds counter\n" +
+                "# UNIT service_time_seconds seconds\n" +
+                "# HELP service_time_seconds total time spent serving\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP service_time_seconds_total total time spent serving\n" +
+                "# TYPE service_time_seconds_total counter\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + "\n" +
+                "# HELP service_time_seconds_created total time spent serving\n" +
+                "# TYPE service_time_seconds_created gauge\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_created{path=\"/hello\",status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE service_time_seconds counter\n" +
+                "# UNIT service_time_seconds seconds\n" +
+                "# HELP service_time_seconds total time spent serving\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP service_time_seconds_total total time spent serving\n" +
+                "# TYPE service_time_seconds_total counter\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"200\"} 0.8 " + scrapeTimestamp1s + "\n" +
+                "service_time_seconds_total{path=\"/hello\",status=\"500\"} 0.9 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"service_time_seconds_total\" " +
+                "help: \"total time spent serving\" " +
+                "type: COUNTER " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/hello\" } " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "counter { " +
+                        "value: 0.8 " +
+                        exemplar1protoString + " " +
+                    "} " +
+                    "timestamp_ms: 1672850685829 " +
+                "} " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/hello\" } " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "counter { " +
+                        "value: 0.9 " +
+                        exemplar2protoString + " " +
+                    "} " +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("service_time_seconds")
+                .withHelp("total time spent serving")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(0.8)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .addLabel("status", "200")
+                                .build())
+                        .withExemplar(exemplar1)
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(0.9)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .addLabel("status", "500")
+                                .build())
+                        .withExemplar(exemplar2)
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, counter);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
+    @Test
+    public void testCounterMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE my_counter counter\n" +
+                "my_counter_total 1.1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE my_counter_total counter\n" +
+                "my_counter_total 1.1\n";
+        String prometheusProtobuf = "" +
+                "name: \"my_counter_total\" type: COUNTER metric { counter { value: 1.1 } }";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my_counter")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.1).build())
+                .build();
+        assertOpenMetricsText(openMetricsText, counter);
+        assertPrometheusText(prometheusText, counter);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, counter);
+        assertPrometheusTextWithoutCreated(prometheusText, counter);
+        assertPrometheusProtobuf(prometheusProtobuf, counter);
+    }
+
+    @Test
+    public void testGaugeComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE disk_usage_ratio gauge\n" +
+                "# UNIT disk_usage_ratio ratio\n" +
+                "# HELP disk_usage_ratio percentage used\n" +
+                "disk_usage_ratio{device=\"/dev/sda1\"} 0.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "disk_usage_ratio{device=\"/dev/sda2\"} 0.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP disk_usage_ratio percentage used\n" +
+                "# TYPE disk_usage_ratio gauge\n" +
+                "disk_usage_ratio{device=\"/dev/sda1\"} 0.2 " + scrapeTimestamp1s + "\n" +
+                "disk_usage_ratio{device=\"/dev/sda2\"} 0.7 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"disk_usage_ratio\" " +
+                "help: \"percentage used\" " +
+                "type: GAUGE " +
+                "metric { " +
+                    "label { name: \"device\" value: \"/dev/sda1\" } " +
+                    "gauge { value: 0.2 } " +
+                    "timestamp_ms: 1672850685829 " +
+                "} metric { " +
+                    "label { name: \"device\" value: \"/dev/sda2\" } " +
+                    "gauge { value: 0.7 } " +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("disk_usage_ratio")
+                .withHelp("percentage used")
+                .withUnit(new Unit("ratio"))
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("device", "/dev/sda2")
+                                .build())
+                        .withExemplar(exemplar2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(0.2)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("device", "/dev/sda1")
+                                .build())
+                        .withExemplar(exemplar1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gauge);
+        assertPrometheusTextWithoutCreated(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
+    @Test
+    public void testGaugeMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE temperature_centigrade gauge\n" +
+                "temperature_centigrade 22.3\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE temperature_centigrade gauge\n" +
+                "temperature_centigrade 22.3\n";
+        String prometheusProtobuf = "" +
+                "name: \"temperature_centigrade\" type: GAUGE metric { gauge { value: 22.3 } }";
+        GaugeSnapshot gauge = GaugeSnapshot.newBuilder()
+                .withName("temperature_centigrade")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(22.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gauge);
+        assertPrometheusText(prometheusText, gauge);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gauge);
+        assertPrometheusTextWithoutCreated(prometheusText, gauge);
+        assertPrometheusProtobuf(prometheusProtobuf, gauge);
+    }
+
+    @Test
+    public void testSummaryComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "# UNIT http_request_duration_seconds seconds\n" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP http_request_duration_seconds_created request duration\n" +
+                "# TYPE http_request_duration_seconds_created gauge\n" +
+                "http_request_duration_seconds_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "# UNIT http_request_duration_seconds seconds\n" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP http_request_duration_seconds request duration\n" +
+                "# TYPE http_request_duration_seconds summary\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"200\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds_sum{status=\"200\"} 1.2 " + scrapeTimestamp1s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.5\"} 225.3 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.9\"} 240.7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds{status=\"500\",quantile=\"0.95\"} 245.1 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_count{status=\"500\"} 7 " + scrapeTimestamp2s + "\n" +
+                "http_request_duration_seconds_sum{status=\"500\"} 2.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"http_request_duration_seconds\" " +
+                "help: \"request duration\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "summary { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 1.2 " +
+                        "quantile { quantile: 0.5 value: 225.3 } " +
+                        "quantile { quantile: 0.9 value: 240.7 } " +
+                        "quantile { quantile: 0.95 value: 245.1 } " +
+                    "} " +
+                    "timestamp_ms: 1672850685829 " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "summary { " +
+                        "sample_count: 7 " +
+                        "sample_sum: 2.2 " +
+                        "quantile { quantile: 0.5 value: 225.3 } " +
+                        "quantile { quantile: 0.9 value: 240.7 } " +
+                        "quantile { quantile: 0.95 value: 245.1 } " +
+                    "} " + "" +
+                    "timestamp_ms: 1672850585820 " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("http_request_duration_seconds")
+                .withHelp("request duration")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(7)
+                        .withSum(2.2)
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 225.3)
+                                .addQuantile(0.9, 240.7)
+                                .addQuantile(0.95, 245.1)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("status", "500")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(3)
+                        .withSum(1.2)
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 225.3)
+                                .addQuantile(0.9, 240.7)
+                                .addQuantile(0.95, 245.1)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("status", "200")
+                                .build())
+                        .withExemplars(Exemplars.of(exemplar1))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, summary);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryWithoutQuantiles() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "# UNIT latency_seconds seconds\n" +
+                "# HELP latency_seconds latency\n" +
+                "latency_seconds_count 3\n" +
+                "latency_seconds_sum 1.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP latency_seconds latency\n" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 3\n" +
+                "latency_seconds_sum 1.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "help: \"latency\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 1.2 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(3)
+                        .withSum(1.2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryNoCountAndSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds{quantile=\"0.95\"} 200.0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds{quantile=\"0.95\"} 200.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "quantile { quantile: 0.95 value: 200.0 } " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withQuantiles(Quantiles.newBuilder().addQuantile(0.95, 200.0).build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryJustCount() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 1\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count 1\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_count: 1 " +
+                    "} " +
+                "}";
+        //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withCount(1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryJustSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_sum 12.3\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_sum 12.3\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "summary { " +
+                        "sample_sum: 12.3 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withSum(12.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testSummaryEmptyData() throws IOException {
+        // SummaryData can be present but empty (no count, no sum, no quantiles).
+        // This should be treated like no data is present.
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder().build())
+                .build();
+        assertOpenMetricsText("# EOF\n", summary);
+        assertPrometheusText("", summary);
+        assertOpenMetricsTextWithoutCreated("# EOF\n", summary);
+        assertPrometheusTextWithoutCreated("", summary);
+        assertPrometheusProtobuf("", summary);
+    }
+
+    @Test
+    public void testSummaryEmptyAndNonEmpty() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count{path=\"/v2\"} 2\n" +
+                "latency_seconds_sum{path=\"/v2\"} 10.7\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds summary\n" +
+                "latency_seconds_count{path=\"/v2\"} 2\n" +
+                "latency_seconds_sum{path=\"/v2\"} 10.7\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: SUMMARY " +
+                "metric { " +
+                    "label { name: \"path\" value: \"/v2\" } " +
+                    "summary { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 10.7 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        SummarySnapshot summary = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v1"))
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v2"))
+                        .withCount(2)
+                        .withSum(10.7)
+                        .build())
+                .addDataPoint(SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/v3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, summary);
+        assertPrometheusText(prometheusText, summary);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, summary);
+        assertPrometheusTextWithoutCreated(prometheusText, summary);
+        assertPrometheusProtobuf(prometheusProtobuf, summary);
+    }
+
+    @Test
+    public void testClassicHistogramComplete() throws Exception {
+        String openMetricsText = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP response_size_bytes_created help\n" +
+                "# TYPE response_size_bytes_created gauge\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"2.2\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 3 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.1 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"0.0\"} 3 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"2.2\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 5 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"response_size_bytes\" " +
+                "help: \"help\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 3 " +
+                        "sample_sum: 4.1 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: 2.2 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 5 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: 0.0 " +
+                        "} bucket { " +
+                            "cumulative_count: 5 " +
+                            "upper_bound: 2.2 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 5 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("response_size_bytes")
+                .withHelp("help")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(0.0, 3)
+                                .addBucket(2.2, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build())
+                        .withLabels(Labels.of("status", "500"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(4.1)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.2, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 1)
+                                .build())
+                        .withLabels(Labels.of("status", "200"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, histogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicHistogramMinimal() throws Exception {
+        // In OpenMetrics a histogram can have a _count if and only if it has a _sum.
+        // In Prometheus format, a histogram can have a _count without a _sum.
+        String openMetricsText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"request_latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("request_latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 2)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, histogram);
+        assertPrometheusTextWithoutCreated(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicHistogramCountAndSum() throws Exception {
+        String openMetricsText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n" +
+                "request_latency_seconds_sum 3.2\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE request_latency_seconds histogram\n" +
+                "request_latency_seconds_bucket{le=\"+Inf\"} 2\n" +
+                "request_latency_seconds_count 2\n" +
+                "request_latency_seconds_sum 3.2\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"request_latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 3.2 " +
+                        "bucket { " +
+                            "cumulative_count: 2 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot histogram = HistogramSnapshot.newBuilder()
+                .withName("request_latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 2)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, histogram);
+        assertPrometheusText(prometheusText, histogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, histogram);
+        assertPrometheusTextWithoutCreated(prometheusText, histogram);
+        assertPrometheusProtobuf(prometheusProtobuf, histogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE cache_size_bytes gaugehistogram\n" +
+                "# UNIT cache_size_bytes bytes\n" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_created{db=\"items\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_created{db=\"options\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes histogram\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gcount number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gcount gauge\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gsum number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gsum gauge\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_created number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_created gauge\n" +
+                "cache_size_bytes_created{db=\"items\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_created{db=\"options\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE cache_size_bytes gaugehistogram\n" +
+                "# UNIT cache_size_bytes bytes\n" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP cache_size_bytes number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes histogram\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"2.0\"} 3 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"items\",le=\"+Inf\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"2.0\"} 4 " + scrapeTimestamp2s + "\n" +
+                "cache_size_bytes_bucket{db=\"options\",le=\"+Inf\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gcount number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gcount gauge\n" +
+                "cache_size_bytes_gcount{db=\"items\"} 4 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gcount{db=\"options\"} 4 " + scrapeTimestamp2s + "\n" +
+                "# HELP cache_size_bytes_gsum number of bytes in the cache\n" +
+                "# TYPE cache_size_bytes_gsum gauge\n" +
+                "cache_size_bytes_gsum{db=\"items\"} 17.0 " + scrapeTimestamp1s + "\n" +
+                "cache_size_bytes_gsum{db=\"options\"} 18.0 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"cache_size_bytes\" " +
+                "help: \"number of bytes in the cache\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"db\" value: \"items\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 17.0 " +
+                        "bucket { " +
+                            "cumulative_count: 3 " +
+                            "upper_bound: 2.0 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"db\" value: \"options\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 4 " +
+                        "sample_sum: 18.0 " +
+                        "bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: 2.0 " +
+                            exemplar1protoString + " " +
+                        "} bucket { " +
+                            "cumulative_count: 4 " +
+                            "upper_bound: Infinity " +
+                            exemplar2protoString + " " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("cache_size_bytes")
+                .withHelp("number of bytes in the cache")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(17)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.0, 3)
+                                .addBucket(Double.POSITIVE_INFINITY, 1)
+                                .build())
+                        .withLabels(Labels.of("db", "items"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(18)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(2.0, 4)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build()
+                        )
+                        .withLabels(Labels.of("db", "options"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramMinimal() throws IOException {
+        // In OpenMetrics a histogram can have a _count if and only if it has a _sum.
+        // In Prometheus format, a histogram can have a _count without a _sum.
+        String openMetricsText = "" +
+                "# TYPE queue_size_bytes gaugehistogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE queue_size_bytes histogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# TYPE queue_size_bytes_gcount gauge\n" +
+                "queue_size_bytes_gcount 130\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"queue_size_bytes\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "bucket { " +
+                            "cumulative_count: 130 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("queue_size_bytes")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusText, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testClassicGaugeHistogramCountAndSum() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE queue_size_bytes gaugehistogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "queue_size_bytes_gcount 130\n" +
+                "queue_size_bytes_gsum 27000.0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE queue_size_bytes histogram\n" +
+                "queue_size_bytes_bucket{le=\"+Inf\"} 130\n" +
+                "# TYPE queue_size_bytes_gcount gauge\n" +
+                "queue_size_bytes_gcount 130\n" +
+                "# TYPE queue_size_bytes_gsum gauge\n" +
+                "queue_size_bytes_gsum 27000.0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"queue_size_bytes\" " +
+                "type: GAUGE_HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 130 " +
+                        "sample_sum: 27000.0 " +
+                        "bucket { " +
+                            "cumulative_count: 130 " +
+                            "upper_bound: Infinity " +
+                        "} " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot gaugeHistogram = HistogramSnapshot.newBuilder()
+                .asGaugeHistogram()
+                .withName("queue_size_bytes")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(27000)
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(Double.POSITIVE_INFINITY, 130)
+                                .build())
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, gaugeHistogram);
+        assertPrometheusText(prometheusText, gaugeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsText, gaugeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusText, gaugeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, gaugeHistogram);
+    }
+
+    @Test
+    public void testNativeHistogramComplete() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# HELP response_size_bytes_created help\n" +
+                "# TYPE response_size_bytes_created gauge\n" +
+                "response_size_bytes_created{status=\"200\"} " + createdTimestamp1s + " " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_created{status=\"500\"} " + createdTimestamp2s + " " + scrapeTimestamp2s + "\n";
+        String openMetricsTextWithoutCreated = "" +
+                "# TYPE response_size_bytes histogram\n" +
+                "# UNIT response_size_bytes bytes\n" +
+                "# HELP response_size_bytes help\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + " # " + exemplar1String + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheusTextWithoutCreated = "" +
+                "# HELP response_size_bytes help\n" +
+                "# TYPE response_size_bytes histogram\n" +
+                "response_size_bytes_bucket{status=\"200\",le=\"+Inf\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_count{status=\"200\"} 2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_sum{status=\"200\"} 4.2 " + scrapeTimestamp1s + "\n" +
+                "response_size_bytes_bucket{status=\"500\",le=\"+Inf\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_count{status=\"500\"} 55 " + scrapeTimestamp2s + "\n" +
+                "response_size_bytes_sum{status=\"500\"} 3.2 " + scrapeTimestamp2s + "\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"response_size_bytes\" " +
+                "help: \"help\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "label { name: \"status\" value: \"200\" } " +
+                    "timestamp_ms: 1672850685829 " +
+                    "histogram { " +
+                        "sample_count: 2 " +
+                        "sample_sum: 4.2 " +
+                        "bucket { cumulative_count: 2 upper_bound: Infinity " + exemplar2protoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 0 " +
+                        "positive_span { offset: 0 length: 1 } " +
+                        "positive_delta: 2 " +
+                    "} " +
+                "} metric { " +
+                    "label { name: \"status\" value: \"500\" } " +
+                    "timestamp_ms: 1672850585820 " +
+                    "histogram { " +
+                        "sample_count: 55 " + // bucket counts + zero count
+                        "sample_sum: 3.2 " +
+                        "bucket { cumulative_count: 55 upper_bound: Infinity " + exemplar2protoString + " } " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 1 " +
+                        "negative_span { offset: 0 length: 1 } " +
+                        "negative_span { offset: 9 length: 1 } " +
+                        "negative_delta: 1 " +
+                        "negative_delta: -1 " + // span with count 0
+                        "positive_span { offset: 2 length: 3 } " + // span with 3 buckets (indexes 2-4)
+                        "positive_span { offset: 7 length: 1 } " + // span with 1 bucket (index 12)
+                        "positive_span { offset: 9 length: 4 } " + // span with gap of size 1 (indexes 22-25)
+                        "positive_span { offset: 6 length: 5 } " + // span with gap of size 2 (indexes 32-36)
+                        "positive_span { offset: 4 length: 2 } " + // span with gap of size 3 part 1 (indexes 41-42)
+                        "positive_span { offset: 3 length: 2 } " + // span with gap of size 3 part 2 (indexes 46-47)
+                        "positive_delta: 3 " + // index 2, count 3
+                        "positive_delta: 2 " + // index 3, count 5
+                        "positive_delta: -1 " + // index 4, count 4
+                        "positive_delta: 2 " + // index 12, count 6
+                        "positive_delta: -4 " + // index 22, count 2
+                        "positive_delta: -2 " + // index 23, gap
+                        "positive_delta: 1 " + // index 24, count 1
+                        "positive_delta: 2 " + // index 25, count 3
+                        "positive_delta: 1 " + // index 32, count 4
+                        "positive_delta: -1 " + // index 33, count 3
+                        "positive_delta: -3 " + // index 34, gap
+                        "positive_delta: 0 " + // index 35, gap
+                        "positive_delta: 7 " + // index 36, count 7
+                        "positive_delta: -4 " + // index 41, count 3
+                        "positive_delta: 6 " + // index 42, count 9
+                        "positive_delta: -7 " + // index 46, count 2
+                        "positive_delta: -1 " + // index 47, count 1
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
+                .withName("response_size_bytes")
+                .withHelp("help")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(3.2)
+                        .withNativeSchema(5)
+                        .withNativeZeroCount(1)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                // span with 3 buckets
+                                .addBucket(2, 3)
+                                .addBucket(3, 5)
+                                .addBucket(4, 4)
+                                // span with just 1 bucket
+                                .addBucket(12, 6)
+                                // span with gap of size 1
+                                .addBucket(22, 2)
+                                .addBucket(24, 1)
+                                .addBucket(25, 3)
+                                // span with gap of size 2
+                                .addBucket(32, 4)
+                                .addBucket(33, 3)
+                                .addBucket(36, 7)
+                                // span with gap of size 3
+                                .addBucket(41, 3)
+                                .addBucket(42, 9)
+                                .addBucket(46, 2)
+                                .addBucket(47, 1)
+                                .build())
+                        .withNativeBucketsForNegativeValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(0, 1)
+                                .addBucket(10, 0) // bucket with count 0
+                                .build())
+                        .withLabels(Labels.of("status", "500"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withSum(4.2)
+                        .withNativeSchema(5)
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(0, 2)
+                                .build())
+                        .withLabels(Labels.of("status", "200"))
+                        .withExemplars(Exemplars.of(exemplar1, exemplar2))
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, nativeHistogram);
+        assertPrometheusText(prometheusText, nativeHistogram);
+        assertOpenMetricsTextWithoutCreated(openMetricsTextWithoutCreated, nativeHistogram);
+        assertPrometheusTextWithoutCreated(prometheusTextWithoutCreated, nativeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
+    }
+
+    @Test
+    public void testNativeHistogramMinimal() throws IOException {
+        String openMetricsText = "" +
+                "# TYPE latency_seconds histogram\n" +
+                "latency_seconds_bucket{le=\"+Inf\"} 0\n" +
+                "# EOF\n";
+        String prometheusText = "" +
+                "# TYPE latency_seconds histogram\n" +
+                "latency_seconds_bucket{le=\"+Inf\"} 0\n" +
+                "latency_seconds_count 0\n";
+        String prometheusProtobuf = "" +
+                //@formatter:off
+                "name: \"latency_seconds\" " +
+                "type: HISTOGRAM " +
+                "metric { " +
+                    "histogram { " +
+                        "sample_count: 0 " +
+                        "schema: 5 " +
+                        "zero_threshold: 0.0 " +
+                        "zero_count: 0 " +
+                    "} " +
+                "}";
+                //@formatter:on
+        HistogramSnapshot nativeHistogram = HistogramSnapshot.newBuilder()
+                .withName("latency_seconds")
+                .addDataPoint(HistogramSnapshot.HistogramDataPointSnapshot.newBuilder()
+                        .withNativeSchema(5)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetricsText, nativeHistogram);
+        assertPrometheusText(prometheusText, nativeHistogram);
+        assertPrometheusProtobuf(prometheusProtobuf, nativeHistogram);
+    }
+
+    // TODO: Gauge Native Histogram
+
+    @Test
+    public void testInfo() throws IOException {
+        String openMetrics = "" +
+                "# TYPE version info\n" +
+                "# HELP version version information\n" +
+                "version_info{version=\"1.2.3\"} 1\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP version_info version information\n" +
+                "# TYPE version_info gauge\n" +
+                "version_info{version=\"1.2.3\"} 1\n";
+        InfoSnapshot info = InfoSnapshot.newBuilder()
+                .withName("version")
+                .withHelp("version information")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("version", "1.2.3"))
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, info);
+        assertPrometheusText(prometheus, info);
+        assertOpenMetricsTextWithoutCreated(openMetrics, info);
+        assertPrometheusTextWithoutCreated(prometheus, info);
+    }
+
+    @Test
+    public void testStateSetComplete() throws IOException {
+        String openMetrics = "" +
+                "# TYPE state stateset\n" +
+                "# HELP state complete state set example\n" +
+                "state{env=\"dev\",state=\"state1\"} 1 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"dev\",state=\"state2\"} 0 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"prod\",state=\"state1\"} 0 " + scrapeTimestamp2s + "\n" +
+                "state{env=\"prod\",state=\"state2\"} 1 " + scrapeTimestamp2s + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP state complete state set example\n" +
+                "# TYPE state gauge\n" +
+                "state{env=\"dev\",state=\"state1\"} 1 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"dev\",state=\"state2\"} 0 " + scrapeTimestamp1s + "\n" +
+                "state{env=\"prod\",state=\"state1\"} 0 " + scrapeTimestamp2s + "\n" +
+                "state{env=\"prod\",state=\"state2\"} 1 " + scrapeTimestamp2s + "\n";
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("state")
+                .withHelp("complete state set example")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("env", "prod"))
+                        .addState("state1", false)
+                        .addState("state2", true)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("env", "dev"))
+                        .addState("state2", false)
+                        .addState("state1", true)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, stateSet);
+        assertPrometheusText(prometheus, stateSet);
+        assertOpenMetricsTextWithoutCreated(openMetrics, stateSet);
+        assertPrometheusTextWithoutCreated(prometheus, stateSet);
+    }
+
+    @Test
+    public void testStateSetMinimal() throws IOException {
+        String openMetrics = "" +
+                "# TYPE state stateset\n" +
+                "state{state=\"a\"} 1\n" +
+                "state{state=\"bb\"} 0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE state gauge\n" +
+                "state{state=\"a\"} 1\n" +
+                "state{state=\"bb\"} 0\n";
+        StateSetSnapshot stateSet = StateSetSnapshot.newBuilder()
+                .withName("state")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("a", true)
+                        .addState("bb", false)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, stateSet);
+        assertPrometheusText(prometheus, stateSet);
+        assertOpenMetricsTextWithoutCreated(openMetrics, stateSet);
+        assertPrometheusTextWithoutCreated(prometheus, stateSet);
+    }
+
+    @Test
+    public void testUnknownComplete() throws IOException {
+        String openMetrics = "" +
+                "# TYPE my_special_thing_bytes unknown\n" +
+                "# UNIT my_special_thing_bytes bytes\n" +
+                "# HELP my_special_thing_bytes help message\n" +
+                "my_special_thing_bytes{env=\"dev\"} 0.2 " + scrapeTimestamp1s + " # " + exemplar1String + "\n" +
+                "my_special_thing_bytes{env=\"prod\"} 0.7 " + scrapeTimestamp2s + " # " + exemplar2String + "\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP my_special_thing_bytes help message\n" +
+                "# TYPE my_special_thing_bytes untyped\n" +
+                "my_special_thing_bytes{env=\"dev\"} 0.2 " + scrapeTimestamp1s + "\n" +
+                "my_special_thing_bytes{env=\"prod\"} 0.7 " + scrapeTimestamp2s + "\n";
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("my_special_thing_bytes")
+                .withHelp("help message")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.7)
+                        .withLabels(Labels.of("env", "prod"))
+                        .withExemplar(exemplar2)
+                        .withScrapeTimestampMillis(scrapeTimestamp2)
+                        .build())
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.2)
+                        .withLabels(Labels.of("env", "dev"))
+                        .withExemplar(exemplar1)
+                        .withScrapeTimestampMillis(scrapeTimestamp1)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertOpenMetricsTextWithoutCreated(openMetrics, unknown);
+        assertPrometheusTextWithoutCreated(prometheus, unknown);
+    }
+
+    @Test
+    public void testUnknownMinimal() throws IOException {
+        String openMetrics = "" +
+                "# TYPE other unknown\n" +
+                "other 22.3\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE other untyped\n" +
+                "other 22.3\n";
+        UnknownSnapshot unknown = UnknownSnapshot.newBuilder()
+                .withName("other")
+                .addDataPoint(UnknownDataPointSnapshot.newBuilder()
+                        .withValue(22.3)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, unknown);
+        assertPrometheusText(prometheus, unknown);
+        assertOpenMetricsTextWithoutCreated(openMetrics, unknown);
+        assertPrometheusTextWithoutCreated(prometheus, unknown);
+    }
+
+    @Test
+    public void testHelpEscape() throws IOException {
+        String openMetrics = "" +
+                "# TYPE test counter\n" +
+                "# HELP test Some text and \\n some \\\" escaping\n" +
+                "test_total 1.0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# HELP test_total Some text and \\n some \" escaping\n" +
+                "# TYPE test_total counter\n" +
+                "test_total 1.0\n";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("test")
+                .withHelp("Some text and \n some \" escaping") // example from https://openMetrics.io
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        assertOpenMetricsText(openMetrics, counter);
+        assertPrometheusText(prometheus, counter);
+        assertOpenMetricsTextWithoutCreated(openMetrics, counter);
+        assertPrometheusTextWithoutCreated(prometheus, counter);
+    }
+
+    @Test
+    public void testLabelValueEscape() throws IOException {
+        String openMetrics = "" +
+                "# TYPE test counter\n" +
+                "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n" +
+                "# EOF\n";
+        String prometheus = "" +
+                "# TYPE test_total counter\n" +
+                "test_total{a=\"x\",b=\"escaping\\\" example \\n \"} 1.0\n";
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("test")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        // example from https://openMetrics.io
+                        .withLabels(Labels.of("a", "x", "b", "escaping\" example \n "))
+                        .withValue(1.0)
+                        .build())
+                .build();
+        assertOpenMetricsText(openMetrics, counter);
+        assertPrometheusText(prometheus, counter);
+    }
+
+    private void assertOpenMetricsText(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertOpenMetricsTextWithoutCreated(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(false, true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusText(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        PrometheusTextFormatWriter writer = new PrometheusTextFormatWriter(true);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusTextWithoutCreated(String expected, MetricSnapshot snapshot) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        PrometheusTextFormatWriter writer = new PrometheusTextFormatWriter(false);
+        writer.write(out, MetricSnapshots.of(snapshot));
+        Assert.assertEquals(expected, out.toString());
+    }
+
+    private void assertPrometheusProtobuf(String expected, MetricSnapshot snapshot) {
+        PrometheusProtobufWriter writer = new PrometheusProtobufWriter();
+        Metrics.MetricFamily protobufData = writer.convert(snapshot);
+        String actual = TextFormat.printer().shortDebugString(protobufData);
+        Assert.assertEquals(expected, actual);
+    }
+}G     u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  7prometheus-metrics-exposition-formats/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-exposition-formats%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (b1f06cc23e5501051fb14030bbfe6061380605b6j   prometheus-metrics-model/pom.xmlj  addedj  K-j  K j  K-j  zhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-model</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Model</name>
+    <description>
+        Data model for read-only immutable Prometheus metrics snapshots.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j  (b0fba2db102eb9c6ff775289363c8832f7f2ecddj  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javaj  addedj  K*j  K j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+
+/**
+ * To be registered with the Prometheus collector registry.
+ * See <i>Overall Structure</i> on
+ * <a href="https://prometheus.io/docs/instrumenting/writing_clientlibs/">https://prometheus.io/docs/instrumenting/writing_clientlibs/</a>.
+ */
+@FunctionalInterface
+public interface Collector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshot collect();
+
+    /**
+     * Like {@link #collect()}, but returns {@code null} if {@code includedNames.test(name)} is {@code false}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting the snapshot and then discarding it.
+     */
+    default MetricSnapshot collect(Predicate<String> includedNames) {
+        MetricSnapshot result = collect();
+        if (includedNames.test(result.getMetadata().getName())) {
+            return result;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Override this and return {@code null} if a collector does not have a constant name (name may change between scrapes).
+     */
+    default String getName() {
+        return collect().getMetadata().getName();
+    }
+}u}(j  (e8e8c16217461086dd173575795e6e8f6e4a01c5j  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MetricNameFilter.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,196 @@
+package io.prometheus.metrics.model.registry;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.function.Predicate;
+
+import static java.util.Collections.unmodifiableCollection;
+
+/**
+ * Filter samples (i.e. time series) by name.
+ */
+public class MetricNameFilter implements Predicate<String> {
+
+    /**
+     * For convenience, a filter that allows all names.
+     */
+    public static final Predicate<String> ALLOW_ALL = name -> true;
+
+    private final Collection<String> nameIsEqualTo;
+    private final Collection<String> nameIsNotEqualTo;
+    private final Collection<String> nameStartsWith;
+    private final Collection<String> nameDoesNotStartWith;
+
+    private MetricNameFilter(Collection<String> nameIsEqualTo, Collection<String> nameIsNotEqualTo, Collection<String> nameStartsWith, Collection<String> nameDoesNotStartWith) {
+        this.nameIsEqualTo = unmodifiableCollection(new ArrayList<>(nameIsEqualTo));
+        this.nameIsNotEqualTo = unmodifiableCollection(new ArrayList<>(nameIsNotEqualTo));
+        this.nameStartsWith = unmodifiableCollection(new ArrayList<>(nameStartsWith));
+        this.nameDoesNotStartWith = unmodifiableCollection(new ArrayList<>(nameDoesNotStartWith));
+    }
+
+    @Override
+    public boolean test(String sampleName) {
+        return matchesNameEqualTo(sampleName)
+                && !matchesNameNotEqualTo(sampleName)
+                && matchesNameStartsWith(sampleName)
+                && !matchesNameDoesNotStartWith(sampleName);
+    }
+
+    private boolean matchesNameEqualTo(String metricName) {
+        if (nameIsEqualTo.isEmpty()) {
+            return true;
+        }
+        for (String name : nameIsEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameNotEqualTo(String metricName) {
+        if (nameIsNotEqualTo.isEmpty()) {
+            return false;
+        }
+        for (String name : nameIsNotEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameStartsWith(String metricName) {
+        if (nameStartsWith.isEmpty()) {
+            return true;
+        }
+        for (String prefix : nameStartsWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameDoesNotStartWith(String metricName) {
+        if (nameDoesNotStartWith.isEmpty()) {
+            return false;
+        }
+        for (String prefix : nameDoesNotStartWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final Collection<String> nameEqualTo = new ArrayList<>();
+        private final Collection<String> nameNotEqualTo = new ArrayList<>();
+        private final Collection<String> nameStartsWith = new ArrayList<>();
+        private final Collection<String> nameDoesNotStartWith = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        /**
+         * @see #nameMustBeEqualTo(Collection)
+         */
+        public Builder nameMustBeEqualTo(String... names) {
+            return nameMustBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * Only samples with one of the {@code names} will be included.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to retrieve all samples from a histogram, you must include the
+         * '_count', '_sum' and '_bucket' names.
+         * <p>
+         * This method should be used by HTTP exporters to implement the {@code ?name[]=} URL parameters.
+         *
+         * @param names empty means no restriction.
+         */
+        public Builder nameMustBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotBeEqualTo(Collection)
+         */
+        public Builder nameMustNotBeEqualTo(String... names) {
+            return nameMustNotBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * All samples that are not in {@code names} will be excluded.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to exclude all samples from a histogram, you must exclude the
+         * '_count', '_sum' and '_bucket' names.
+         *
+         * @param names empty means no name will be excluded.
+         */
+        public Builder nameMustNotBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameNotEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustStartWith(Collection)
+         */
+        public Builder nameMustStartWith(String... prefixes) {
+            return nameMustStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Only samples whose name starts with one of the {@code prefixes} will be included.
+         *
+         * @param prefixes empty means no restriction.
+         */
+        public Builder nameMustStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameStartsWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotStartWith(Collection)
+         */
+        public Builder nameMustNotStartWith(String... prefixes) {
+            return nameMustNotStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Samples with names starting with one of the {@code prefixes} will be excluded.
+         *
+         * @param prefixes empty means no time series will be excluded.
+         */
+        public Builder nameMustNotStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameDoesNotStartWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        public MetricNameFilter build() {
+            return new MetricNameFilter(nameEqualTo, nameNotEqualTo, nameStartsWith, nameDoesNotStartWith);
+        }
+    }
+}u}(j  (3fd56e493c24336d9109940b2c061941ed86590dj  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javaj  addedj  K,j  K j  K,j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XO  @@ -0,0 +1,44 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * Like {@link Collector}, but collecting multiple Snapshots at once.
+ */
+@FunctionalInterface
+public interface MultiCollector {
+
+    /**
+     * Called when the Prometheus server scrapes metrics.
+     */
+    MetricSnapshots collect();
+
+    /**
+     * Like {@link #collect()}, but returns only the snapshots where {@code includedNames.test(name)} is {@code true}.
+     * <p>
+     * Override this if there is a more efficient way than first collecting all snapshot and then discarding the excluded ones.
+     */
+    default MetricSnapshots collect(Predicate<String> includedNames) {
+        MetricSnapshots allSnapshots = collect();
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (MetricSnapshot snapshot : allSnapshots) {
+            if (includedNames.test(snapshot.getMetadata().getName())) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    /**
+     * Override this and return an empty list if the MultiCollector does not return a constant list of names
+     * (names may be added / removed between scrapes).
+     */
+    default List<String> getNames() {
+        return collect().stream().map(snapshot -> snapshot.getMetadata().getName()).collect(Collectors.toList());
+    }
+}u}(j  (858a1b37d71776c535fe1d3ec15dedf3d9e79ca1j  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javaj  addedj  K_j  K j  K_j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,95 @@
+package io.prometheus.metrics.model.registry;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.function.Predicate;
+
+public class PrometheusRegistry {
+
+    public static final PrometheusRegistry defaultRegistry = new PrometheusRegistry();
+
+    private final Set<String> names = ConcurrentHashMap.newKeySet();
+    private final List<Collector> collectors = new CopyOnWriteArrayList<>();
+    private final List<MultiCollector> multiCollectors = new CopyOnWriteArrayList<>();
+
+    public void register(Collector collector) {
+        String name = collector.getName();
+        if (!names.add(name)) {
+            throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+        }
+        collectors.add(collector);
+    }
+
+    public void register(MultiCollector collector) {
+        for (String name : collector.getNames()) {
+            if (!names.add(name)) {
+                throw new IllegalStateException("Can't register " + name + " because that name is already registered.");
+            }
+        }
+        multiCollectors.add(collector);
+    }
+
+    public void unregister(Collector collector) {
+        collectors.remove(collector);
+        names.remove(collector.getName());
+    }
+
+    public void unregister(MultiCollector collector) {
+        multiCollectors.remove(collector);
+        for (String name : collector.getNames()) {
+            names.remove(name);
+        }
+    }
+
+    public MetricSnapshots scrape() {
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            result.addMetricSnapshot(collector.collect());
+        }
+        for (MultiCollector collector : multiCollectors) {
+            for (MetricSnapshot snapshot : collector.collect()) {
+                result.addMetricSnapshot(snapshot);
+            }
+        }
+        return result.build();
+    }
+
+    public MetricSnapshots scrape(Predicate<String> includedNames) {
+        if (includedNames == null) {
+            return scrape();
+        }
+        MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
+        for (Collector collector : collectors) {
+            String name = collector.getName();
+            if (name == null || includedNames.test(name)) {
+                MetricSnapshot snapshot = collector.collect(includedNames);
+                if (snapshot != null) {
+                    result.addMetricSnapshot(snapshot);
+                }
+            }
+        }
+        for (MultiCollector collector : multiCollectors) {
+            List<String> names = collector.getNames();
+            boolean excluded = true; // the multi-collector is excluded unless at least one name matches
+            for (String name : names) {
+                if (includedNames.test(name)) {
+                    excluded = false;
+                    break;
+                }
+            }
+            if (!excluded) {
+                for (MetricSnapshot snapshot : collector.collect(includedNames)) {
+                    if (snapshot != null) {
+                        result.addMetricSnapshot(snapshot);
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+}u}(j  (6ca2f90ec13b9342a600f207a28dad041ebedd23j  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucket.javaj  addedj  K*j  K j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucket.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X>  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Helper class for iterating over {@link ClassicHistogramBuckets}.
+ * Note that the {@code count} is <i>not</i> cumulative.
+ */
+public class ClassicHistogramBucket implements Comparable<ClassicHistogramBucket> {
+
+    private final long count; // not cumulative
+    private final double upperBound;
+
+    public ClassicHistogramBucket(double upperBound, long count) {
+        this.count = count;
+        this.upperBound = upperBound;
+        if (Double.isNaN(upperBound)) {
+            throw new IllegalArgumentException("Cannot use NaN as an upper bound for a histogram bucket");
+        }
+        if (count < 0) {
+            throw new IllegalArgumentException(count + ": " + ClassicHistogramBuckets.class.getSimpleName() + " cannot have a negative count");
+        }
+    }
+
+    public long getCount() {
+        return count;
+    }
+
+    public double getUpperBound() {
+        return upperBound;
+    }
+
+    /**
+     * For sorting a list of buckets by upper bound.
+     */
+    @Override
+    public int compareTo(ClassicHistogramBucket other) {
+        int result = Double.compare(upperBound, other.upperBound);
+        if (result != 0) {
+            return result;
+        }
+        return Long.compare(count, other.count);
+    }
+}u}(j  (cd20eb4e873decfca673399bdedf94d06ba15597j  iprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBuckets.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBuckets.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XT&  @@ -0,0 +1,223 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable container for histogram buckets with fixed bucket boundaries.
+ * Note that the counts are <i>not</i> cumulative.
+ */
+public class ClassicHistogramBuckets implements Iterable<ClassicHistogramBucket> {
+
+    /**
+     * Used in native histograms to indicate that no classic histogram buckets are present.
+     */
+    public static final ClassicHistogramBuckets EMPTY = new ClassicHistogramBuckets(new double[]{}, new long[]{});
+
+    private final double[] upperBounds;
+    private final long[] counts; // not cumulative
+
+    private ClassicHistogramBuckets(double[] upperBounds, long[] counts) {
+        this.upperBounds = upperBounds;
+        this.counts = counts;
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    For each count, {@link Number#longValue()} is called to get the value.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(List<Double> upperBounds, List<? extends Number> counts) {
+        double[] upperBoundsCopy = new double[upperBounds.size()];
+        for (int i = 0; i < upperBounds.size(); i++) {
+            upperBoundsCopy[i] = upperBounds.get(i);
+        }
+        long[] countsCopy = new long[counts.size()];
+        for (int i = 0; i < counts.size(); i++) {
+            countsCopy[i] = counts.get(i).longValue();
+        }
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    For each count, {@link Number#longValue()} is called to get the value.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(double[] upperBounds, Number[] counts) {
+        double[] upperBoundsCopy = Arrays.copyOf(upperBounds, upperBounds.length);
+        long[] countsCopy = new long[counts.length];
+        for (int i = 0; i < counts.length; i++) {
+            countsCopy[i] = counts[i].longValue();
+        }
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@link ClassicHistogramBuckets#newBuilder()}.
+     * <p>
+     * This method will create a copy of upperBounds and counts.
+     *
+     * @param upperBounds must have the same length as counts. Must not contain duplicates.
+     *                    Must contain at least {@link Double#POSITIVE_INFINITY} for the {@code +Inf} bucket.
+     *                    An upper bound must not be {@link Double#NaN}.
+     *                    The upperBounds array does not need to be sorted.
+     * @param counts      must have the same length as {@code upperBounds}.
+     *                    The entry at index {@code i} is the count for the {@code upperBound} at index {@code i}.
+     *                    Counts are <i>not</i> cumulative. Counts must not be negative.
+     */
+    public static ClassicHistogramBuckets of(double[] upperBounds, long[] counts) {
+        double[] upperBoundsCopy = Arrays.copyOf(upperBounds, upperBounds.length);
+        long[] countsCopy = Arrays.copyOf(counts, counts.length);
+        sortAndValidate(upperBoundsCopy, countsCopy);
+        return new ClassicHistogramBuckets(upperBoundsCopy, countsCopy);
+    }
+
+    private static void sortAndValidate(double[] upperBounds, long[] counts) {
+        if (upperBounds.length != counts.length) {
+            throw new IllegalArgumentException("upperBounds.length == " + upperBounds.length + " but counts.length == " + counts.length + ". Expected the same length.");
+        }
+        sort(upperBounds, counts);
+        validate(upperBounds, counts);
+    }
+
+    private static void sort(double[] upperBounds, long[] counts) {
+        // Bubblesort. Should be efficient here as in most cases upperBounds is already sorted.
+        int n = upperBounds.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (upperBounds[j] > upperBounds[j + 1]) {
+                    swap(j, j + 1, upperBounds, counts);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, double[] upperBounds, long[] counts) {
+        double tmpDouble = upperBounds[j];
+        upperBounds[j] = upperBounds[i];
+        upperBounds[i] = tmpDouble;
+        long tmpLong = counts[j];
+        counts[j] = counts[i];
+        counts[i] = tmpLong;
+    }
+
+    private static void validate(double[] upperBounds, long[] counts) {
+        // Preconditions:
+        // * upperBounds sorted
+        // * upperBounds and counts have the same length
+        if (upperBounds.length == 0) {
+            throw new IllegalArgumentException(ClassicHistogramBuckets.class.getSimpleName() + " cannot be empty. They must contain at least the +Inf bucket.");
+        }
+        if (upperBounds[upperBounds.length - 1] != Double.POSITIVE_INFINITY) {
+            throw new IllegalArgumentException(ClassicHistogramBuckets.class.getSimpleName() + " must contain the +Inf bucket.");
+        }
+        for (int i = 0; i < upperBounds.length; i++) {
+            if (Double.isNaN(upperBounds[i])) {
+                throw new IllegalArgumentException("Cannot use NaN as an upper bound in " + ClassicHistogramBuckets.class.getSimpleName());
+            }
+            if (counts[i] < 0) {
+                throw new IllegalArgumentException("Counts in " + ClassicHistogramBuckets.class.getSimpleName() + " cannot be negative.");
+            }
+            if (i > 0) {
+                if (upperBounds[i - 1] == upperBounds[i]) {
+                    throw new IllegalArgumentException("Duplicate upper bound " + upperBounds[i]);
+                }
+            }
+        }
+    }
+
+    public int size() {
+        return upperBounds.length;
+    }
+
+    public double getUpperBound(int i) {
+        return upperBounds[i];
+    }
+
+    /**
+     * The count is <i>not</i> cumulative.
+     */
+    public long getCount(int i) {
+        return counts[i];
+    }
+
+    public boolean isEmpty() {
+        return this.upperBounds.length == 0;
+    }
+
+    private List<ClassicHistogramBucket> asList() {
+        List<ClassicHistogramBucket> result = new ArrayList<>(size());
+        for (int i = 0; i < upperBounds.length; i++) {
+            result.add(new ClassicHistogramBucket(upperBounds[i], counts[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public Iterator<ClassicHistogramBucket> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<ClassicHistogramBucket> stream() {
+        return asList().stream();
+    }
+
+    /**
+     * To create new {@link ClassicHistogramBuckets}, you can either use one of the static {@code of(...)} methods,
+     * or use {@code newBuilder()}.
+     */
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private final List<Double> upperBounds = new ArrayList<>();
+        private final List<Long> counts = new ArrayList<>();
+
+        private Builder() {}
+
+        /**
+         * Must be called at least once for the {@link Double#POSITIVE_INFINITY} bucket.
+         */
+        public Builder addBucket(double upperBound, long count) {
+            upperBounds.add(upperBound);
+            counts.add(count);
+            return this;
+        }
+
+        /**
+         * Will throw an {@link IllegalArgumentException} if the {@link Double#POSITIVE_INFINITY} bucket is missing.
+         */
+        public ClassicHistogramBuckets build() {
+            return ClassicHistogramBuckets.of(upperBounds, counts);
+        }
+    }
+}u}(j  (e994e951357da20776fd49fd0f3f5decf502c078j  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/CounterSnapshot.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,148 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Counter.
+ */
+public class CounterSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link CounterSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link CounterSnapshot#newBuilder()}.
+     *
+     * @param metadata the metric name in metadata must not include the {@code _total} suffix.
+     *                 See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public CounterSnapshot(MetricMetadata metadata, Collection<CounterDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<CounterDataPointSnapshot> getData() {
+        return (List<CounterDataPointSnapshot>) data;
+    }
+
+    public static class CounterDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link CounterDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link CounterDataPointSnapshot#newBuilder()}.
+         *
+         * @param value                  the counter value. Must not be negative.
+         * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar               may be null.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                               (this specific set of labels) was created (or reset to zero).
+         *                               It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis) {
+            this(value, labels, exemplar, createdTimestampMillis, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public CounterDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long createdTimestampMillis, long scrapeTimestampMillis) {
+            super(labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+            validate();
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May be {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        protected void validate() {
+            if (value < 0.0) {
+                throw new IllegalArgumentException(value + ": counters cannot have a negative value");
+            }
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+            private long createdTimestampMillis = 0L;
+
+            private Builder() {
+            }
+
+            /**
+             * Counter value. This is required. The value must not be negative.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public Builder withCreatedTimestampMillis(long createdTimestampMillis) {
+                this.createdTimestampMillis = createdTimestampMillis;
+                return this;
+            }
+
+            public CounterDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new CounterDataPointSnapshot(value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<CounterDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(CounterDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public CounterSnapshot build() {
+            return new CounterSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (b4241e2e4263f7038abcb79d763ca090f48176cfj  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DataPointSnapshot.javaj  addedj  KRj  K j  KRj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDataPointSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.snapshots;
+
+public abstract class DataPointSnapshot {
+    private final Labels labels;
+    private final long createdTimestampMillis;
+    private final long scrapeTimestampMillis;
+
+    protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+        this.labels = labels;
+        this.createdTimestampMillis = createdTimestampMillis;
+        this.scrapeTimestampMillis = scrapeTimestampMillis;
+        validate();
+    }
+
+    private void validate() {
+        if (labels == null) {
+            throw new IllegalArgumentException("Labels cannot be null. Use Labels.EMPTY if there are no labels.");
+        }
+        if (createdTimestampMillis < 0) {
+            throw new IllegalArgumentException("Created timestamp cannot be negative. Use 0 if the metric doesn't have a created timestamp.");
+        }
+        if (scrapeTimestampMillis < 0) {
+            throw new IllegalArgumentException("Scrape timestamp cannot be negative. Use 0 to indicate that the Prometheus server should set the scrape timestamp.");
+        }
+        if (hasCreatedTimestamp() && hasScrapeTimestamp()) {
+            if (scrapeTimestampMillis < createdTimestampMillis) {
+                throw new IllegalArgumentException("The scrape timestamp cannot be before the created timestamp");
+            }
+        }
+    }
+
+    public Labels getLabels() {
+        return labels;
+    }
+
+    public boolean hasScrapeTimestamp() {
+        return scrapeTimestampMillis != 0L;
+    }
+
+    /**
+     * This will only return a reasonable value if {@link #hasScrapeTimestamp()} is true.
+     */
+    public long getScrapeTimestampMillis() {
+        return scrapeTimestampMillis;
+    }
+
+    public boolean hasCreatedTimestamp() {
+        return createdTimestampMillis != 0L;
+    }
+
+    /**
+     * This will only return a reasonable value if {@link #hasCreatedTimestamp()} is true.
+     * Some metrics like Gauge don't have created timestamps. For these metrics {@link #hasCreatedTimestamp()}
+     * is always false.
+     */
+    public long getCreatedTimestampMillis() {
+        return createdTimestampMillis;
+    }
+
+    public static abstract class Builder<T extends Builder<T>> {
+
+        protected Labels labels = Labels.EMPTY;
+        protected long scrapeTimestampMillis = 0L;
+
+        public T withLabels(Labels labels) {
+            this.labels = labels;
+            return self();
+        }
+
+        /**
+         * In most cases you should not need to set a timestamp, because the timestamp of a Prometheus metric should
+         * usually be set by the Prometheus server during scraping.
+         * Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public T withScrapeTimestampMillis(long scrapeTimestampMillis) {
+            this.scrapeTimestampMillis = scrapeTimestampMillis;
+            return self();
+        }
+
+        protected abstract T self();
+    }
+}u}(j  (5536f01e9ad09822a4a631ba235a552fbb238d3bj  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javaj  addedj  KYj  K j  KYj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X}  @@ -0,0 +1,89 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Common base class for histogram and summary data.
+ * Histograms and Summaries represent distributions, like a latency distribution or a distribution
+ * of request sizes in Bytes.
+ */
+public abstract class DistributionDataPointSnapshot extends DataPointSnapshot {
+    private final long count; // optional, negative value means no count.
+    private final double sum; // optional, Double.NaN means no sum.
+    private final Exemplars exemplars; // optional, Exemplars.EMPTY means no Exemplars.
+
+    /**
+     * See JavaDoc of the child classes.
+     */
+    protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) {
+        super(labels, createdTimestampMillis, scrapeTimestampMillis);
+        this.count = count;
+        this.sum = sum;
+        this.exemplars = exemplars == null ? Exemplars.EMPTY : exemplars;
+        validate();
+    }
+
+    private void validate() {
+        // If a histogram or summary observes negative values the sum could be negative.
+        // According to OpenMetrics sum should be omitted in that case, but we don't enforce this here.
+    }
+
+    public boolean hasCount() {
+        return count >= 0;
+    }
+
+    public boolean hasSum() {
+        return !Double.isNaN(sum);
+    }
+
+    /**
+     * This will return garbage if {@link #hasCount()} is {@code false}.
+     */
+    public long getCount() {
+        return count;
+    }
+
+    /**
+     * This will return garbage if {@link #hasSum()} is {@code false}.
+     */
+    public double getSum() {
+        return sum;
+    }
+
+    /**
+     * May be {@link Exemplars#EMPTY}, but will never be {@code null}.
+     */
+    public Exemplars getExemplars() {
+        return exemplars;
+    }
+
+    static abstract class Builder<T extends Builder<T>> extends DataPointSnapshot.Builder<T> {
+
+        protected long count = -1;
+        protected double sum = Double.NaN;
+        protected long createdTimestampMillis = 0L;
+        protected Exemplars exemplars = Exemplars.EMPTY;
+
+        /**
+         * Count can be explicitly set on summaries (this is a public method for summary metrics),
+         * and it is set implicitly on histograms (derived from the bucket counts).
+         */
+        protected T withCount(long count) {
+            this.count = count;
+            return self();
+        }
+
+        public T withSum(double sum) {
+            this.sum = sum;
+            return self();
+        }
+
+        public T withExemplars(Exemplars exemplars) {
+            this.exemplars = exemplars;
+            return self();
+        }
+
+        public T withCreatedTimestampMillis(long createdTimestampMillis) {
+            this.createdTimestampMillis = createdTimestampMillis;
+            return self();
+        }
+    }
+}u}(j  (c9865aac5db7099759f9ccfcad05e3309cd1d938j  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplar.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplar.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,129 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Immutable representation of an Exemplar.
+ */
+public class Exemplar {
+
+    /**
+     * Label name for trace id.
+     */
+    public static final String TRACE_ID = "trace_id";
+
+    /**
+     * Label name for span id.
+     */
+    public static final String SPAN_ID = "span_id";
+
+    private final double value;
+    private final Labels labels;
+    private final long timestampMillis;
+
+    /**
+     * To create a new {@link Exemplar}, you can either call the constructor directly
+     * or use the Builder with {@link Exemplar#newBuilder()}.
+     *
+     * @param value           the observed value. This is required.
+     * @param labels          in most cases the labels will contain the {@link #TRACE_ID} and {@link #SPAN_ID}.
+     *                        Must not be {@code null}. Use {@link Labels#EMPTY} if no labels are present.
+     * @param timestampMillis timestamp when the value was observed. Optional. Use 0L if not available.
+     */
+    public Exemplar(double value, Labels labels, long timestampMillis) {
+        if (labels == null) {
+            throw new NullPointerException("Labels cannot be null. Use Labels.EMPTY.");
+        }
+        this.value = value;
+        this.labels = labels;
+        this.timestampMillis = timestampMillis;
+    }
+
+    public double getValue() {
+        return value;
+    }
+
+    /**
+     * In most cases labels will contain {@link #TRACE_ID} and {@link #SPAN_ID}, but this is not required.
+     * May be {@link Labels#EMPTY}, but may not be {@code null}.
+     */
+    public Labels getLabels() {
+        return labels;
+    }
+
+    public boolean hasTimestamp() {
+        return timestampMillis != 0L;
+    }
+
+    /**
+     * Will return garbage if {@link #hasTimestamp()} is {@code false}.
+     */
+    public long getTimestampMillis() {
+        return timestampMillis;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private Double value = null;
+        private Labels labels = Labels.EMPTY;
+        private String traceId = null;
+        private String spanId = null;
+        private long timestampMillis = 0L;
+
+        private Builder() {
+        }
+
+        public Builder withValue(double value) {
+            this.value = value;
+            return this;
+        }
+
+        public Builder withTraceId(String traceId) {
+            this.traceId = traceId;
+            return this;
+        }
+
+        public Builder withSpanId(String spanId) {
+            this.spanId = spanId;
+            return this;
+        }
+
+        public Builder withLabels(Labels labels) {
+            if (labels == null) {
+                throw new NullPointerException();
+            }
+            this.labels = labels;
+            return this;
+        }
+
+        public Builder withTimestampMillis(long timestampMillis) {
+            this.timestampMillis = timestampMillis;
+            return this;
+        }
+
+        /**
+         * @throws IllegalStateException if {@link #withValue(double)} wasn't called.
+         */
+        public Exemplar build() {
+            if (value == null) {
+                throw new IllegalStateException("cannot build an Exemplar without a value");
+            }
+            Labels allLabels;
+            if (traceId != null && spanId != null) {
+                allLabels = Labels.of(TRACE_ID, traceId, SPAN_ID, spanId);
+            } else if (traceId != null) {
+                allLabels = Labels.of(TRACE_ID, traceId);
+            } else if (spanId != null) {
+                allLabels = Labels.of(SPAN_ID, spanId);
+            } else {
+                allLabels = Labels.EMPTY;
+            }
+            if (!labels.isEmpty()) {
+                allLabels = allLabels.merge(labels);
+            }
+            return new Exemplar(value, allLabels, timestampMillis);
+        }
+    }
+}u}(j  (641d0e57325f2ceb316a457179337d7b13e47e7bj  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Exemplars.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplars.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,128 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Immutable container for Exemplars.
+ * <p>
+ * This is currently backed by a {@code List<Exemplar>}. May be refactored later to use a more efficient data structure.
+ */
+public class Exemplars implements Iterable<Exemplar> {
+
+    /**
+     * EMPTY means no Exemplars.
+     */
+    public static final Exemplars EMPTY = new Exemplars(Collections.emptyList());
+    private final List<Exemplar> exemplars;
+
+    private Exemplars(Collection<Exemplar> exemplars) {
+        this.exemplars = Collections.unmodifiableList(new ArrayList<>(exemplars));
+    }
+
+    /**
+     * Create a new Exemplars instance.
+     * You can either create Exemplars with one of the static {@code Exemplars.of(...)} methods,
+     * or you can use the {@link Exemplars#newBuilder()}.
+     *
+     * @param exemplars a copy of the exemplars collection will be created.
+     */
+    public static Exemplars of(Collection<Exemplar> exemplars) {
+        return new Exemplars(exemplars);
+    }
+
+    /**
+     * Create a new Exemplars instance.
+     * You can either create Exemplars with one of the static {@code Exemplars.of(...)} methods,
+     * or you can use the {@link Exemplars#newBuilder()}.
+     *
+     * @param exemplars a copy of the exemplars array will be created.
+     */
+    public static Exemplars of(Exemplar... exemplars) {
+        return new Exemplars(Arrays.asList(exemplars));
+    }
+
+    @Override
+    public Iterator<Exemplar> iterator() {
+        return exemplars.iterator();
+    }
+
+    public int size() {
+        return exemplars.size();
+    }
+
+    public Exemplar get(int index) {
+        return exemplars.get(index);
+    }
+
+    /**
+     * This is used by classic histograms to find an exemplar with a value between lowerBound and upperBound.
+     */
+    public Exemplar get(double lowerBound, double upperBound) {
+        for (int i = 0; i < exemplars.size(); i++) {
+            Exemplar exemplar = exemplars.get(i);
+            double value = exemplar.getValue();
+            if (value > lowerBound && value <= upperBound) {
+                return exemplar;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Find the Exemplar with the newest timestamp. May return {@code null}.
+     */
+    public Exemplar getLatest() {
+        Exemplar latest = null;
+        for (int i=0; i<exemplars.size(); i++) {
+            Exemplar candidate = exemplars.get(i);
+            if (candidate == null) {
+                continue;
+            }
+            if (latest == null) {
+                latest = candidate;
+                continue;
+            }
+            if (!latest.hasTimestamp()) {
+                latest = candidate;
+                continue;
+            }
+            if (candidate.hasTimestamp()) {
+                if (latest.getTimestampMillis() < candidate.getTimestampMillis()) {
+                    latest = candidate;
+                }
+            }
+        }
+        return latest;
+    }
+
+    public static class Builder {
+
+        private final ArrayList<Exemplar> exemplars = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addExemplar(Exemplar exemplar) {
+            exemplars.add(exemplar);
+            return this;
+        }
+
+        public Builder addExemplars(List<Exemplar> exemplars) {
+            this.exemplars.addAll(exemplars);
+            return this;
+        }
+
+        public Exemplars build() {
+            return Exemplars.of(exemplars);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (54c033d3446b3a08aba32e148fbe212295210a05j  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/GaugeSnapshot.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,134 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Gauge.
+ */
+public final class GaugeSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link GaugeSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link GaugeSnapshot#newBuilder()}.
+     *
+     * @param metadata see {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public GaugeSnapshot(MetricMetadata metadata, Collection<GaugeDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<GaugeDataPointSnapshot> getData() {
+        return (List<GaugeDataPointSnapshot>) data;
+    }
+
+    public static final class GaugeDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link GaugeDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link GaugeDataPointSnapshot#newBuilder()}.
+         *
+         * @param value    the gauge value.
+         * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar may be null.
+         */
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
+            this(value, labels, exemplar, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public GaugeDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May be {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+
+            private Builder() {
+            }
+
+            /**
+             * Gauge value. This is required.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            /**
+             * Optional
+             */
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public GaugeDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new GaugeDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(GaugeDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public GaugeSnapshot build() {
+            return new GaugeSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (860b291c7fb65b8bb730cd4b8af049df89ab350dj  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/HistogramSnapshot.javaj  addedj  Mj  K j  Mj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XS  @@ -0,0 +1,397 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Histogram.
+ */
+public final class HistogramSnapshot extends MetricSnapshot {
+
+    private final boolean gaugeHistogram;
+    public static final int CLASSIC_HISTOGRAM = Integer.MIN_VALUE;
+
+    /**
+     * To create a new {@link HistogramSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link HistogramSnapshot#newBuilder()}.
+     *
+     * @param metadata see {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
+        this(false, metadata, data);
+    }
+
+    /**
+     * Use this with the first parameter {@code true} to create a snapshot of a Gauge Histogram.
+     * The data model for Gauge Histograms is the same as for regular histograms, except that bucket values
+     * are semantically gauges and not counters.
+     * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
+     */
+    public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramDataPointSnapshot> data) {
+        super(metadata, data);
+        this.gaugeHistogram = isGaugeHistogram;
+    }
+
+    public boolean isGaugeHistogram() {
+        return gaugeHistogram;
+    }
+
+    @Override
+    public List<HistogramDataPointSnapshot> getData() {
+        return (List<HistogramDataPointSnapshot>) data;
+    }
+
+    public static final class HistogramDataPointSnapshot extends DistributionDataPointSnapshot {
+
+        // There are two types of histograms: Classic histograms and native histograms.
+        // Classic histograms have a fixed set of buckets.
+        // Native histograms have "infinitely many" buckets with exponentially growing boundaries.
+        // The OpenTelemetry terminology for native histogram is "exponential histogram".
+        // ---
+        // A histogram can be a classic histogram (indicated by nativeSchema == CLASSIC_HISTOGRAM),
+        // or a native histogram (indicated by classicBuckets == ClassicHistogramBuckets.EMPTY),
+        // or both.
+        // ---
+        // A histogram that is both classic and native is great for migrating from classic histograms
+        // to native histograms: Old Prometheus servers can still scrape the classic histogram, while
+        // new Prometheus servers can scrape the native histogram.
+
+        private final ClassicHistogramBuckets classicBuckets; // May be ClassicHistogramBuckets.EMPTY for native histograms.
+        private final int nativeSchema; // Number in [-4, 8]. May be CLASSIC_HISTOGRAM for classic histograms.
+        private final long nativeZeroCount; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final double nativeZeroThreshold; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final NativeHistogramBuckets nativeBucketsForPositiveValues; // only used if nativeSchema != CLASSIC_HISTOGRAM
+        private final NativeHistogramBuckets nativeBucketsForNegativeValues; // only used if nativeSchema != CLASSIC_HISTOGRAM
+
+        /**
+         * Constructor for classic histograms (as opposed to native histograms).
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param classicBuckets         required. Must not be empty. Must at least contain the +Inf bucket.
+         * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
+         * @param labels                 must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars              must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                               (this specific set of labels) was created (or reset to zero).
+         *                               It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(classicBuckets, CLASSIC_HISTOGRAM, 0, 0, NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor for native histograms (as opposed to classic histograms).
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
+         * @param nativeZeroCount                number of observed zero values (zero is special because there is no
+         *                                       histogram bucket for zero values).
+         * @param nativeZeroThreshold            observations in [-zeroThreshold, +zeroThreshold] are treated as zero.
+         *                                       This is to avoid creating a large number of buckets if observations fluctuate around zero.
+         * @param nativeBucketsForPositiveValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param nativeBucketsForNegativeValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param sum                            sum of all observed values. Optional, use {@link Double#NaN} if not available.
+         * @param labels                         must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars                      must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis         timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                                       (this specific set of labels) was created (or reset to zero).
+         *                                       It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(ClassicHistogramBuckets.EMPTY, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor for a histogram with both, classic and native data.
+         * <p>
+         * To create a new {@link HistogramDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link HistogramSnapshot#newBuilder()}.
+         *
+         * @param classicBuckets                 required. Must not be empty. Must at least contain the +Inf bucket.
+         * @param nativeSchema                   number in [-4, 8]. See <a href="https://github.com/prometheus/client_model/blob/7f720d22828060526c55ac83bceff08f43d4cdbc/io/prometheus/client/metrics.proto#L76-L80">Prometheus client_model metrics.proto</a>.
+         * @param nativeZeroCount                number of observed zero values (zero is special because there is no
+         *                                       histogram bucket for zero values).
+         * @param nativeZeroThreshold            observations in [-zeroThreshold, +zeroThreshold] are treated as zero.
+         *                                       This is to avoid creating a large number of buckets if observations fluctuate around zero.
+         * @param nativeBucketsForPositiveValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param nativeBucketsForNegativeValues must not be {@code null}. Use {@link NativeHistogramBuckets#EMPTY} if empty.
+         * @param sum                            sum of all observed values. Optional, use {@link Double#NaN} if not available.
+         * @param labels                         must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars                      must not be null. Use {@link Exemplars#EMPTY} if there are no Exemplars.
+         * @param createdTimestampMillis         timestamp (as in {@link System#currentTimeMillis()}) when the time series
+         *                                       (this specific set of labels) was created (or reset to zero).
+         *                                       It's optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis) {
+            this(classicBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public HistogramDataPointSnapshot(
+                ClassicHistogramBuckets classicBuckets,
+                int nativeSchema,
+                long nativeZeroCount,
+                double nativeZeroThreshold,
+                NativeHistogramBuckets nativeBucketsForPositiveValues,
+                NativeHistogramBuckets nativeBucketsForNegativeValues,
+                double sum,
+                Labels labels,
+                Exemplars exemplars,
+                long createdTimestampMillis,
+                long scrapeTimestampMillis) {
+            super(calculateCount(classicBuckets, nativeSchema, nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues), sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.classicBuckets = classicBuckets;
+            this.nativeSchema = nativeSchema;
+            this.nativeZeroCount = nativeSchema == CLASSIC_HISTOGRAM ? 0 : nativeZeroCount;
+            this.nativeZeroThreshold = nativeSchema == CLASSIC_HISTOGRAM ? 0 : nativeZeroThreshold;
+            this.nativeBucketsForPositiveValues = nativeSchema == CLASSIC_HISTOGRAM ? NativeHistogramBuckets.EMPTY : nativeBucketsForPositiveValues;
+            this.nativeBucketsForNegativeValues = nativeSchema == CLASSIC_HISTOGRAM ? NativeHistogramBuckets.EMPTY : nativeBucketsForNegativeValues;
+            validate();
+        }
+
+        private static long calculateCount(ClassicHistogramBuckets classicBuckets, int nativeSchema, long nativeZeroCount, NativeHistogramBuckets nativeBucketsForPositiveValues, NativeHistogramBuckets nativeBucketsForNegativeValues) {
+            if (classicBuckets.isEmpty()) {
+                // This is a native histogram
+                return calculateNativeCount(nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues);
+            } else if (nativeSchema == CLASSIC_HISTOGRAM) {
+                // This is a classic histogram
+                return calculateClassicCount(classicBuckets);
+            } else {
+                // This is both, a native and a classic histogram. Count should be the same for both.
+                long classicCount = calculateClassicCount(classicBuckets);
+                long nativeCount = calculateNativeCount(nativeZeroCount, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues);
+                if (classicCount != nativeCount) {
+                    throw new IllegalArgumentException("Inconsistent observation count: If a histogram has both classic and native data the observation count must be the same. Classic count is " + classicCount + " but native count is " + nativeCount + ".");
+                }
+                return classicCount;
+            }
+        }
+
+        private static long calculateClassicCount(ClassicHistogramBuckets classicBuckets) {
+            long count = 0;
+            for (int i = 0; i < classicBuckets.size(); i++) {
+                count += classicBuckets.getCount(i);
+            }
+            return count;
+        }
+
+        private static long calculateNativeCount(long nativeZeroCount, NativeHistogramBuckets nativeBucketsForPositiveValues, NativeHistogramBuckets nativeBucketsForNegativeValues) {
+            long count = nativeZeroCount;
+            for (int i = 0; i < nativeBucketsForNegativeValues.size(); i++) {
+                count += nativeBucketsForNegativeValues.getCount(i);
+            }
+            for (int i = 0; i < nativeBucketsForPositiveValues.size(); i++) {
+                count += nativeBucketsForPositiveValues.getCount(i);
+            }
+            return count;
+        }
+
+        public boolean hasClassicHistogramData() {
+            return !classicBuckets.isEmpty();
+        }
+
+        public boolean hasNativeHistogramData() {
+            return nativeSchema != CLASSIC_HISTOGRAM;
+        }
+
+        /**
+         * Will return garbage if {@link #hasClassicHistogramData()} is {@code false}.
+         */
+        public ClassicHistogramBuckets getClassicBuckets() {
+            return classicBuckets;
+        }
+
+        /**
+         * The schema defines the scale of the native histogram, i.g. the granularity of the buckets.
+         * Current supported values are -4 &lt;= schema &lt;= 8.
+         * See {@link NativeHistogramBuckets} for more info.
+         * This will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public int getNativeSchema() {
+            return nativeSchema;
+        }
+
+        /**
+         * Number of observed zero values.
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public long getNativeZeroCount() {
+            return nativeZeroCount;
+        }
+
+        /**
+         * All observations in [-nativeZeroThreshold; +nativeZeroThreshold] are treated as zero.
+         * This is useful to avoid creation of a large number of buckets if observations fluctuate around zero.
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public double getNativeZeroThreshold() {
+            return nativeZeroThreshold;
+        }
+
+        /**
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public NativeHistogramBuckets getNativeBucketsForPositiveValues() {
+            return nativeBucketsForPositiveValues;
+        }
+
+        /**
+         * Will return garbage if {@link #hasNativeHistogramData()} is {@code false}.
+         */
+        public NativeHistogramBuckets getNativeBucketsForNegativeValues() {
+            return nativeBucketsForNegativeValues;
+        }
+
+        private void validate() {
+            for (Label label : getLabels()) {
+                if (label.getName().equals("le")) {
+                    throw new IllegalArgumentException("le is a reserved label name for histograms");
+                }
+            }
+            if (nativeSchema == CLASSIC_HISTOGRAM && classicBuckets.isEmpty()) {
+                throw new IllegalArgumentException("Histogram buckets cannot be empty, must at least have the +Inf bucket.");
+            }
+            if (nativeSchema != CLASSIC_HISTOGRAM) {
+                if (nativeSchema < -4 || nativeSchema > 8) {
+                    throw new IllegalArgumentException(nativeSchema + ": illegal schema. Expecting number in [-4, 8].");
+                }
+                if (nativeZeroCount < 0) {
+                    throw new IllegalArgumentException(nativeZeroCount + ": nativeZeroCount cannot be negative");
+                }
+                if (Double.isNaN(nativeZeroThreshold) || nativeZeroThreshold < 0) {
+                    throw new IllegalArgumentException(nativeZeroThreshold + ": illegal nativeZeroThreshold. Must be >= 0.");
+                }
+            }
+        }
+
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
+
+            private ClassicHistogramBuckets classicHistogramBuckets = ClassicHistogramBuckets.EMPTY;
+            private int nativeSchema = CLASSIC_HISTOGRAM;
+            private long nativeZeroCount = 0;
+            private double nativeZeroThreshold = 0;
+            private NativeHistogramBuckets nativeBucketsForPositiveValues = NativeHistogramBuckets.EMPTY;
+            private NativeHistogramBuckets nativeBucketsForNegativeValues = NativeHistogramBuckets.EMPTY;
+
+            private Builder() {
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public Builder withClassicHistogramBuckets(ClassicHistogramBuckets classicBuckets) {
+                this.classicHistogramBuckets = classicBuckets;
+                return this;
+            }
+
+            public Builder withNativeSchema(int nativeSchema) {
+                this.nativeSchema = nativeSchema;
+                return this;
+            }
+
+            public Builder withNativeZeroCount(long zeroCount) {
+                this.nativeZeroCount = zeroCount;
+                return this;
+            }
+
+            public Builder withNativeZeroThreshold(double zeroThreshold) {
+                this.nativeZeroThreshold = zeroThreshold;
+                return this;
+            }
+
+            public Builder withNativeBucketsForPositiveValues(NativeHistogramBuckets bucketsForPositiveValues) {
+                this.nativeBucketsForPositiveValues = bucketsForPositiveValues;
+                return this;
+            }
+
+            public Builder withNativeBucketsForNegativeValues(NativeHistogramBuckets bucketsForNegativeValues) {
+                this.nativeBucketsForNegativeValues = bucketsForNegativeValues;
+                return this;
+            }
+
+            public HistogramDataPointSnapshot build() {
+                if (nativeSchema == CLASSIC_HISTOGRAM && classicHistogramBuckets.isEmpty()) {
+                    throw new IllegalArgumentException("One of nativeSchema and classicHistogramBuckets is required.");
+                }
+                return new HistogramDataPointSnapshot(classicHistogramBuckets, nativeSchema, nativeZeroCount, nativeZeroThreshold, nativeBucketsForPositiveValues, nativeBucketsForNegativeValues, sum, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<HistogramDataPointSnapshot> dataPoints = new ArrayList<>();
+        private boolean isGaugeHistogram = false;
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(HistogramDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        /**
+         * Create a Gauge Histogram. The data model for Gauge Histograms is the same as for regular histograms,
+         * except that bucket values are semantically gauges and not counters.
+         * See <a href="https://openmetrics.io">openmetrics.io</a> for more info on Gauge Histograms.
+         */
+        public Builder asGaugeHistogram() {
+            isGaugeHistogram = true;
+            return this;
+        }
+
+        public HistogramSnapshot build() {
+            return new HistogramSnapshot(isGaugeHistogram, buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u     }(j  (b49e0d1218825153dfc81322aded933ad9b73ce4j  ^prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/InfoSnapshot.javaj  addedj  Khj  K j  Khj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,104 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of an Info metric.
+ */
+public final class InfoSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link InfoSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link InfoSnapshot#newBuilder()}.
+     *
+     * @param metadata the metric name in metadata must not include the {@code _info} suffix.
+     *                 See {@link MetricMetadata} for more naming conventions.
+     *                 The metadata must not have a unit.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public InfoSnapshot(MetricMetadata metadata, Collection<InfoDataPointSnapshot> data) {
+        super(metadata, data);
+        if (metadata.getName().endsWith("_info")) {
+            throw new IllegalArgumentException("The name of an info snapshot must not include the _info suffix");
+        }
+        if (metadata.hasUnit()) {
+            throw new IllegalArgumentException("An Info metric cannot have a unit.");
+        }
+    }
+
+    @Override
+    public List<InfoDataPointSnapshot> getData() {
+        return (List<InfoDataPointSnapshot>) data;
+    }
+
+    public static class InfoDataPointSnapshot extends DataPointSnapshot {
+
+        /**
+         * To create a new {@link InfoDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link InfoDataPointSnapshot#newBuilder()}.
+         *
+         * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         */
+        public InfoDataPointSnapshot(Labels labels) {
+            this(labels, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public InfoDataPointSnapshot(Labels labels, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            public InfoDataPointSnapshot build() {
+                return new InfoDataPointSnapshot(labels, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<InfoDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(InfoDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        @Override
+        public Builder withUnit(Unit unit) {
+            throw new IllegalArgumentException("Info metric cannot have a unit.");
+        }
+
+        public InfoSnapshot build() {
+            return new InfoSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (c31a8b1af0581223dd974d8b6f9675b2b931dfb3j  Wprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Label.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabel.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,28 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Utility for iterating over {@link Labels}.
+ */
+public final class Label implements Comparable<Label> {
+
+    private final String name;
+    private final String value;
+
+    public Label(String name, String value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    @Override
+    public int compareTo(Label other) {
+        int nameCompare = name.compareTo(other.name);
+        return nameCompare != 0 ? nameCompare : value.compareTo(other.value);
+    }
+}u}(j  (8f9d36ea43c443a1ed5e36c88c8352b0493496daj  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javaj  addedj  Mlj  K j  Mlj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X33  @@ -0,0 +1,364 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.stream.Stream;
+
+/**
+ * Immutable set of name/value pairs, sorted by name.
+ */
+public class Labels implements Comparable<Labels>, Iterable<Label> {
+
+    public static final Labels EMPTY = new Labels(new String[]{}, new String[]{});
+    private static final Pattern LABEL_NAME_RE = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
+
+    private final String[] names; // sorted
+    private final String[] values;
+
+    private Labels(String[] names, String[] values) {
+        // names and values are already sorted and validated
+        this.names = names;
+        this.values = values;
+    }
+
+    public boolean isEmpty() {
+        return this == EMPTY || this.equals(EMPTY);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param keyValuePairs as in {@code {name1, value1, name2, value2}}. Length must be even.
+     *                      {@link #isValidLabelName(String)} must be true for each name.
+     *                      Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid
+     *                      label names. Label names must be unique (no duplicate label names).
+     */
+    public static Labels of(String... keyValuePairs) {
+        if (keyValuePairs.length % 2 != 0) {
+            throw new IllegalArgumentException("Key/value pairs must have an even length");
+        }
+        if (keyValuePairs.length == 0) {
+            return EMPTY;
+        }
+        String[] names = new String[keyValuePairs.length / 2];
+        String[] values = new String[keyValuePairs.length / 2];
+        for (int i = 0; 2 * i < keyValuePairs.length; i++) {
+            names[i] = keyValuePairs[2 * i];
+            values[i] = keyValuePairs[2 * i + 1];
+        }
+        return Labels.of(names, values);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
+     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
+     *               Label names must be unique (no duplicate label names).
+     * @param values label values. names.size() must be equal to values.size().
+     */
+    public static Labels of(List<String> names, List<String> values) {
+        if (names.size() != values.size()) {
+            throw new IllegalArgumentException("Names and values must have the same size.");
+        }
+        if (names.size() == 0) {
+            return EMPTY;
+        }
+        String[] namesCopy = names.toArray(new String[0]);
+        String[] valuesCopy = values.toArray(new String[0]);
+        sortAndValidate(namesCopy, valuesCopy);
+        return new Labels(namesCopy, valuesCopy);
+    }
+
+    /**
+     * Create a new Labels instance.
+     * You can either create Labels with one of the static {@code Labels.of(...)} methods,
+     * or you can use the {@link Labels#newBuilder()}.
+     *
+     * @param names  label names. {@link #isValidLabelName(String)} must be true for each name.
+     *               Use {@link #sanitizeLabelName(String)} to convert arbitrary strings to valid label names.
+     *               Label names must be unique (no duplicate label names).
+     * @param values label values. names.length must be equal to values.length.
+     */
+    public static Labels of(String[] names, String[] values) {
+        if (names.length != values.length) {
+            throw new IllegalArgumentException("Names and values must have the same length.");
+        }
+        if (names.length == 0) {
+            return EMPTY;
+        }
+        String[] namesCopy = Arrays.copyOf(names, names.length);
+        String[] valuesCopy = Arrays.copyOf(values, values.length);
+        sortAndValidate(namesCopy, valuesCopy);
+        return new Labels(namesCopy, valuesCopy);
+    }
+
+    /**
+     * Test if these labels contain a specific label name.
+     */
+    public boolean contains(String labelName) {
+        for (String name : names) {
+            if (name.equals(labelName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static void sortAndValidate(String[] names, String[] values) {
+        sort(names, values);
+        validateNames(names);
+    }
+
+    private static void validateNames(String[] names) {
+        for (int i = 0; i < names.length; i++) {
+            if (!isValidLabelName(names[i])) {
+                throw new IllegalArgumentException("'" + names[i] + "' is an illegal label name");
+            }
+            if (i > 0 && names[i - 1].equals(names[i])) {
+                throw new IllegalArgumentException(names[i] + ": duplicate label name");
+            }
+        }
+    }
+
+    private static void sort(String[] names, String[] values) {
+        // bubblesort :)
+        int n = names.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (names[j].compareTo(names[j + 1]) > 0) {
+                    swap(j, j + 1, names, values);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, String[] names, String[] values) {
+        String tmp = names[j];
+        names[j] = names[i];
+        names[i] = tmp;
+        tmp = values[j];
+        values[j] = values[i];
+        values[i] = tmp;
+    }
+
+    public static boolean isValidLabelName(String name) {
+        return LABEL_NAME_RE.matcher(name).matches() && !name.startsWith("__");
+    }
+
+    /**
+     * Convert arbitrary label names to valid Prometheus label names.
+     */
+    public static String sanitizeLabelName(String labelName) {
+        String result = MetricMetadata.sanitizeMetricName(labelName);
+        while (result.startsWith("__")) {
+            result = result.substring(1);
+        }
+        return result;
+    }
+
+    @Override
+    public Iterator<Label> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<Label> stream() {
+        return asList().stream();
+    }
+
+    public int size() {
+        return names.length;
+    }
+
+    public String getName(int i) {
+        return names[i];
+    }
+
+    public String getValue(int i) {
+        return values[i];
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the labels of other.
+     * This and other must not contain the same label name.
+     */
+    public Labels merge(Labels other) {
+        String[] names = new String[this.names.length + other.names.length];
+        String[] values = new String[names.length];
+        int thisPos = 0;
+        int otherPos = 0;
+        while (thisPos + otherPos < names.length) {
+            if (thisPos >= this.names.length) {
+                names[thisPos + otherPos] = other.names[otherPos];
+                values[thisPos + otherPos] = other.values[otherPos];
+                otherPos++;
+            } else if (otherPos >= other.names.length) {
+                names[thisPos + otherPos] = this.names[thisPos];
+                values[thisPos + otherPos] = this.values[thisPos];
+                thisPos++;
+            } else if (this.names[thisPos].compareTo(other.names[otherPos]) < 0) {
+                names[thisPos + otherPos] = this.names[thisPos];
+                values[thisPos + otherPos] = this.values[thisPos];
+                thisPos++;
+            } else if (this.names[thisPos].compareTo(other.names[otherPos]) > 0) {
+                names[thisPos + otherPos] = other.names[otherPos];
+                values[thisPos + otherPos] = other.values[otherPos];
+                otherPos++;
+            } else {
+                throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
+            }
+        }
+        return new Labels(names, values);
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the label passed as name and value.
+     * The label name must not already be contained in this Labels instance.
+     */
+    public Labels add(String name, String value) {
+        return merge(Labels.of(name, value));
+    }
+
+    /**
+     * Create a new Labels instance containing the labels of this and the labels passed as names and values.
+     * The new label names must not already be contained in this Labels instance.
+     */
+    public Labels merge(String[] names, String[] values) {
+        if (this.equals(EMPTY)) {
+            return Labels.of(names, values);
+        }
+        String[] mergedNames = new String[this.names.length + names.length];
+        String[] mergedValues = new String[this.values.length + values.length];
+        System.arraycopy(this.names, 0, mergedNames, 0, this.names.length);
+        System.arraycopy(this.values, 0, mergedValues, 0, this.values.length);
+        System.arraycopy(names, 0, mergedNames, this.names.length, names.length);
+        System.arraycopy(values, 0, mergedValues, this.values.length, values.length);
+        sortAndValidate(mergedNames, mergedValues);
+        return new Labels(mergedNames, mergedValues);
+    }
+
+    public boolean hasSameNames(Labels other) {
+        return Arrays.equals(names, other.names);
+    }
+
+    public boolean hasSameValues(Labels other) {
+        return Arrays.equals(values, other.values);
+    }
+
+    @Override
+    public int compareTo(Labels other) {
+        int result = compare(names, other.names);
+        if (result != 0) {
+            return result;
+        }
+        return compare(values, other.values);
+    }
+
+    // Looks like Java doesn't have a compareTo() method for arrays.
+    private int compare(String[] array1, String[] array2) {
+        int result;
+        for (int i = 0; i < array1.length; i++) {
+            if (array2.length <= i) {
+                return 1;
+            }
+            result = array1[i].compareTo(array2[i]);
+            if (result != 0) {
+                return result;
+            }
+        }
+        if (array2.length > array1.length) {
+            return -1;
+        }
+        return 0;
+    }
+
+    private List<Label> asList() {
+        List<Label> result = new ArrayList<>(names.length);
+        for (int i = 0; i < names.length; i++) {
+            result.add(new Label(names[i], values[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder b = new StringBuilder();
+        b.append("{");
+        for (int i = 0; i < names.length; i++) {
+            if (i > 0) {
+                b.append(",");
+            }
+            b.append(names[i]);
+            b.append("=\"");
+            appendEscapedLabelValue(b, values[i]);
+            b.append("\"");
+        }
+        b.append("}");
+        return b.toString();
+    }
+
+    private void appendEscapedLabelValue(StringBuilder b, String value) {
+        for (int i = 0; i < value.length(); i++) {
+            char c = value.charAt(i);
+            switch (c) {
+                case '\\':
+                    b.append("\\\\");
+                    break;
+                case '\"':
+                    b.append("\\\"");
+                    break;
+                case '\n':
+                    b.append("\\n");
+                    break;
+                default:
+                    b.append(c);
+            }
+        }
+    }
+
+    // as labels are sorted by name, equals is insensitive to the order
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        Labels labels = (Labels) o;
+        return Arrays.equals(names, labels.names) && Arrays.equals(values, labels.values);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = Arrays.hashCode(names);
+        result = 31 * result + Arrays.hashCode(values);
+        return result;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+        private final List<String> names = new ArrayList<>();
+        private final List<String> values = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addLabel(String name, String value) {
+            names.add(name);
+            values.add(value);
+            return this;
+        }
+
+        public Labels build() {
+            return Labels.of(names, values);
+        }
+    }
+}u}(j  (c8fd3e1b2a1e2b03c2ff0ae3d0aa128fd1cbe221j  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricMetadata.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadata.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,168 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.regex.Pattern;
+
+/**
+ * Immutable container for metric metadata: name, help, unit.
+ */
+public final class MetricMetadata {
+    private static final Pattern METRIC_NAME_RE = Pattern.compile("^[a-zA-Z_:][a-zA-Z0-9_:]+$");
+    // According to OpenMetrics _count and _sum (and _gcount, _gsum) should also be reserved suffixes.
+    // However, popular instrumentation libraries have many Gauges with a name ending in _count. Examples:
+    // * Micrometer: jvm_buffer_count
+    // * OpenTelemetry: process_runtime_jvm_buffer_count
+    // We allow the _count and _sum suffixes here so that these names are supported, even though this might
+    // conflict if there is a histogram or summary named "jvm_buffer" or "process_runtime_jvm_buffer".
+    private static final String[] RESERVED_SUFFIXES = {"_total", "_created", "_bucket", "_info"};
+
+    /**
+     * Name is the name without suffix.
+     * For example, the name for a counter "http_requests_total" is "http_requests".
+     * The name of an info called "target_info" is "target".
+     * See {@link #MetricMetadata(String, String, Unit)} for more info on naming conventions.
+     */
+    private final String name;
+    private final String help;
+    private final Unit unit;
+
+    /**
+     * See {@link #MetricMetadata(String, String, Unit)}
+     */
+    public MetricMetadata(String name) {
+        this(name, null, null);
+    }
+
+    /**
+     * See {@link #MetricMetadata(String, String, Unit)}
+     */
+    public MetricMetadata(String name, String help) {
+        this(name, help, null);
+    }
+
+    /**
+     * Naming conventions:
+     * <ul>
+     *     <li>The name MUST NOT include the {@code _total} suffix for counter metrics or the
+     *         {@code _info} suffix for info metrics.
+     *         If in doubt, use {@link #sanitizeMetricName(String)} to remove the suffix.</li>
+     *     <li>If name is {@code null}, a {@link NullPointerException} is thrown.</li>
+     *     <li>If {@link #isValidMetricName(String) isValidMetricName(name)} is false,
+     *         an {@link IllegalArgumentException} is thrown.
+     *         Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid names.</li>
+     *     <li>If unit != null, the name SHOULD contain the unit as a suffix. Example:
+     *         <pre>
+     *         new MetricMetadata("cache_size_bytes", "current size of the cache", Unit.BYTES);
+     *         </pre>
+     *         This is not enforced. No Exception will be thrown if the name does not have the unit as suffix.</li>
+     *     <li>The name MUST NOT contain the {@code _total} or {@code _created} suffixes for counters,
+     *         the {@code _count}, {@code _sum}, or {@code _created} suffixes for summaries,
+     *         the {@code _count}, {@code _sum}, {@code _bucket}, or {@code _created} suffixes for classic histograms,
+     *         the {@code _gcount}, {@code _gsum}, {@code _bucket} suffixes for classic gauge histograms,
+     *         or the {@code _info} suffix for info metrics.</li>
+     * </ul>
+     *
+     * @param name must follow the naming conventions described above.
+     * @param help optional. May be {@code null}.
+     * @param unit optional. May be {@code null}.
+     */
+    public MetricMetadata(String name, String help, Unit unit) {
+        this.name = name;
+        this.help = help;
+        this.unit = unit;
+        validate();
+    }
+
+    /**
+     * The name does not include the {@code _total} suffix for counter metrics
+     * or the {@code _info} suffix for Info metrics.
+     */
+    public String getName() {
+        return name;
+    }
+
+    public String getHelp() {
+        return help;
+    }
+
+    public boolean hasUnit() {
+        return unit != null;
+    }
+
+    public Unit getUnit() {
+        return unit;
+    }
+
+    private void validate() {
+        if (name == null) {
+            throw new IllegalArgumentException("Missing required field: name is null");
+        }
+        if (!isValidMetricName(name)) {
+            throw new IllegalArgumentException("'" + name + "': illegal metric name");
+        }
+    }
+
+    /**
+     * Test if a metric name is valid. Rules:
+     * <ul>
+     * <li>The name must match {@link #METRIC_NAME_RE}.</li>
+     * <li>The name MUST NOT end with one of the {@link #RESERVED_SUFFIXES}.</li>
+     * </ul>
+     * If a metric has a {@link Unit}, the metric name SHOULD end with the unit as a suffix (note that in
+     * <a href="https://openmetrics.io/">OpenMetrics</a> this is a MUST, but this library does not enforce Unit
+     * suffixes).
+     * <p>
+     * Example: If you create a Counter for a processing time with {@link Unit#SECONDS}, the name should be
+     * {@code processing_time_seconds}. When exposed in OpenMetrics Text format, this will be represented as two
+     * values: {@code processing_time_seconds_total} for the counter value, and the optional
+     * {@code processing_time_seconds_created} timestamp.
+     * <p>
+     * Use {@link #sanitizeMetricName(String)} to convert arbitrary Strings to valid metric names.
+     */
+    public static boolean isValidMetricName(String name) {
+        for (String reservedSuffix : RESERVED_SUFFIXES) {
+            if (name.endsWith(reservedSuffix)) {
+                return false;
+            }
+        }
+        return METRIC_NAME_RE.matcher(name).matches();
+    }
+
+    /**
+     * Convert arbitrary metric names to valid Prometheus metric names.
+     */
+    public static String sanitizeMetricName(String metricName) {
+        if (metricName.isEmpty()) {
+            throw new IllegalArgumentException("Cannot convert an empty string into a valid metric name.");
+        }
+        int length = metricName.length();
+        char[] sanitized = new char[length];
+        for (int i = 0; i < length; i++) {
+            char ch = metricName.charAt(i);
+            if (ch == ':' ||
+                    (ch >= 'a' && ch <= 'z') ||
+                    (ch >= 'A' && ch <= 'Z') ||
+                    (i > 0 && ch >= '0' && ch <= '9')) {
+                sanitized[i] = ch;
+            } else {
+                sanitized[i] = '_';
+            }
+        }
+        String sanitizedString = new String(sanitized);
+        boolean modified = true;
+        while (modified) {
+            modified = false;
+            for (String reservedSuffix : RESERVED_SUFFIXES) {
+                if (sanitizedString.equals(reservedSuffix)) {
+                    // This is for the corner case when you call sanitizeMetricName("_total").
+                    // In that case the result will be "total".
+                    return reservedSuffix.substring(1);
+                }
+                if (sanitizedString.endsWith(reservedSuffix)) {
+                    sanitizedString = sanitizedString.substring(0, sanitizedString.length() - reservedSuffix.length());
+                    modified = true;
+                }
+            }
+        }
+        return sanitizedString;
+    }
+}u}(j  (5108c3bd041c3dd2d07541d5b3946adc2f06876dj  `prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshot.javaj  addedj  KRj  K j  KRj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X
  @@ -0,0 +1,82 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * Base class for metric snapshots.
+ */
+public abstract class MetricSnapshot {
+
+    private final MetricMetadata metadata;
+    protected final List<? extends DataPointSnapshot> data;
+
+    protected MetricSnapshot(MetricMetadata metadata, DataPointSnapshot... data) {
+        this(metadata, Arrays.asList(data));
+    }
+
+    protected MetricSnapshot(MetricMetadata metadata, Collection<? extends DataPointSnapshot> data) {
+        this.metadata = metadata;
+        if (data == null) {
+            throw new NullPointerException();
+        }
+        List<? extends DataPointSnapshot> dataCopy = new ArrayList<>(data);
+        dataCopy.sort(Comparator.comparing(DataPointSnapshot::getLabels));
+        this.data = Collections.unmodifiableList(dataCopy);
+        validateLabels();
+    }
+
+    public MetricMetadata getMetadata() {
+        return metadata;
+    }
+
+    public abstract List<? extends DataPointSnapshot> getData();
+
+    protected void validateLabels() {
+        // Verify that labels are unique (the same set of names/values must not be used multiple times for the same metric).
+        for (int i = 0; i < data.size() - 1; i++) {
+            if (data.get(i).getLabels().equals(data.get(i + 1).getLabels())) {
+                throw new IllegalArgumentException("Duplicate labels in metric data: " + data.get(i).getLabels());
+            }
+        }
+        // Should we verify that all entries in data have the same label names?
+        // No. They should have the same label names, but according to OpenMetrics this is not a MUST.
+    }
+
+    public static abstract class Builder<T extends Builder<T>> {
+
+        private String name;
+        private String help;
+        private Unit unit;
+
+        /**
+         * The name is required.
+         * If the name is missing or invalid, {@code build()} will throw an {@link IllegalArgumentException}.
+         * See {@link MetricMetadata#isValidMetricName(String)} for info on valid metric names.
+         */
+        public T withName(String name) {
+            this.name = name;
+            return self();
+        }
+
+        public T withHelp(String help) {
+            this.help = help;
+            return self();
+        }
+
+        public T withUnit(Unit unit) {
+            this.unit = unit;
+            return self();
+        }
+
+        protected MetricMetadata buildMetadata() {
+            return new MetricMetadata(name, help, unit);
+        }
+
+        protected abstract T self();
+    }
+}u}(j  (98200461feaab64ff0e98b76200cf345b2d6e7c2j  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/MetricSnapshots.javaj  addedj  Kbj  K j  Kbj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshots.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X<  @@ -0,0 +1,98 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+import static java.util.Collections.unmodifiableList;
+import static java.util.Comparator.comparing;
+
+/**
+ * Immutable list of metric snapshots.
+ */
+public class MetricSnapshots implements Iterable<MetricSnapshot> {
+
+    private final List<MetricSnapshot> snapshots;
+
+    /**
+     * See {@link #MetricSnapshots(Collection)}
+     */
+    public MetricSnapshots(MetricSnapshot... snapshots) {
+        this(Arrays.asList(snapshots));
+    }
+
+    /**
+     * To create MetricSnapshots, you can either call the constructor directly
+     * or use {@link #newBuilder()}.
+     *
+     * @param snapshots the constructor creates a sorted copy of snapshots.
+     * @throws IllegalArgumentException if snapshots contains duplicate metric names.
+     *                                  To avoid duplicate metric names use {@link #newBuilder()} and check
+     *                                  {@link Builder#containsMetricName(String)} before calling
+     *                                  {@link Builder#addMetricSnapshot(MetricSnapshot)}.
+     */
+    public MetricSnapshots(Collection<MetricSnapshot> snapshots) {
+        List<MetricSnapshot> list = new ArrayList<>(snapshots);
+        list.sort(comparing(s -> s.getMetadata().getName()));
+        for (int i = 0; i < snapshots.size() - 1; i++) {
+            if (list.get(i).getMetadata().getName().equals(list.get(i + 1).getMetadata().getName())) {
+                throw new IllegalArgumentException(list.get(i).getMetadata().getName() + ": duplicate metric name");
+            }
+        }
+        this.snapshots = unmodifiableList(list);
+    }
+
+    public static MetricSnapshots of(MetricSnapshot... snapshots) {
+        return new MetricSnapshots(snapshots);
+    }
+
+    @Override
+    public Iterator<MetricSnapshot> iterator() {
+        return snapshots.iterator();
+    }
+
+    public int size() {
+        return snapshots.size();
+    }
+
+    public MetricSnapshot get(int i) {
+        return snapshots.get(i);
+    }
+
+    public Stream<MetricSnapshot> stream() {
+        return snapshots.stream();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final List<MetricSnapshot> snapshots = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public boolean containsMetricName(String name) {
+            for (MetricSnapshot snapshot : snapshots) {
+                if (snapshot.getMetadata().getName().equals(name)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        public Builder addMetricSnapshot(MetricSnapshot snapshot) {
+            snapshots.add(snapshot);
+            return this;
+        }
+
+        public MetricSnapshots build() {
+            return new MetricSnapshots(snapshots);
+        }
+    }
+}u}(j  (e7af0e6e84a44c3ea7fccf50dfafbdaabc40ed84j  gprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucket.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucket.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xh  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * For iterating over {@link NativeHistogramBuckets}.
+ */
+public class NativeHistogramBucket {
+
+    private final int bucketIndex;
+    private final long count;
+
+    public NativeHistogramBucket(int bucketIndex, long count) {
+        this.bucketIndex = bucketIndex;
+        this.count = count;
+    }
+
+    /**
+     * See {@link NativeHistogramBuckets} for info on native bucket indexes.
+     */
+    public int getBucketIndex() {
+        return bucketIndex;
+    }
+
+    public long getCount() {
+        return count;
+    }
+}u}(j  (6e0890a99df4df0c495911237516bc2a76a7c76ej  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X0  @@ -0,0 +1,159 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable representation of native histogram buckets.
+ * <p>
+ * The bucket index defines the boundaries of the bucket,
+ * depending on the histogram's {@link HistogramSnapshot.HistogramDataPointSnapshot#getNativeSchema() schema}.
+ * <pre>
+ *     base = 2^(2^-schema)
+ *     lower bound = base^(index - 1)
+ *     upper bound = base^index
+ * </pre>
+ */
+public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
+
+    public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
+    private final int[] bucketIndexes;
+    private final long[] counts;
+
+    private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {
+        this.bucketIndexes = bucketIndexes;
+        this.counts = counts;
+    }
+
+    /**
+     * To create a new {@link NativeHistogramBuckets} instance, you can either use one of the static {@code of(...)}
+     * methods, or use {@link NativeHistogramBuckets#newBuilder()}.
+     * @param bucketIndexes see class javadoc of {@link NativeHistogramBuckets}. May be empty.
+     * @param counts must have the same length as bucketIndexes
+     */
+    public static NativeHistogramBuckets of(int[] bucketIndexes, long[] counts) {
+        int[] bucketIndexesCopy = Arrays.copyOf(bucketIndexes, bucketIndexes.length);
+        long[] countsCopy = Arrays.copyOf(counts, counts.length);
+        sortAndValidate(bucketIndexesCopy, countsCopy);
+        return new NativeHistogramBuckets(bucketIndexesCopy, countsCopy);
+    }
+
+    /**
+     * To create a new {@link NativeHistogramBuckets} instance, you can either use one of the static {@code of(...)}
+     * methods, or use {@link NativeHistogramBuckets#newBuilder()}.
+     * @param bucketIndexes see class javadoc of {@link NativeHistogramBuckets}. May be empty.
+     * @param counts must have the same size as bucketIndexes
+     */
+    public static NativeHistogramBuckets of(List<Integer> bucketIndexes, List<Long> counts) {
+        int[] bucketIndexesCopy = new int[bucketIndexes.size()];
+        for (int i=0; i<bucketIndexes.size(); i++) {
+            bucketIndexesCopy[i] = bucketIndexes.get(i);
+        }
+        long[] countsCopy = new long[counts.size()];
+        for (int i=0; i<counts.size(); i++) {
+            countsCopy[i] = counts.get(i);
+        }
+        sortAndValidate(bucketIndexesCopy, countsCopy);
+        return new NativeHistogramBuckets(bucketIndexesCopy, countsCopy);
+    }
+
+    public int size() {
+        return bucketIndexes.length;
+    }
+
+    private List<NativeHistogramBucket> asList() {
+        List<NativeHistogramBucket> result = new ArrayList<>(size());
+        for (int i=0; i<bucketIndexes.length; i++) {
+            result.add(new NativeHistogramBucket(bucketIndexes[i], counts[i]));
+        }
+        return Collections.unmodifiableList(result);
+    }
+
+    @Override
+    public Iterator<NativeHistogramBucket> iterator() {
+        return asList().iterator();
+    }
+
+    public Stream<NativeHistogramBucket> stream() {
+        return asList().stream();
+    }
+
+    public int getBucketIndex(int i) {
+        return bucketIndexes[i];
+    }
+
+    public long getCount(int i) {
+        return counts[i];
+    }
+
+    private static void sortAndValidate(int[] bucketIndexes, long[] counts) {
+        if (bucketIndexes.length != counts.length) {
+            throw new IllegalArgumentException("bucketIndexes.length == " + bucketIndexes.length + " but counts.length == " + counts.length + ". Expected the same length.");
+        }
+        sort(bucketIndexes, counts);
+        validate(bucketIndexes, counts);
+    }
+
+    private static void sort(int[] bucketIndexes, long[] counts) {
+        // Bubblesort. Should be efficient here as in most cases bucketIndexes is already sorted.
+        int n = bucketIndexes.length;
+        for (int i = 0; i < n - 1; i++) {
+            for (int j = 0; j < n - i - 1; j++) {
+                if (bucketIndexes[j] > bucketIndexes[j + 1]) {
+                    swap(j, j+1, bucketIndexes, counts);
+                }
+            }
+        }
+    }
+
+    private static void swap(int i, int j, int[] bucketIndexes, long[] counts) {
+        int tmpInt = bucketIndexes[j];
+        bucketIndexes[j] = bucketIndexes[i];
+        bucketIndexes[i] = tmpInt;
+        long tmpLong = counts[j];
+        counts[j] = counts[i];
+        counts[i] = tmpLong;
+    }
+
+    private static void validate(int[] bucketIndexes, long[] counts) {
+        // Preconditions:
+        // * bucketIndexes sorted
+        // * bucketIndexes and counts have the same length
+        for (int i=0; i<bucketIndexes.length; i++) {
+            if (counts[i] < 0) {
+                throw new IllegalArgumentException("Bucket counts cannot be negative.");
+            }
+            if (i > 0) {
+                if (bucketIndexes[i-1] == bucketIndexes[i]) {
+                    throw new IllegalArgumentException("Duplicate bucket index " + bucketIndexes[i]);
+                }
+            }
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final List<Integer> bucketIndexes = new ArrayList<>();
+        private final List<Long> counts = new ArrayList<>();
+
+        private Builder() {}
+
+        public Builder addBucket(int bucketIndex, long count) {
+            bucketIndexes.add(bucketIndex);
+            counts.add(count);
+            return this;
+        }
+
+        public NativeHistogramBuckets build() {
+            return NativeHistogramBuckets.of(bucketIndexes, counts);
+        }
+    }
+}u}(j  (7d5c1c1666c69ee595b2f175281cf23955de87d8j  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantile.javaj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantile.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xn  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Immutable representation of a Quantile.
+ */
+public class Quantile {
+
+    private final double quantile;
+    private final double value;
+
+    /**
+     * @param quantile expecting 0.0 &lt;= quantile &lt;= 1.0, otherwise an {@link IllegalArgumentException} will be thrown.
+     * @param value
+     */
+    public Quantile(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+        validate();
+    }
+
+    public double getQuantile() {
+        return quantile;
+    }
+
+    public double getValue() {
+        return value;
+    }
+
+    private void validate() {
+        if (quantile < 0.0 || quantile > 1.0) {
+            throw new IllegalArgumentException(quantile + ": Illegal quantile. Expecting 0 <= quantile <= 1");
+        }
+    }
+}u}(j  (1ad7002d2cfd9235e6a28470bdc300736a631574j  [prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantiles.javaj  addedj  KUj  K j  KUj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantiles.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.*;
+
+/**
+ * Immutable list of quantiles.
+ */
+public class Quantiles implements Iterable<Quantile> {
+
+    private final List<Quantile> quantiles;
+    public static final Quantiles EMPTY = new Quantiles(Collections.emptyList());
+
+    private Quantiles(List<Quantile> quantiles) {
+        quantiles = new ArrayList<>(quantiles);
+        quantiles.sort(Comparator.comparing(Quantile::getQuantile));
+        this.quantiles = Collections.unmodifiableList(quantiles);
+        validate();
+    }
+
+    private void validate() {
+        for (int i=0; i< quantiles.size() - 1; i++) {
+            if (quantiles.get(i).getQuantile() == quantiles.get(i+1).getQuantile()) {
+                throw new IllegalArgumentException("Duplicate " + quantiles.get(i).getQuantile() + " quantile.");
+            }
+        }
+    }
+
+     /**
+     * Create a new Quantiles instance.
+     * You can either create Quantiles with one of the static {@code Quantiles.of(...)} methods,
+     * or you can use the {@link Quantiles#newBuilder()}.
+     */
+    public static Quantiles of(List<Quantile> quantiles) {
+        return new Quantiles(quantiles);
+    }
+
+    /**
+     * Create a new Quantiles instance.
+     * You can either create Quantiles with one of the static {@code Quantiles.of(...)} methods,
+     * or you can use the {@link Quantiles#newBuilder()}.
+     */
+    public static Quantiles of(Quantile... quantiles) {
+        return of(Arrays.asList(quantiles));
+    }
+
+    public int size() {
+        return quantiles.size();
+    }
+
+    public Quantile get(int i) {
+        return quantiles.get(i);
+    }
+
+    @Override
+    public Iterator<Quantile> iterator() {
+        return quantiles.iterator();
+    }
+
+    public static class Builder {
+
+        private final List<Quantile> quantiles = new ArrayList<>();
+        private Builder() {}
+
+        public Builder addQuantile(Quantile quantile) {
+            quantiles.add(quantile);
+            return this;
+        }
+
+        /**
+         * @param quantile 0.0 &lt;= quantile &lt;= 1.0
+         */
+        public Builder addQuantile(double quantile, double value) {
+            quantiles.add(new Quantile(quantile, value));
+            return this;
+        }
+
+        public Quantiles build() {
+            return new Quantiles(quantiles);
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (4cad4ac1111b1e1cc47948d9497463b74f194309j  bprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/StateSetSnapshot.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,225 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+/**
+ * Immutable snapshot of a StateSet metric.
+ */
+public final class StateSetSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link StateSetSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link StateSetSnapshot#newBuilder()}.
+     *
+     * @param metadata See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public StateSetSnapshot(MetricMetadata metadata, Collection<StateSetDataPointSnapshot> data) {
+        super(metadata, data);
+        validate();
+    }
+
+    private void validate() {
+        if (getMetadata().hasUnit()) {
+            throw new IllegalArgumentException("An state set metric cannot have a unit.");
+        }
+        for (StateSetDataPointSnapshot entry : getData()) {
+            if (entry.getLabels().contains(getMetadata().getName())) {
+                throw new IllegalArgumentException("Label name " + getMetadata().getName() + " is reserved.");
+            }
+        }
+    }
+
+    @Override
+    public List<StateSetDataPointSnapshot> getData() {
+        return (List<StateSetDataPointSnapshot>) data;
+    }
+
+
+    public static class StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<State> {
+        private final String[] names;
+        private final boolean[] values;
+
+        /**
+         * To create a new {@link StateSetDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link StateSetDataPointSnapshot#newBuilder()}.
+         *
+         * @param names  state names. Must have at least 1 entry.
+         *               The constructor will create a copy of the array.
+         * @param values state values. Must have the same length as {@code names}.
+         *               The constructor will create a copy of the array.
+         * @param labels must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         */
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels) {
+            this(names, values, labels, 0L);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            if (names.length == 0) {
+                throw new IllegalArgumentException("StateSet must have at least one state.");
+            }
+            if (names.length != values.length) {
+                throw new IllegalArgumentException("names[] and values[] must have the same length");
+            }
+            String[] namesCopy = Arrays.copyOf(names, names.length);
+            boolean[] valuesCopy = Arrays.copyOf(values, names.length);
+            sort(namesCopy, valuesCopy);
+            this.names = namesCopy;
+            this.values = valuesCopy;
+            validate();
+        }
+
+        public int size() {
+            return names.length;
+        }
+
+        public String getName(int i) {
+            return names[i];
+        }
+
+        public boolean isTrue(int i) {
+            return values[i];
+        }
+
+        private void validate() {
+            for (int i = 0; i < names.length; i++) {
+                if (names[i].length() == 0) {
+                    throw new IllegalArgumentException("Empty string as state name");
+                }
+                if (i > 0 && names[i - 1].equals(names[i])) {
+                    throw new IllegalArgumentException(names[i] + " duplicate state name");
+                }
+            }
+        }
+
+        private List<State> asList() {
+            List<State> result = new ArrayList<>(size());
+            for (int i = 0; i < names.length; i++) {
+                result.add(new State(names[i], values[i]));
+            }
+            return Collections.unmodifiableList(result);
+        }
+
+        @Override
+        public Iterator<State> iterator() {
+            return asList().iterator();
+        }
+
+        public Stream<State> stream() {
+            return asList().stream();
+        }
+
+        private static void sort(String[] names, boolean[] values) {
+            // Bubblesort
+            int n = names.length;
+            for (int i = 0; i < n - 1; i++) {
+                for (int j = 0; j < n - i - 1; j++) {
+                    if (names[j].compareTo(names[j + 1]) > 0) {
+                        swap(j, j + 1, names, values);
+                    }
+                }
+            }
+        }
+
+        private static void swap(int i, int j, String[] names, boolean[] values) {
+            String tmpName = names[j];
+            names[j] = names[i];
+            names[i] = tmpName;
+            boolean tmpValue = values[j];
+            values[j] = values[i];
+            values[i] = tmpValue;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private final ArrayList<String> names = new ArrayList<>();
+            private final ArrayList<Boolean> values = new ArrayList<>();
+
+            private Builder() {}
+
+            public Builder addState(String name, boolean value) {
+                names.add(name);
+                values.add(value);
+                return this;
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public StateSetDataPointSnapshot build() {
+                boolean[] valuesArray = new boolean[values.size()];
+                for (int i = 0; i < values.size(); i++) {
+                    valuesArray[i] = values.get(i);
+                }
+                return new StateSetDataPointSnapshot(names.toArray(new String[]{}), valuesArray, labels, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class State {
+        private final String name;
+        private final boolean value;
+
+        private State(String name, boolean value) {
+            this.name = name;
+            this.value = value;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public boolean isTrue() {
+            return value;
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<StateSetDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(StateSetDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        @Override
+        public Builder withUnit(Unit unit) {
+            throw new IllegalArgumentException("StateSet metric cannot have a unit.");
+        }
+
+        public StateSetSnapshot build() {
+            return new StateSetSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (cf84162a7b8690e761080f346b559d497479760cj  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/SummarySnapshot.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,136 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of a Summary metric.
+ */
+public final class SummarySnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link SummarySnapshot}, you can either call the constructor directly or use
+     * the builder with {@link SummarySnapshot#newBuilder()}.
+     *
+     * @param metadata See {@link MetricMetadata} for more naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public SummarySnapshot(MetricMetadata metadata, Collection<SummaryDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<SummaryDataPointSnapshot> getData() {
+        return (List<SummaryDataPointSnapshot>) data;
+    }
+
+    public static final class SummaryDataPointSnapshot extends DistributionDataPointSnapshot {
+
+        private final Quantiles quantiles;
+
+
+        /**
+         * To create a new {@link SummaryDataPointSnapshot}, you can either call the constructor directly
+         * or use the Builder with {@link SummaryDataPointSnapshot#newBuilder()}.
+         *
+         * @param count                  total number of observations. Optional, pass -1 if not available.
+         * @param sum                    sum of all observed values. Optional, pass {@link Double#NaN} if not available.
+         * @param quantiles              must not be {@code null}. Use {@link Quantiles#EMPTY} if there are no quantiles.
+         * @param labels                 must not be {@code null}. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplars              must not be {@code null}. Use {@link Exemplars#EMPTY} if there are no exemplars.
+         * @param createdTimestampMillis timestamp (as in {@link System#currentTimeMillis()}) when this summary
+         *                               data (this specific set of labels) was created.
+         *                               Note that this refers to the creation of the timeseries,
+         *                               not the creation of the snapshot.
+         *                               The created timestamp optional. Use {@code 0L} if there is no created timestamp.
+         */
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis) {
+            this(count, sum, quantiles, labels, exemplars, createdTimestampMillis, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, long scrapeTimestampMillis) {
+            super(count, sum, exemplars, labels, createdTimestampMillis, scrapeTimestampMillis);
+            this.quantiles = quantiles;
+            validate();
+        }
+
+        public Quantiles getQuantiles() {
+            return quantiles;
+        }
+
+        private void validate() {
+            for (Label label : getLabels()) {
+                if (label.getName().equals("quantile")) {
+                    throw new IllegalArgumentException("quantile is a reserved label name for summaries");
+                }
+            }
+            if (quantiles == null) {
+                throw new NullPointerException();
+            }
+        }
+
+        public static class Builder extends DistributionDataPointSnapshot.Builder<Builder> {
+
+            private Quantiles quantiles = Quantiles.EMPTY;
+
+            private Builder() {
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+
+            public Builder withQuantiles(Quantiles quantiles) {
+                this.quantiles = quantiles;
+                return this;
+            }
+
+            @Override
+            public Builder withCount(long count) {
+                super.withCount(count);
+                return this;
+            }
+
+            public SummaryDataPointSnapshot build() {
+                return new SummaryDataPointSnapshot(count, sum, quantiles, labels, exemplars, createdTimestampMillis, scrapeTimestampMillis);
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(SummaryDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public SummarySnapshot build() {
+            return new SummarySnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (232cd914311299356ae719ea034766531c512b90j  Vprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Unit.javaj  addedj  K/j  K j  K/j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.model.snapshots;
+
+/**
+ * Some pre-defined units for convenience. You can create your own units with
+ * <pre>
+ *     new Unit("myUnit");
+ * </pre>
+ * Note that in Prometheus, units are largely based on SI base units
+ * (seconds, bytes, joules, grams, meters, ratio, volts, amperes, and celsius).
+ */
+public class Unit {
+
+    private final String name;
+
+    public static final Unit RATIO = new Unit("ratio");
+    public static final Unit SECONDS = new Unit("seconds");
+    public static final Unit BYTES = new Unit("bytes");
+    public static final Unit CELSIUS = new Unit("celsius");
+    public static final Unit JOULES = new Unit("joules");
+    public static final Unit GRAMS = new Unit("grams");
+    public static final Unit METERS = new Unit("meters");
+    public static final Unit VOLTS = new Unit("volts");
+    public static final Unit AMPERES = new Unit("amperes");
+
+    public Unit(String name) {
+        this.name = name;
+        if (name == null) {
+            throw new NullPointerException("Unit name cannot be null.");
+        }
+        if (name.isEmpty()) {
+            throw new IllegalArgumentException("Unit name cannot be empty.");
+        }
+    }
+
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    public static double nanosToSeconds(long nanos) {
+        return nanos / 1E9;
+    }
+
+    public static double millisToSeconds(long nanos) {
+        return nanos / 1E3;
+    }
+}u      }(j  (34735823be44bc387de912e87d582771794decfaj  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/UnknownSnapshot.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshot.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.model.snapshots;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Immutable snapshot of an Unknown (Untyped) metric.
+ */
+public final class UnknownSnapshot extends MetricSnapshot {
+
+    /**
+     * To create a new {@link UnknownSnapshot}, you can either call the constructor directly or use
+     * the builder with {@link UnknownSnapshot#newBuilder()}.
+     *
+     * @param metadata required name and optional help and unit.
+     *                 See {@link MetricMetadata} for naming conventions.
+     * @param data     the constructor will create a sorted copy of the collection.
+     */
+    public UnknownSnapshot(MetricMetadata metadata, Collection<UnknownDataPointSnapshot> data) {
+        super(metadata, data);
+    }
+
+    @Override
+    public List<UnknownDataPointSnapshot> getData() {
+        return (List<UnknownDataPointSnapshot>) data;
+    }
+
+    public static final class UnknownDataPointSnapshot extends DataPointSnapshot {
+
+        private final double value;
+        private final Exemplar exemplar; // may be null
+
+        /**
+         * To create a new {@link UnknownDataPointSnapshot}, you can either call the constructor directly or use the
+         * Builder with {@link UnknownDataPointSnapshot#newBuilder()}.
+         *
+         * @param value    the value.
+         * @param labels   must not be null. Use {@link Labels#EMPTY} if there are no labels.
+         * @param exemplar may be null.
+         */
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar) {
+            this(value, Labels.EMPTY, exemplar, 0);
+        }
+
+        /**
+         * Constructor with an additional scrape timestamp.
+         * This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server
+         * during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
+         */
+        public UnknownDataPointSnapshot(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) {
+            super(labels, 0L, scrapeTimestampMillis);
+            this.value = value;
+            this.exemplar = exemplar;
+        }
+
+        public double getValue() {
+            return value;
+        }
+
+        /**
+         * May return {@code null}.
+         */
+        public Exemplar getExemplar() {
+            return exemplar;
+        }
+
+        public static class Builder extends DataPointSnapshot.Builder<Builder> {
+
+            private Exemplar exemplar = null;
+            private Double value = null;
+
+            private Builder() {
+            }
+
+            /**
+             * required.
+             */
+            public Builder withValue(double value) {
+                this.value = value;
+                return this;
+            }
+
+            /**
+             * Optional
+             */
+            public Builder withExemplar(Exemplar exemplar) {
+                this.exemplar = exemplar;
+                return this;
+            }
+
+            public UnknownDataPointSnapshot build() {
+                if (value == null) {
+                    throw new IllegalArgumentException("Missing required field: value is null.");
+                }
+                return new UnknownDataPointSnapshot(value, labels, exemplar, scrapeTimestampMillis);
+            }
+
+            @Override
+            protected Builder self() {
+                return this;
+            }
+        }
+
+        public static Builder newBuilder() {
+            return new Builder();
+        }
+    }
+
+    public static class Builder extends MetricSnapshot.Builder<Builder> {
+
+        private final List<UnknownDataPointSnapshot> dataPoints = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        public Builder addDataPoint(UnknownDataPointSnapshot data) {
+            dataPoints.add(data);
+            return this;
+        }
+
+        public UnknownSnapshot build() {
+            return new UnknownSnapshot(buildMetadata(), dataPoints);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+}u}(j  (04801e13348836168fd156919907c6916d94ad6aj  mprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ClassicHistogramBucketsTest.javaj  addedj  Khj  K j  Khj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FClassicHistogramBucketsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,104 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class ClassicHistogramBucketsTest {
+
+    @Test
+    public void testGoodCase() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.NEGATIVE_INFINITY, 0)
+                .addBucket(-10.0, 7)
+                .addBucket(1024, 3)
+                .addBucket(Double.POSITIVE_INFINITY, 8)
+                .build();
+        Assert.assertEquals(4, buckets.size());
+    }
+
+    @Test
+    public void testSort() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(7, 2)
+                .addBucket(2, 0)
+                .addBucket(Double.POSITIVE_INFINITY, 3)
+                .build();
+        Assert.assertEquals(3, buckets.size());
+        Assert.assertEquals(2, buckets.getUpperBound(0), 0.0);
+        Assert.assertEquals(7, buckets.getUpperBound(1), 0.0);
+        Assert.assertEquals(Double.POSITIVE_INFINITY, buckets.getUpperBound(2), 0.0);
+        Assert.assertEquals(0, buckets.getCount(0));
+        Assert.assertEquals(2, buckets.getCount(1));
+        Assert.assertEquals(3, buckets.getCount(2));
+    }
+
+    @Test
+    public void testMinimalBuckets() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        Assert.assertEquals(1, buckets.size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInfBucketMissing() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.NEGATIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNegativeCount() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(0.0, 10)
+                .addBucket(Double.POSITIVE_INFINITY, -1)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNaNBoundary() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(0.0, 1)
+                .addBucket(Double.NaN, 2)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateBoundary() {
+        ClassicHistogramBuckets.newBuilder()
+                .addBucket(1.0, 1)
+                .addBucket(2.0, 2)
+                .addBucket(1.0, 2)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyBuckets() {
+        ClassicHistogramBuckets.newBuilder().build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDifferentLength() {
+        double[] upperBounds = new double[] {0.7, 1.3, Double.POSITIVE_INFINITY};
+        long[] counts = new long[] {13, 178, 1024, 3000};
+        ClassicHistogramBuckets.of(upperBounds, counts);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(1.0, 7)
+                .addBucket(2.0, 8)
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        Iterator<ClassicHistogramBucket> iterator = buckets.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (4f2b2d75d287ccd7ba8b82c4cae985338a6f55aej  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/CounterSnapshotTest.javaj  addedj  Klj  K j  Klj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FCounterSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,108 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class CounterSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long createdTimestamp1 = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long createdTimestamp2 = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("http_server_requests_seconds")
+                .withHelp("total time spent serving requests")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(1.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(3.0)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/world")
+                                .build())
+                        .withCreatedTimestampMillis(createdTimestamp1)
+                        .build()
+                ).addDataPoint(CounterDataPointSnapshot.newBuilder()
+                        .withValue(2.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(4.0)
+                                .withTraceId("def456")
+                                .withSpanId("234567")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("path", "/hello")
+                                .build())
+                        .withCreatedTimestampMillis(createdTimestamp2)
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "http_server_requests_seconds", "total time spent serving requests", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        CounterDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        Assert.assertEquals(Labels.of("path", "/hello"), data.getLabels());
+        Assert.assertEquals(2.0, data.getValue(), 0.0);
+        Assert.assertEquals(4.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp2, data.getCreatedTimestampMillis());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(Labels.of("path", "/world"), data.getLabels());
+        Assert.assertEquals(1.0, data.getValue(), 0.0);
+        Assert.assertEquals(3.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp1, data.getCreatedTimestampMillis());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimalGoodCase() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "events", null, null);
+        Assert.assertEquals(1, snapshot.getData().size());
+        CounterDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.EMPTY, data.getLabels());
+        Assert.assertEquals(1.0, data.getValue(), 0.0);
+        Assert.assertNull(data.getExemplar());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testEmptyCounter() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder().withName("events").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresent() {
+        CounterSnapshot.newBuilder().withName("test_total").build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        CounterDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        CounterSnapshot snapshot = CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(1.0).build())
+                .addDataPoint(CounterDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(2.0).build())
+                .build();
+        Iterator<CounterDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (385ceb029e4068bdf74659dac9278727b2aed46dj  ^prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarTest.javaj  addedj  KNj  K j  KNj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X]  @@ -0,0 +1,78 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ExemplarTest {
+
+    @Test
+    public void testGoodCaseComplete() {
+        long timestamp = System.currentTimeMillis();
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(2.2)
+                .withTraceId("abc123abc123")
+                .withSpanId("def456def456")
+                .withTimestampMillis(timestamp)
+                .withLabels(Labels.of("path", "/", "error", "none"))
+                .build();
+        Assert.assertEquals(2.2, exemplar.getValue(), 0.0);
+        Assert.assertEquals(Labels.of(Exemplar.TRACE_ID, "abc123abc123", Exemplar.SPAN_ID, "def456def456", "path", "/", "error", "none"), exemplar.getLabels());
+        Assert.assertTrue(exemplar.hasTimestamp());
+        Assert.assertEquals(timestamp, exemplar.getTimestampMillis());
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testValueMissing() {
+        Exemplar.newBuilder().build();
+    }
+
+    @Test
+    public void testMinimal() {
+        Exemplar exemplar = Exemplar.newBuilder().withValue(0.0).build();
+        Assert.assertEquals(0.0, exemplar.getValue(), 0.0);
+        Assert.assertEquals(Labels.EMPTY, exemplar.getLabels());
+        Assert.assertFalse(exemplar.hasTimestamp());
+    }
+
+    @Test
+    public void testLabelsMergeTraceId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withTraceId("abc")
+                .build();
+        Assert.assertEquals(Labels.of("a", "b", "trace_id", "abc"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeSpanId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withSpanId("abc")
+                .build();
+        Assert.assertEquals(Labels.of("a", "b", "span_id", "abc"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeTraceIdAndSpanId() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .withSpanId("abc")
+                .withTraceId("def")
+                .build();
+        Assert.assertEquals(Labels.of("span_id", "abc", "a", "b", "trace_id", "def"), exemplar.getLabels());
+    }
+
+    @Test
+    public void testLabelsMergeNone() {
+        Exemplar exemplar = Exemplar.newBuilder()
+                .withValue(0.0)
+                .withLabels(Labels.of("a", "b"))
+                .build();
+        Assert.assertEquals(Labels.of("a", "b"), exemplar.getLabels());
+    }
+}u}(j  (3ef9447a7e48775181063bccea044170d8b0d563j  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/ExemplarsTest.javaj  addedj  K*j  K j  K*j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FExemplarsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,42 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class ExemplarsTest {
+
+    @Test
+    public void testUpperBound() {
+        Exemplars exemplars = Exemplars.of(
+                Exemplar.newBuilder().withValue(1.0).build(),
+                Exemplar.newBuilder().withValue(3.0).build(),
+                Exemplar.newBuilder().withValue(2.0).build()
+        );
+        Assert.assertEquals(3, exemplars.size());
+        Assert.assertEquals(1.0, exemplars.get(0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(1).getValue(), 0.0);
+        Assert.assertEquals(2.0, exemplars.get(2).getValue(), 0.0);
+        Assert.assertEquals(1.0, exemplars.get(0.0, Double.POSITIVE_INFINITY).getValue(), 0.0);
+        Assert.assertEquals(1.0, exemplars.get(0.0, 1.0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(1.0, 4.0).getValue(), 0.0);
+        Assert.assertEquals(3.0, exemplars.get(2.0, 3.0).getValue(), 0.0);
+        Assert.assertEquals(2.0, exemplars.get(1.0, 2.1).getValue(), 0.0);
+        Assert.assertNull(exemplars.get(2.0, 2.1));
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        Exemplars exemplars = Exemplars.of(
+                Exemplar.newBuilder().withValue(1.0).build(),
+                Exemplar.newBuilder().withValue(3.0).build(),
+                Exemplar.newBuilder().withValue(2.0).build()
+        );
+        Iterator<Exemplar> iterator = exemplars.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (20a094a236ec5589bc0f928619b559353987a6f0j  cprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/GaugeSnapshotTest.javaj  addedj  Kjj  K j  Kjj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FGaugeSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X]  @@ -0,0 +1,106 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class GaugeSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long exemplarTimestamp = System.currentTimeMillis();
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("cache_size_bytes")
+                .withHelp("cache size in Bytes")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(1024.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(1024.0)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "prod")
+                                .build())
+                        .build()
+                ).addDataPoint(GaugeDataPointSnapshot.newBuilder()
+                        .withValue(128.0)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(128.0)
+                                .withTraceId("def456")
+                                .withSpanId("234567")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "dev")
+                                .build())
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "cache_size_bytes", "cache size in Bytes", "bytes");
+        Assert.assertEquals(2, snapshot.getData().size());
+        GaugeDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/hello"
+        Assert.assertEquals(Labels.of("env", "dev"), data.getLabels());
+        Assert.assertEquals(128.0, data.getValue(), 0.0);
+        Assert.assertEquals(128.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
+        Assert.assertEquals(1024.0, data.getValue(), 0.0);
+        Assert.assertEquals(1024.0, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimalGoodCase() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("temperature")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withValue(23.0).build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "temperature", null, null);
+        Assert.assertEquals(1, snapshot.getData().size());
+        GaugeDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.EMPTY, data.getLabels());
+        Assert.assertEquals(23.0, data.getValue(), 0.0);
+        Assert.assertNull(data.getExemplar());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testEmptyGauge() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("temperature")
+                .build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testTotalSuffixPresent() {
+        CounterSnapshot.newBuilder().withName("test_total").build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        CounterDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        GaugeSnapshot snapshot = GaugeSnapshot.newBuilder()
+                .withName("gauge")
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "a")).withValue(23.0).build())
+                .addDataPoint(GaugeDataPointSnapshot.newBuilder().withLabels(Labels.of("a", "b")).withValue(23.0).build())
+                .build();
+        Iterator<GaugeDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (9dc21a2358170bab952c996021e109e66e161618j  gprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.javaj  addedj  M
j  K j  M
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FHistogramSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xk6  @@ -0,0 +1,269 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class HistogramSnapshotTest {
+
+    @Test
+    public void testGoodCaseComplete() {
+        long createdTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        Exemplar exemplar1 = Exemplar.newBuilder()
+                .withValue(129.0)
+                .withTraceId("abcabc")
+                .withSpanId("defdef")
+                .withLabels(Labels.of("status", "200"))
+                .withTimestampMillis(exemplarTimestamp)
+                .build();
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("request sizes in bytes")
+                .withUnit(Unit.BYTES)
+                .addDataPoint(
+                        HistogramDataPointSnapshot.newBuilder()
+                                .withSum(27000.0)
+                                .withNativeSchema(5)
+                                .withNativeZeroCount(2)
+                                .withNativeZeroThreshold(0.0000001)
+                                .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                        .addBucket(Double.POSITIVE_INFINITY, 0)
+                                        .addBucket(128.0, 7)
+                                        .addBucket(1024.0, 15)
+                                        .build())
+                                // The total number of observations in the native and classic histogram
+                                // is consistent (22 observations), but the individual bucket counts don't fit.
+                                // It doesn't matter for this test, but it would be good to use a more consistent
+                                // example in the test.
+                                .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                        .addBucket(1, 12)
+                                        .addBucket(2, 3)
+                                        .addBucket(4, 2)
+                                        .build())
+                                .withNativeBucketsForNegativeValues(NativeHistogramBuckets.newBuilder()
+                                        .addBucket(-1, 1)
+                                        .addBucket(0, 2)
+                                        .build())
+                                .withLabels(Labels.of("path", "/"))
+                                .withExemplars(Exemplars.of(exemplar1))
+                                .withCreatedTimestampMillis(createdTimestamp)
+                                .withScrapeTimestampMillis(scrapeTimestamp)
+                                .build())
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withCount(3) // TODO how is that not a compile error? This is a protected method!
+                                .withSum(400.2)
+                        .withNativeSchema(5)
+                                .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                        .addBucket(128.0, 0)
+                                        .addBucket(1024.0, 4)
+                                        .addBucket(Double.POSITIVE_INFINITY, 2)
+                                        .build())
+                        .withNativeBucketsForPositiveValues(NativeHistogramBuckets.newBuilder()
+                                .addBucket(-1, 1)
+                                .addBucket(3, 3)
+                                .addBucket(4, 2)
+                                .build())
+                                .withLabels(Labels.of("path", "/api/v1"))
+                                .withExemplars(Exemplars.of(exemplar1))
+                                .withCreatedTimestampMillis(createdTimestamp)
+                                .withScrapeTimestampMillis(scrapeTimestamp)
+                                .build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "request_size_bytes", "request sizes in bytes", "bytes");
+
+        Assert.assertEquals(2, snapshot.getData().size());
+        HistogramDataPointSnapshot data = snapshot.getData().get(0); // data is sorted by labels, so the first one should be path="/"
+        Assert.assertTrue(data.hasSum());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertTrue(data.hasCreatedTimestamp());
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(22, data.getCount());
+        Assert.assertEquals(27000.0, data.getSum(), 0.0);
+        Assert.assertEquals(Labels.of("path", "/"), data.getLabels());
+        Assert.assertEquals(exemplar1.getValue(), data.getExemplars().get(128.0, 1024.0).getValue(), 0.0);
+        Assert.assertEquals(createdTimestamp, data.getCreatedTimestampMillis());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        // classic histogram 1
+        int i = 0;
+        for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(128.0, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(7, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(1024.0, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(15, bucket.getCount());
+                    break;
+                case 2:
+                    Assert.assertEquals(Double.POSITIVE_INFINITY, bucket.getUpperBound(), 0.0);
+                    Assert.assertEquals(0, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 3 classic histogram buckets", 3, i);
+        // native histogram 1
+        Assert.assertEquals(5, data.getNativeSchema());
+        Assert.assertEquals(2, data.getNativeZeroCount());
+        Assert.assertEquals(0.0000001, data.getNativeZeroThreshold(), 0.0000001);
+        Assert.assertEquals(3, data.getNativeBucketsForPositiveValues().size());
+        i = 0;
+        for (NativeHistogramBucket bucket : data.getNativeBucketsForPositiveValues()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(1, bucket.getBucketIndex());
+                    Assert.assertEquals(12, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(2, bucket.getBucketIndex());
+                    Assert.assertEquals(3, bucket.getCount());
+                    break;
+                case 2:
+                    Assert.assertEquals(4, bucket.getBucketIndex());
+                    Assert.assertEquals(2, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 3 native buckets for positive values", 3, i);
+        i = 0;
+        Assert.assertEquals(2, data.getNativeBucketsForNegativeValues().size());
+        for (NativeHistogramBucket bucket : data.getNativeBucketsForNegativeValues()) {
+            switch (i++) {
+                case 0:
+                    Assert.assertEquals(-1, bucket.getBucketIndex());
+                    Assert.assertEquals(1, bucket.getCount());
+                    break;
+                case 1:
+                    Assert.assertEquals(0, bucket.getBucketIndex());
+                    Assert.assertEquals(2, bucket.getCount());
+                    break;
+            }
+        }
+        Assert.assertEquals("expecting 2 native buckets for positive values", 2, i);
+        // classic histogram 2 (it's ok that this is incomplete, because we covered it with the other tests)
+        data = snapshot.getData().get(1);
+        Assert.assertEquals(6, data.getCount());
+        // native histogram 2 (it's ok that this is incomplete, because we covered it with the other tests)
+        Assert.assertEquals(5, data.getNativeSchema());
+        Assert.assertEquals(0, data.getNativeZeroCount());
+        Assert.assertEquals(0, data.getNativeZeroThreshold(), 0);
+    }
+
+    @Test
+    public void testEmptyHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("empty_histogram")
+                .build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test
+    public void testMinimalClassicHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("minimal_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
+                        .build())
+                .build();
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasSum());
+        Assert.assertEquals(1, snapshot.getData().get(0).getClassicBuckets().size());
+    }
+
+    @Test
+    public void testMinimalNativeHistogram() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("hist")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withNativeSchema(5)
+                        .build())
+                .build();
+        Assert.assertEquals("hist", snapshot.getMetadata().getName());
+        Assert.assertFalse(snapshot.getMetadata().hasUnit());
+        Assert.assertEquals(1, snapshot.getData().size());
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(0, data.getCount());
+        Assert.assertFalse(data.hasSum());
+        Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
+        Assert.assertEquals(0, data.getNativeBucketsForPositiveValues().size());
+    }
+
+    @Test
+    public void testClassicCount() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("test_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.newBuilder()
+                                .addBucket(1.0, 3)
+                                .addBucket(2.0, 2)
+                                .addBucket(Double.POSITIVE_INFINITY, 0)
+                                .build())
+                        .build())
+                .build();
+        HistogramDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertFalse(data.hasSum());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(5, data.getCount());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyData() {
+        // This will fail because one of nativeSchema and classicHistogramBuckets is required
+        HistogramDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test
+    public void testEmptyNativeData() {
+        HistogramDataPointSnapshot data = HistogramDataPointSnapshot.newBuilder()
+                .withNativeSchema(5)
+                .build();
+        Assert.assertEquals(0, data.getNativeBucketsForNegativeValues().size());
+        Assert.assertEquals(0, data.getNativeBucketsForPositiveValues().size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        HistogramSnapshot snapshot = HistogramSnapshot.newBuilder()
+                .withName("test_histogram")
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "a"))
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{0}))
+                        .build())
+                .addDataPoint(HistogramDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "b"))
+                        .withClassicHistogramBuckets(ClassicHistogramBuckets.of(new double[]{Double.POSITIVE_INFINITY}, new long[]{2}))
+                        .build())
+                .build();
+        Iterator<HistogramDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyClassicBuckets() {
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+
+    @Test
+    public void testMinimalNativeData() {
+        new HistogramDataPointSnapshot(ClassicHistogramBuckets.EMPTY, 0, 0, 0.0,
+                NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+
+    @Test
+    public void testMinimalClassicData() {
+        ClassicHistogramBuckets buckets = ClassicHistogramBuckets.newBuilder()
+                .addBucket(Double.POSITIVE_INFINITY, 0)
+                .build();
+        new HistogramDataPointSnapshot(buckets, HistogramSnapshot.CLASSIC_HISTOGRAM, 0, 0.0,
+                NativeHistogramBuckets.EMPTY, NativeHistogramBuckets.EMPTY, Double.NaN, Labels.EMPTY, Exemplars.EMPTY, 0L);
+    }
+}u}(j  (e5b7d55be16907e5898140948d7e2250ad1b6aadj  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/InfoSnapshotTest.javaj  addedj  K.j  K j  K.j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FInfoSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class InfoSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder()
+                .withName("target")
+                .withHelp("Target info")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway"))
+                        .build())
+                .build();
+        Assert.assertEquals("target", snapshot.getMetadata().getName());
+        Assert.assertEquals("Target info", snapshot.getMetadata().getHelp());
+        Assert.assertFalse(snapshot.getMetadata().hasUnit());
+        Assert.assertEquals(1, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmptyInfo() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder().withName("target").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        InfoSnapshot snapshot = InfoSnapshot.newBuilder()
+                .withName("target")
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9100", "service_name", "gateway.v1"))
+                        .build())
+                .addDataPoint(InfoSnapshot.InfoDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("instance_id", "127.0.0.1:9200", "service_name", "gateway.v2"))
+                        .build())
+                .build();
+        Iterator<InfoSnapshot.InfoDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (8eaa8333a65d7157b364c52e20bbb1a74a20117fj  \prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelsTest.javaj  addedj  KPj  K j  KPj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabelsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import org.junit.Assert;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotEquals;
+
+public class LabelsTest {
+
+    private <T extends Comparable<T>> void assertLessThan(T a, T b) {
+        Assert.assertTrue(a.compareTo(b) < 0);
+    }
+
+    private <T extends Comparable<T>> void assertGreaterThan(T a, T b) {
+        Assert.assertTrue(a.compareTo(b) > 0);
+    }
+
+    @Test
+    public void testCompareDifferentLabelNames() {
+        Labels labels1 = Labels.of("env", "prod", "status2", "200");
+        Labels labels2 = Labels.of("env", "prod", "status1", "200");
+        assertGreaterThan(labels1, labels2);
+        assertLessThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+    @Test
+    public void testCompareSameLabelNames() {
+        // If all label names are the same, labels should be sorted by label value.
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "500");
+        assertLessThan(labels1, labels2);
+        assertGreaterThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+    @Test
+    public void testCompareDifferentNumberOfLabels() {
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "200", "x_code", "none");
+        assertLessThan(labels1, labels2);
+        assertGreaterThan(labels2, labels1);
+        assertNotEquals(labels1, labels2);
+        assertNotEquals(labels2, labels1);
+    }
+
+
+    @Test
+    public void testCompareEquals() {
+        Labels labels1 = Labels.of("env", "prod", "status", "200");
+        Labels labels2 = Labels.of("env", "prod", "status", "200");
+        Assert.assertEquals(0, labels1.compareTo(labels2));
+        Assert.assertEquals(0, labels2.compareTo(labels1));
+        Assert.assertEquals(labels1, labels2);
+        Assert.assertEquals(labels2, labels1);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalLabelName() {
+        Labels.of("http.status_code", "200");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testReservedLabelName() {
+        Labels.of("__name__", "requests_total");
+    }
+
+    @Test
+    public void testSanitizeLabelName() {
+        Assert.assertEquals("_my_label", Labels.sanitizeLabelName("...my/label"));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabelName() {
+        Labels.of("name1", "value1", "name2", "value2", "name1", "value3");
+    }
+}u}(j  (a655954f7c35a987d073e1fce0e46661c84ed336j  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricMetadataTest.javaj  addedj  K7j  K j  K7j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricMetadataTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,55 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MetricMetadataTest {
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testEmptyName() {
+        new MetricMetadata("");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNullName() {
+        new MetricMetadata(null);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIllegalName() {
+        new MetricMetadata("http.server.duration");
+    }
+
+    @Test
+    public void testSanitizationIllegalCharacters() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("http.server.duration"), "help string", Unit.SECONDS);
+        Assert.assertEquals("http_server_duration", metadata.getName());
+        Assert.assertEquals("help string", metadata.getHelp());
+        Assert.assertEquals("seconds", metadata.getUnit().toString());
+    }
+
+    @Test
+    public void testSanitizationCounter() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("my_events_total"));
+        Assert.assertEquals("my_events", metadata.getName());
+    }
+
+    @Test
+    public void testSanitizationInfo() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("target_info"));
+        Assert.assertEquals("target", metadata.getName());
+    }
+
+    @Test
+    public void testSanitizationWeirdCornerCase() {
+        MetricMetadata metadata = new MetricMetadata(MetricMetadata.sanitizeMetricName("_total_created"));
+        Assert.assertEquals("total", metadata.getName());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testSanitizeEmptyString() {
+        MetricMetadata.sanitizeMetricName("");
+    }
+}u}(j  (492472c9408a101b92e3f33e6a00419c6b8bf62bj  dprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotTest.javaj  addedj  K%j  K j  K%j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MetricSnapshotTest {
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateLabels() {
+        CounterSnapshot.newBuilder()
+                .withName("events")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/hello", "status", "200"))
+                        .withValue(1.0)
+                        .build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("path", "/world", "status", "200"))
+                        .withValue(2.0)
+                        .build())
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("status", "200", "path", "/hello"))
+                        .withValue(3.0)
+                        .build())
+                .build();
+    }
+
+    @Test
+    public void testNoData() {
+        MetricSnapshot snapshot = CounterSnapshot.newBuilder().withName("test").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void testNullData() {
+        new CounterSnapshot(new MetricMetadata("test"), null);
+    }
+}u}(j  (7066146c46da3afc1ab1efdfd5aac059e3e66682j  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/MetricSnapshotsTest.javaj  addedj  KVj  K j  KVj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FMetricSnapshotsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XI  @@ -0,0 +1,86 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class MetricSnapshotsTest {
+
+    @Test
+    public void testEmpty() {
+        MetricSnapshots snapshots = MetricSnapshots.newBuilder().build();
+        Assert.assertFalse(snapshots.stream().findAny().isPresent());
+    }
+
+    @Test
+    public void testSort() {
+        CounterSnapshot c1 = CounterSnapshot.newBuilder()
+                .withName("counter1")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c2 = CounterSnapshot.newBuilder()
+                .withName("counter2")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c3 = CounterSnapshot.newBuilder()
+                .withName("counter3")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
+        Assert.assertEquals(3, snapshots.size());
+        Assert.assertEquals("counter1", snapshots.get(0).getMetadata().getName());
+        Assert.assertEquals("counter2", snapshots.get(1).getMetadata().getName());
+        Assert.assertEquals("counter3", snapshots.get(2).getMetadata().getName());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateName() {
+        // Q: What if you have a counter named "foo" and a gauge named "foo"?
+        // A: Great question. You might think this is a valid scenario, because the counter will produce
+        //    the values "foo_total" and "foo_created" while the gauge will produce the value "foo".
+        //    So from that perspective there is no conflict. However, the name for HELP, TYPE, UNIT is the same,
+        //    and that is the conflict. Therefore, you cannot have a counter named "foo" and a gauge named "foo".
+        CounterSnapshot c = CounterSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        GaugeSnapshot g = GaugeSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(GaugeSnapshot.GaugeDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        new MetricSnapshots(c, g);
+    }
+
+    @Test
+    public void testBuilder() {
+        CounterSnapshot counter = CounterSnapshot.newBuilder()
+                .withName("my_metric")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots.Builder builder = MetricSnapshots.newBuilder();
+        Assert.assertFalse(builder.containsMetricName("my_metric"));
+        builder.addMetricSnapshot(counter);
+        Assert.assertTrue(builder.containsMetricName("my_metric"));
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        CounterSnapshot c1 = CounterSnapshot.newBuilder()
+                .withName("counter1")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c2 = CounterSnapshot.newBuilder()
+                .withName("counter2")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        CounterSnapshot c3 = CounterSnapshot.newBuilder()
+                .withName("counter3")
+                .addDataPoint(CounterSnapshot.CounterDataPointSnapshot.newBuilder().withValue(1.0).build())
+                .build();
+        MetricSnapshots snapshots = new MetricSnapshots(c2, c3, c1);
+        Iterator<MetricSnapshot> iterator = snapshots.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+}u}(j  (2797be5565791a7f41bfa01176390c8a275d323ej  lprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucketsTest.javaj  addedj  KAj  K j  KAj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBucketsTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XN	  @@ -0,0 +1,65 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.NativeHistogramBucket;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class NativeHistogramBucketsTest {
+
+    @Test
+    public void testGoodCase() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(-10, 12)
+                .addBucket(120, 17)
+                .build();
+        Assert.assertEquals(2, buckets.size());
+        Assert.assertEquals(-10, buckets.getBucketIndex(0));
+        Assert.assertEquals(12, buckets.getCount(0));
+        Assert.assertEquals(120, buckets.getBucketIndex(1));
+        Assert.assertEquals(17, buckets.getCount(1));
+    }
+
+    @Test
+    public void testEmpty() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder().build();
+        Assert.assertEquals(0, buckets.size());
+    }
+
+    @Test
+    public void testSort() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(7, 4)
+                .addBucket(2, 0)
+                .addBucket(5, 3)
+                .build();
+        Assert.assertEquals(3, buckets.size());
+        Assert.assertEquals(2, buckets.getBucketIndex(0));
+        Assert.assertEquals(5, buckets.getBucketIndex(1));
+        Assert.assertEquals(7, buckets.getBucketIndex(2));
+        Assert.assertEquals(0, buckets.getCount(0));
+        Assert.assertEquals(3, buckets.getCount(1));
+        Assert.assertEquals(4, buckets.getCount(2));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDifferentLength() {
+        int[] bucketIndexes = new int[] {0, 1, 2};
+        long[] cumulativeCounts = new long[] {13, 178, 1024, 3000};
+        NativeHistogramBuckets.of(bucketIndexes, cumulativeCounts);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        NativeHistogramBuckets buckets = NativeHistogramBuckets.newBuilder()
+                .addBucket(1, 1)
+                .addBucket(2, 1)
+                .build();
+        Iterator<NativeHistogramBucket> iterator = buckets.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+}u}(j  (43b586119205de3dc0f50eae664fe44b1a6c2499j  _prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/QuantilesTest.javaj  addedj  K5j  K j  K5j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FQuantilesTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X#  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+
+public class QuantilesTest {
+
+    @Test
+    public void testSort() {
+        Quantiles quantiles = Quantiles.newBuilder()
+                .addQuantile(0.99, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+        Assert.assertEquals(3, quantiles.size());
+        Assert.assertEquals(0.5, quantiles.get(0).getQuantile(), 0);
+        Assert.assertEquals(0.2, quantiles.get(0).getValue(), 0);
+        Assert.assertEquals(0.95, quantiles.get(1).getQuantile(), 0);
+        Assert.assertEquals(0.22, quantiles.get(1).getValue(), 0);
+        Assert.assertEquals(0.99, quantiles.get(2).getQuantile(), 0);
+        Assert.assertEquals(0.23, quantiles.get(2).getValue(), 0);
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testImmutable() {
+        Quantiles quantiles = Quantiles.newBuilder()
+                .addQuantile(0.99, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+        Iterator<Quantile> iterator = quantiles.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test
+    public void testEmpty() {
+        Assert.assertEquals(0, Quantiles.EMPTY.size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicate() {
+        Quantiles.newBuilder()
+                .addQuantile(0.95, 0.23)
+                .addQuantile(0.5, 0.2)
+                .addQuantile(0.95, 0.22)
+                .build();
+    }
+}uF     }(j  (54766debdca65622d507c6f1365900e54f2b0809j  bprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SnapshotTestUtil.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSnapshotTestUtil.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,17 @@
+package io.prometheus.metrics.model.snapshots;
+
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import org.junit.Assert;
+
+public class SnapshotTestUtil {
+
+    public static void assertMetadata(MetricSnapshot snapshot, String name, String help, String unit) {
+        Assert.assertEquals(name, snapshot.getMetadata().getName());
+        Assert.assertEquals(help, snapshot.getMetadata().getHelp());
+        if (unit != null) {
+            Assert.assertEquals(unit, snapshot.getMetadata().getUnit().toString());
+        } else {
+            Assert.assertNull(snapshot.getMetadata().getUnit());
+        }
+    }
+}u}(j  (6c4fa61d35329e3482e6fcbbf2b06b49a826dc77j  fprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/StateSetSnapshotTest.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FStateSetSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,145 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+public class StateSetSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_feature_flags")
+                .withHelp("Feature Flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "controller"))
+                        .withScrapeTimestampMillis(scrapeTimestamp)
+                        .addState("feature1", true)
+                        .addState("feature2", false)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "api"))
+                        .addState("feature1", false)
+                        .addState("feature2", false)
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "my_feature_flags", "Feature Flags", null);
+        Assert.assertEquals(2, snapshot.getData().size());
+        StateSetSnapshot.StateSetDataPointSnapshot data = snapshot.getData().get(1); // data is sorted by labels, so the second one should be entity="controller"
+        Assert.assertEquals(Labels.of("entity", "controller"), data.getLabels());
+        Assert.assertEquals(2, data.size());
+        Assert.assertEquals("feature1", data.getName(0));
+        Assert.assertTrue(data.isTrue(0));
+        Assert.assertEquals("feature2", data.getName(1));
+        Assert.assertFalse(data.isTrue(1));
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+    }
+
+    @Test
+    public void testStateSetDataSorted() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("b", true)
+                .addState("d", false)
+                .addState("c", true)
+                .addState("a", false)
+                .build();
+        Assert.assertEquals(4, data.size());
+        Assert.assertEquals("a", data.getName(0));
+        Assert.assertFalse(data.isTrue(0));
+        Assert.assertEquals("b", data.getName(1));
+        Assert.assertTrue(data.isTrue(1));
+        Assert.assertEquals("c", data.getName(2));
+        Assert.assertTrue(data.isTrue(2));
+        Assert.assertEquals("d", data.getName(3));
+        Assert.assertFalse(data.isTrue(3));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testMustHaveState() {
+        // Must have at least one state.
+        StateSetSnapshot.StateSetDataPointSnapshot.newBuilder().build();
+    }
+
+    @Test
+    public void testMinimal() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_flag")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("flag", true)
+                        .build()
+                )
+                .build();
+        Assert.assertEquals(1, snapshot.data.size());
+    }
+
+    @Test
+    public void testEmpty() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("my_flag")
+                .build();
+        Assert.assertEquals(0, snapshot.data.size());
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testDataImmutable() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("a", true)
+                .addState("b", true)
+                .addState("c", true)
+                .build();
+        Iterator<StateSetSnapshot.State> iterator = data.iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testDuplicateState() {
+        StateSetSnapshot.StateSetDataPointSnapshot data = StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                .addState("a", true)
+                .addState("b", true)
+                .addState("a", true)
+                .build();
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void testStateSetImmutable() {
+        StateSetSnapshot snapshot = StateSetSnapshot.newBuilder()
+                .withName("flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "controller"))
+                        .addState("feature", true)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("entity", "api"))
+                        .addState("feature", true)
+                        .build()
+                )
+                .build();
+        Iterator<StateSetSnapshot.StateSetDataPointSnapshot> iterator = snapshot.getData().iterator();
+        iterator.next();
+        iterator.remove();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testLabelsUnique() {
+        StateSetSnapshot.newBuilder()
+                .withName("flags")
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("feature", true)
+                        .build()
+                )
+                .addDataPoint(StateSetSnapshot.StateSetDataPointSnapshot.newBuilder()
+                        .addState("feature", true)
+                        .build()
+                )
+                .build();
+    }
+}u}(j  (cf65f46bf2c6096f777b1b9d767511927d757b4fj  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SummarySnapshotTest.javaj  addedj  Kij  K j  Kij  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FSummarySnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X+  @@ -0,0 +1,105 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.concurrent.TimeUnit;
+
+public class SummarySnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long createdTimestamp = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1);
+        long scrapeTimestamp = System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(2);
+        long exemplarTimestamp = System.currentTimeMillis();
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder()
+                .withName("latency_seconds")
+                .withHelp("latency in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withCreatedTimestampMillis(createdTimestamp)
+                        .withScrapeTimestampMillis(scrapeTimestamp)
+                        .withLabels(Labels.of("endpoint", "/"))
+                        .withQuantiles(Quantiles.newBuilder()
+                                .addQuantile(0.5, 0.2)
+                                .addQuantile(0.95, 0.22)
+                                .addQuantile(0.99, 0.23)
+                                .build())
+                        .withExemplars(Exemplars.newBuilder()
+                                .addExemplar(Exemplar.newBuilder()
+                                        .withValue(0.2)
+                                        .withTraceId("abc123")
+                                        .withSpanId("123457")
+                                        .withTimestampMillis(exemplarTimestamp)
+                                        .build())
+                                .addExemplar(Exemplar.newBuilder()
+                                        .withValue(0.21)
+                                        .withTraceId("abc124")
+                                        .withSpanId("123458")
+                                        .withTimestampMillis(exemplarTimestamp)
+                                        .build())
+                                .build())
+                        .withCount(1093)
+                        .withSum(218.6)
+                        .build())
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("endpoint", "/test"))
+                        .withCount(1093)
+                        .withSum(218.6)
+                        .build())
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "latency_seconds", "latency in seconds", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        SummarySnapshot.SummaryDataPointSnapshot data = snapshot.getData().get(0);
+        Assert.assertEquals(Labels.of("endpoint", "/"), data.getLabels());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertEquals(1093, data.getCount());
+        Assert.assertTrue(data.hasSum());
+        Assert.assertEquals(218.6, data.getSum(), 0);
+        Assert.assertTrue(data.hasCreatedTimestamp());
+        Assert.assertEquals(createdTimestamp, data.getCreatedTimestampMillis());
+        Assert.assertTrue(data.hasScrapeTimestamp());
+        Assert.assertEquals(scrapeTimestamp, data.getScrapeTimestampMillis());
+        Quantiles quantiles = data.getQuantiles();
+        Assert.assertEquals(3, quantiles.size());
+        // quantiles are tested in QuantilesTest already, skipping here.
+        Assert.assertEquals(2, data.getExemplars().size());
+        // exemplars are tested in ExemplarsTest already, skipping here.
+
+        data = snapshot.getData().get(1);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertTrue(data.hasCount());
+        Assert.assertTrue(data.hasSum());
+    }
+
+    @Test
+    public void testMinimal() {
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder()
+                .withName("size_bytes")
+                .addDataPoint(SummarySnapshot.SummaryDataPointSnapshot.newBuilder()
+                        .withCount(10)
+                        .withSum(12.0)
+                        .build())
+                .build();
+        Assert.assertEquals(1, snapshot.getData().size());
+        Assert.assertEquals(Labels.EMPTY, snapshot.getData().get(0).getLabels());
+    }
+
+    @Test
+    public void testEmptySnapshot() {
+        SummarySnapshot snapshot = SummarySnapshot.newBuilder().withName("empty_summary").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmptyData() {
+        SummarySnapshot.SummaryDataPointSnapshot data = SummarySnapshot.SummaryDataPointSnapshot.newBuilder().build();
+        Assert.assertEquals(0, data.getQuantiles().size());
+        Assert.assertFalse(data.hasCount());
+        Assert.assertFalse(data.hasSum());
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+        Assert.assertEquals(0, data.getExemplars().size());
+    }
+}u}(j  (b8a9827d28794d2698f99e4124b8e3a0eb82a596j  eprometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/UnknownSnapshotTest.javaj  addedj  KGj  K j  KGj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnknownSnapshotTest.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,71 @@
+package io.prometheus.metrics.model.snapshots;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class UnknownSnapshotTest {
+
+    @Test
+    public void testCompleteGoodCase() {
+        long exemplarTimestamp = System.currentTimeMillis();
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
+                .withName("my_unknown_seconds")
+                .withHelp("something in seconds")
+                .withUnit(Unit.SECONDS)
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.3)
+                        .withExemplar(Exemplar.newBuilder()
+                                .withValue(0.12)
+                                .withTraceId("abc123")
+                                .withSpanId("123457")
+                                .withTimestampMillis(exemplarTimestamp)
+                                .build())
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "prod")
+                                .build())
+                        .build()
+                ).addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(0.29)
+                        .withLabels(Labels.newBuilder()
+                                .addLabel("env", "dev")
+                                .build())
+                        .build()
+                )
+                .build();
+        SnapshotTestUtil.assertMetadata(snapshot, "my_unknown_seconds", "something in seconds", "seconds");
+        Assert.assertEquals(2, snapshot.getData().size());
+        UnknownSnapshot.UnknownDataPointSnapshot data = snapshot.getData().get(1); // env="prod"
+        Assert.assertEquals(Labels.of("env", "prod"), data.getLabels());
+        Assert.assertEquals(0.3, data.getValue(), 0.0);
+        Assert.assertEquals(0.12, data.getExemplar().getValue(), 0.0);
+        Assert.assertFalse(data.hasCreatedTimestamp());
+        Assert.assertFalse(data.hasScrapeTimestamp());
+    }
+
+    @Test
+    public void testMinimal() {
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder()
+                .withName("test")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withValue(1.0)
+                        .build())
+                .build();
+        Assert.assertEquals(1, snapshot.getData().size());
+    }
+
+    @Test
+    public void testEmpty() {
+        UnknownSnapshot snapshot = UnknownSnapshot.newBuilder().withName("test").build();
+        Assert.assertEquals(0, snapshot.getData().size());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNameMissing() {
+        UnknownSnapshot.newBuilder().build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testValueMissing() {
+        UnknownSnapshot.UnknownDataPointSnapshot.newBuilder().build();
+    }
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  *prometheus-metrics-model/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-model%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (f8e9ed1d30b72e989873e68fcb3e47947738c37ej  !prometheus-metrics-tracer/pom.xmlj  addedj  K4j  K j  K4j  {https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fpom.xmlj  zhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X\  @@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer</artifactId>
+  <packaging>pom</packaging>
+
+  <name>Prometheus Metrics Tracer</name>
+  <description>
+    Parent for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>io.opentelemetry</groupId>
+        <artifactId>opentelemetry-api</artifactId>
+        <version>1.28.0</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <modules>
+    <module>prometheus-metrics-tracer-common</module>
+    <module>prometheus-metrics-tracer-initializer</module>
+    <module>prometheus-metrics-tracer-otel</module>
+    <module>prometheus-metrics-tracer-otel-agent</module>
+  </modules>
+
+</project>u}(j  (2bd042af919c6581d56c682462cc70f7087728f4j  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj  addedj  K"j  K j  K"j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xs  @@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-common</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer Common</name>
+  <description>
+    Common Module for Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+</project>u}(j  (b53fe4d20100ea67179ff52a5d7df8ba607641a0j  }prometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/tracer/common/SpanContext.javaj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fcommon%2FSpanContext.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,26 @@
+package io.prometheus.metrics.tracer.common;
+
+public interface SpanContext {
+
+  public static final String EXEMPLAR_ATTRIBUTE_NAME = "exemplar";
+  public static final String EXEMPLAR_ATTRIBUTE_VALUE = "true";
+
+  /**
+   * @return the current trace id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentTraceId();
+
+  /**
+   * @return the current span id, or {@code null} if this call is not happening within a span context.
+   */
+  String getCurrentSpanId();
+  
+  /**
+   * @return the state of the current Span. If this value is false a component before in the chain take the decision to not record it. Subsequent calling service have
+   * to respect this value in order not to have partial TraceID with only some Span in it. This value is important to be sure to choose a recorded Trace in Examplar
+   * sampling process
+   */
+  boolean isCurrentSpanSampled();
+
+  void markCurrentSpanAsExemplar();
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Lprometheus-metrics-tracer/prometheus-metrics-tracer-common/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (ec939e20e9255d37cbc7560f38c7c70357b256bdj  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj  addedj  K4j  K j  K4j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-initializer</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer Initializer</name>
+  <description>
+    Initialize Prometheus integrations with distributed tracing libraries.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>u}(j  (caecb60552207ed6ec9e37445fde04b60dfd0cddj  prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/src/main/java/io/prometheus/metrics/tracer/initializer/SpanContextSupplier.javaj  addedj  K-j  K j  K-j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.javaj  X
  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Finitializer%2FSpanContextSupplier.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xq  @@ -0,0 +1,45 @@
+package io.prometheus.metrics.tracer.initializer;
+
+import io.prometheus.metrics.tracer.common.SpanContext;
+import io.prometheus.metrics.tracer.otel.OpenTelemetrySpanContext;
+import io.prometheus.metrics.tracer.otel_agent.OpenTelemetryAgentSpanContext;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+public class SpanContextSupplier {
+
+    private static final AtomicReference<SpanContext> spanContextRef = new AtomicReference<SpanContext>();
+
+    public static void setSpanContext(SpanContext spanContext) {
+        spanContextRef.set(spanContext);
+    }
+
+    public static boolean hasSpanContext() {
+        return getSpanContext() != null;
+    }
+
+    public static SpanContext getSpanContext() {
+        return spanContextRef.get();
+    }
+
+    static {
+        try {
+            if (OpenTelemetrySpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetrySpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+        try {
+            if (OpenTelemetryAgentSpanContext.isAvailable()) {
+                spanContextRef.set(new OpenTelemetryAgentSpanContext());
+            }
+        } catch (NoClassDefFoundError ignored) {
+            // tracer_otel_agent dependency not found
+        } catch (UnsupportedClassVersionError ignored) {
+            // OpenTelemetry requires Java 8, but client_java might run on Java 6.
+        }
+    }
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Qprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (e24405186b4bca359cf017f6674d9d49a7219d42j  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj  addedj  KNj  K j  KNj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X	  @@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer OpenTelemetry Agent</name>
+  <description>
+    Prometheus integration with the OpenTelemetry Java agent for distributed tracing.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <relocations>
+                <relocation>
+                  <pattern>io.opentelemetry.api</pattern>
+                  <shadedPattern>io.opentelemetry.javaagent.shaded.io.opentelemetry.api</shadedPattern>
+                </relocation>
+              </relocations>
+              <artifactSet>
+                <excludes>
+                  <exclude>io.prometheus:prometheus-metrics-tracer-common</exclude>
+                </excludes>
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>u}(j  (36cba7076b092af8770b5f56e2f172571c67f9cfj  prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/src/main/java/io/prometheus/metrics/tracer/otel_agent/OpenTelemetryAgentSpanContext.javaj  addedj  K4j  K j  K4j  X  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj  X  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel_agent%2FOpenTelemetryAgentSpanContext.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  XT  @@ -0,0 +1,52 @@
+package io.prometheus.metrics.tracer.otel_agent;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.tracer.common.SpanContext;
+
+/**
+ * This is exactly the same as the {@code OpenTelemetrySpanContextSupplier}.
+ * However, the {@code io.opentelemetry.api} package is relocated to
+ * {@code io.opentelemetry.javaagent.shaded.io.opentelemetry.api} in the OpenTelemetry agent.
+ */
+public class OpenTelemetryAgentSpanContext implements SpanContext {
+
+  public static boolean isAvailable() {
+    try {
+      OpenTelemetryAgentSpanContext test = new OpenTelemetryAgentSpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+  @Override
+  public String getCurrentTraceId() {
+    String traceId = Span.current().getSpanContext().getTraceId();
+    return TraceId.isValid(traceId) ? traceId : null;
+  }
+
+  @Override
+  public String getCurrentSpanId() {
+    String spanId = Span.current().getSpanContext().getSpanId();
+    return SpanId.isValid(spanId) ? spanId : null;
+  }
+
+  @Override
+  public boolean isCurrentSpanSampled() {
+    return Span.current().getSpanContext().isSampled();
+  }
+
+  @Override
+  public void markCurrentSpanAsExemplar() {
+    Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+  }
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Pprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (6ee789fdf7f61da9eedc33f7d650ebffe5e733e3j  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj  addedj  K0j  K j  K0j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>io.prometheus</groupId>
+    <artifactId>prometheus-metrics-tracer</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>prometheus-metrics-tracer-otel</artifactId>
+  <packaging>bundle</packaging>
+
+  <name>Prometheus Metrics Tracer OpenTelemetry</name>
+  <description>
+    Prometheus integration with the OpenTelemetry distributed tracing library.
+  </description>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>fstab</id>
+      <name>Fabian Stäber</name>
+      <email>fabian@fstab.de</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.prometheus</groupId>
+      <artifactId>prometheus-metrics-tracer-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.opentelemetry</groupId>
+      <artifactId>opentelemetry-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+</project>u}(j  (dd338cea292518a3692b778903027da876b61ad6j  prometheus-metrics-tracer/prometheus-metrics-tracer-otel/src/main/java/io/prometheus/metrics/tracer/otel/OpenTelemetrySpanContext.javaj  addedj  K/j  K j  K/j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.javaj  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Ftracer%2Fotel%2FOpenTelemetrySpanContext.java?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X)  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.tracer.otel;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.SpanId;
+import io.opentelemetry.api.trace.TraceId;
+import io.prometheus.metrics.tracer.common.SpanContext;
+
+public class OpenTelemetrySpanContext implements SpanContext {
+
+	public static boolean isAvailable() {
+    try {
+      OpenTelemetrySpanContext test = new OpenTelemetrySpanContext();
+      test.getCurrentSpanId();
+      test.getCurrentTraceId();
+      test.isCurrentSpanSampled();
+      return true;
+    } catch (LinkageError ignored) {
+      // NoClassDefFoundError:
+      //   Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
+      // IncompatibleClassChangeError:
+      //   The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
+      return false;
+    }
+  }
+
+	@Override
+	public String getCurrentTraceId() {
+		String traceId = Span.current().getSpanContext().getTraceId();
+		return TraceId.isValid(traceId) ? traceId : null;
+	}
+
+	@Override
+	public String getCurrentSpanId() {
+		String spanId = Span.current().getSpanContext().getSpanId();
+		return SpanId.isValid(spanId) ? spanId : null;
+	}
+
+	@Override
+	public boolean isCurrentSpanSampled() {
+		return Span.current().getSpanContext().isSampled();
+	}
+
+	@Override
+	public void markCurrentSpanAsExemplar() {
+		Span.current().setAttribute(EXEMPLAR_ATTRIBUTE_NAME, EXEMPLAR_ATTRIBUTE_VALUE);
+	}
+}u}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  Jprometheus-metrics-tracer/prometheus-metrics-tracer-otel/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (76f8da4fdac807bdd51576ea7166c6ed45cb8ffbj  +prometheus-metrics-tracer/version-rules.xmlj  addedj  Kj  K j  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fversion-rules.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/prometheus-metrics-tracer%2Fversion-rules.xmlj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fversion-rules.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -0,0 +1,6 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+    </rules>
+</ruleset>
\ No newline at end of fileu}(j  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj  protobuf-shaded/.gitignorej  addedj  Kj  K j  Kj  thttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2F.gitignorej  shttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2F.gitignorej  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  @@ -0,0 +1 @@
+src/main/javau}(j  (5db4149b724982e6ff8f55ae96f4f8a07804d590j  protobuf-shaded/README.mdj  addedj  Kj  K j  Kj  shttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2FREADME.mdj  rhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2FREADME.mdj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  @@ -0,0 +1 @@
+See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j  (42cb34138a9bcae4a594f094ca5b771b62de4105j  protobuf-shaded/pom.xmlj  addedj  Kj  K j  Kj  qhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2Fpom.xmlj  phttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/protobuf-shaded%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  Xr  @@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>protobuf-shaded</artifactId>
+    <name>Shaded (relocated to another package) Protobuf</name>
+    <description>
+        Downloads Google Protobuf, compiles it, and reloacates/shades.
+        See also hbase-thirdparty/hbase-shaded-protobuf
+    </description>
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <!-- include the protos -->
+                    <include>google/**</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <!--Clean needs to purge src/main/java since this is where
+                     the unpack of protobuf is overlaid. Do it for usual
+                     clean goal but also before we unpack in case patches
+                     delete/add files. We use src/main/java instead of dir
+                     under 'target' because the jar plugin is dumb, hard to
+                     make it source from other then src/main/java.-->
+                <artifactId>maven-clean-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>pre-generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>${basedir}/src/main/java</directory>
+                            <includes>
+                                <include>**/**</include>
+                            </includes>
+                            <followSymlinks>false</followSymlinks>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+            <plugin>
+                <!--Download our dependency src, i.e. protobuf, and
+                     unpack it. Overlays src/main/java so ready for
+                    compile-time (the jar plugin expects src in
+                    src/main/java)-->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <!--
+                              The protobuf-java has no compile or runtime dependency so we
+                              only depend it here, without adding it to our dependencies
+                              section. Need to review later if protobuf-java has compile or
+                              runtime dependencies in the future.
+                            -->
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.google.protobuf</groupId>
+                                    <artifactId>protobuf-java</artifactId>
+                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
+                                    <version>3.21.7</version>
+                                    <classifier>sources</classifier>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
+                                    <includes>**/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>google/protobuf/*.proto</exclude>
+                        <exclude>google/protobuf/compiler/*.proto</exclude>
+                    </excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--Above we built a jar. Now at package step, do relocation/shade-->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>
+                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
+                                    </shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>google/protobuf/*.proto</exclude>
+                        <exclude>google/protobuf/compiler/*.proto</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (16dd46d4f12193c14bd4e485174a5f901371da77j  simpleclient/pom.xmlj  modifiedj  Kj  Kj  Kj  nhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient%2Fpom.xmlj  mhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X;  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(j  (e54830a6d8004739ebd6991e57fd90a5beed57a7j  simpleclient_bom/pom.xmlj  modifiedj  Kj  Kj  Kj  rhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_bom%2Fpom.xmlj  qhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_bom%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X?  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(j  (d6a195f49944134cbdc277d3620eb507f86d084aj  simpleclient_caffeine/pom.xmlj  modifiedj  Kj  Kj  Kj  whttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_caffeine%2Fpom.xmlj  vhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_caffeine%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.github.ben-manes.caffeine</groupId>u}(j  (67c05bbcdb4cfcc4484d06f4cc7f16a8cc72f879j  simpleclient_common/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_common%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j  (f6aeabbe558cdbbad5a448317ae3b5624730c48fj  simpleclient_dropwizard/pom.xmlj  modifiedj  Kj  K0j  K3j  yhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_dropwizard%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_dropwizard%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X	  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.dropwizard.metrics</groupId>
@@ -63,49 +63,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
 </project>u}(j  (862ebd4c8c54a97ac08b108cdb0673034b871b5fj  $simpleclient_graphite_bridge/pom.xmlj  modifiedj  Kj  Kj  Kj  ~https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_graphite_bridge%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_graphite_bridge%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j  (9ddb2f231b13ab06a81fee63bf3ce105540776a6j  simpleclient_guava/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_guava%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_guava%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>u      }(j  (58695646606877516cc68a13832e3830a3dc0431j  simpleclient_hibernate/pom.xmlj  modifiedj  Kj  Kj  Kj  xhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_hibernate%2Fpom.xmlj  whttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_hibernate%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- We support Hibernate versions >= 4.2 -->u}(j  (30c3f5ed79f448501246b4ccf971599110d3f4ddj  simpleclient_hotspot/pom.xmlj  modifiedj  Kj  K0j  K4j  vhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_hotspot%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_hotspot%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>
@@ -36,14 +36,14 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         
         <!-- Test Dependencies Follow -->
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -67,48 +67,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                    <testSource>1.8</testSource>
-                    <testTarget>1.8</testTarget>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <!-- Intellij does not support different Java versions for source and testSource -->
-            <!-- As a workaround, use Java 8 in Intellij. -->
-            <!-- This will be fixed with https://youtrack.jetbrains.com/issue/IDEA-85478 -->
-            <id>intellij</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-                <property>
-                    <!-- This property is only set when you open the project in Intellij. -->
-                    <!-- When you compile in the command line, the property will not be set -->
-                    <!-- and this profile will not be used. -->
-                    <name>idea.maven.embedder.version</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
 </project>u}(j  (693bc9dccf3d1a2ba3122faac0d34adedd68abf7j  simpleclient_httpserver/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_httpserver%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_httpserver%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>
@@ -36,12 +36,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j  (44a8dd332c8e21c85465dfbad45772b717946825j  simpleclient_jetty/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_jetty%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_jetty%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>
@@ -38,7 +38,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(j  (5ed130a89db28eacdf2731f36bddf89ce170575dj  simpleclient_jetty_jdk8/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_jetty_jdk8%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_jetty_jdk8%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>
@@ -16,19 +16,6 @@
         Collector of data from Jetty Statistics for Jetty versions which require JDK 8.
     </description>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
@@ -47,7 +34,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>u}(j  (67d294ff7eb58eac134c447445ed586e96f3187aj  simpleclient_log4j/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_log4j%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_log4j%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j  (13af55105af26d0bd311e939da3b9ea151802d1ej  simpleclient_log4j2/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_log4j2%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_log4j2%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>u}(j  (51aaa5cdef9bfb4fb37bbab8474740d88337bd64j  simpleclient_logback/pom.xmlj  modifiedj  Kj  Kj  Kj  vhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_logback%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_logback%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>u}(j  (6197919d58ef87fd8f6f05fbb6c108d4f764cc01j   simpleclient_pushgateway/pom.xmlj  modifiedj  Kj  Kj  Kj  zhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_pushgateway%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_pushgateway%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>
@@ -37,12 +37,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.xml.bind</groupId>u}(j  (2e2033e41547903e43a9998f0332fd406ba3c524j  simpleclient_servlet/pom.xmlj  modifiedj  Kj  Kj  K
j  vhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet%2Fpom.xmlj  uhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>u}(j  (df5068323a33744892e30f236a3492dead6de827j  #simpleclient_servlet_common/pom.xmlj  modifiedj  Kj  Kj  Kj  }https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet_common%2Fpom.xmlj  |https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>
@@ -40,12 +40,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <!-- Test Dependencies Follow -->
         <dependency>u}(j  (ede162091d55ab298c96343edf8eb8fce6d0cfc2j  $simpleclient_servlet_jakarta/pom.xmlj  modifiedj  Kj  Kj  K
j  ~https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet_jakarta%2Fpom.xmlj  }https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_servlet_jakarta%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>
@@ -40,17 +40,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_servlet_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>u}(j  (0f8e40208fbe5c3b4c6d8bedf8cdf56412086909j   simpleclient_spring_boot/pom.xmlj  modifiedj  Kj  Kj  K
j  zhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_spring_boot%2Fpom.xmlj  yhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_spring_boot%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_boot%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_boot</artifactId>
@@ -51,17 +51,17 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
           <groupId>io.prometheus</groupId>
           <artifactId>simpleclient_spring_web</artifactId>
-          <version>0.16.1-SNAPSHOT</version>
+          <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>u}(j  (982d8f2274b88bde88935de1130cf2809a51bcd0j  simpleclient_spring_web/pom.xmlj  modifiedj  Kj  Kj  Kj  yhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_spring_web%2Fpom.xmlj  xhttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_spring_web%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -4,8 +4,8 @@
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>
@@ -51,12 +51,12 @@
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>simpleclient_common</artifactId>
-            <version>0.16.1-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>u}(j  (92f806f61fb61bf54e492975125275928f19b4d3j  simpleclient_tracer/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X(  @@ -4,8 +4,8 @@
 
   <parent>
     <groupId>io.prometheus</groupId>
-    <artifactId>parent</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <artifactId>client_java</artifactId>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(j  (5536dfe89887ce6789f09401e63da87ae32151f2j  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(j  (dedf920421314c40bb06d69a6bc12f41bd3b466aj  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj  modifiedj  Kj  Kj  Kj  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>
@@ -27,19 +27,6 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <licenses>
     <license>
       <name>The Apache Software License, Version 2.0</name>u}(j  (488b3db0a344f652b735f1e9be805287ba74f1d5j  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj  modifiedj  Kj  K	j  K
j  https://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>0.16.1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>
@@ -54,14 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 u}(j  (dd3fba81c862be1074d9a8a3e31c8203eb4be9f7j  simpleclient_vertx/pom.xmlj  modifiedj  Kj  Kj  Kj  thttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_vertx%2Fpom.xmlj  shttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_vertx%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -1,23 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(j  (5ddc9f56747dfeb609a44f7e93908da7549d775fj  simpleclient_vertx4/pom.xmlj  modifiedj  Kj  Kj  Kj  uhttps://github.com/prometheus/client_java/blob/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_vertx4%2Fpom.xmlj  thttps://github.com/prometheus/client_java/raw/6284222cc856ead9c341e2c57c6b16dd5975f26b/simpleclient_vertx4%2Fpom.xmlj  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=6284222cc856ead9c341e2c57c6b16dd5975f26bj  X  @@ -1,23 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 
     <parent>
         <groupId>io.prometheus</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.16.1-SNAPSHOT</version>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(6c71218eef8c7c1f9017ce96008c489d7459f86c}(sha(6c71218eef8c7c1f9017ce96008c489d7459f86cnode_idEC_kwDOAHoJt9oAKDZjNzEyMThlZWY4YzdjMWY5MDE3Y2U5NjAwOGM0ODlkNzQ1OWY4NmMcommit}(author}(namedhoardemaildoug.hoard@gmail.comdate2023-08-05T23:03:17Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-29T20:19:20Zumessage`Changed to remove use of inefficient String method

Signed-off-by: dhoard <doug.hoard@gmail.com>tree}(j  (1028f879b355626c1eceac89eb6d888d45620c61urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1028f879b355626c1eceac89eb6d888d45620c61uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6c71218eef8c7c1f9017ce96008c489d7459f86c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/6c71218eef8c7c1f9017ce96008c489d7459f86chtml_urlYhttps://github.com/prometheus/client_java/commit/6c71218eef8c7c1f9017ce96008c489d7459f86ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6c71218eef8c7c1f9017ce96008c489d7459f86c/commentsj  }(logindhoardidJV'j  MDQ6VXNlcjE5Mzc2NDcw
avatar_url4https://avatars.githubusercontent.com/u/19376470?v=4gravatar_idh3j  #https://api.github.com/users/dhoardj  https://github.com/dhoard
followers_url-https://api.github.com/users/dhoard/followers
following_url:https://api.github.com/users/dhoard/following{/other_user}	gists_url3https://api.github.com/users/dhoard/gists{/gist_id}starred_url:https://api.github.com/users/dhoard/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/dhoard/subscriptionsorganizations_url(https://api.github.com/users/dhoard/orgs	repos_url)https://api.github.com/users/dhoard/repos
events_url4https://api.github.com/users/dhoard/events{/privacy}received_events_url3https://api.github.com/users/dhoard/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}jď  2https://api.github.com/users/fstab/received_eventsjƏ  Userjȏ  uparents]}(j  (644da5a0b6e121cf83b8654e86616c138caefabaj  dhttps://api.github.com/repos/prometheus/client_java/commits/644da5a0b6e121cf83b8654e86616c138caefabaj  Yhttps://github.com/prometheus/client_java/commit/644da5a0b6e121cf83b8654e86616c138caefabauastats}(totalK
	additionsK	deletionsKufiles]}(j  (58c0ebfa9381d5ef96cef2786d75238983757bd5filenameVsimpleclient_common/src/main/java/io/prometheus/client/exporter/common/TextFormat.javastatusmodifiedj  Kj  KchangesK
blob_urlhttps://github.com/prometheus/client_java/blob/6c71218eef8c7c1f9017ce96008c489d7459f86c/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javaraw_urlhttps://github.com/prometheus/client_java/raw/6c71218eef8c7c1f9017ce96008c489d7459f86c/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fclient%2Fexporter%2Fcommon%2FTextFormat.java?ref=6c71218eef8c7c1f9017ce96008c489d7459f86cpatchX  @@ -137,8 +137,9 @@ public static void write004(Writer writer, Enumeration<Collector.MetricFamilySam
   }
 
   private static void writeEscapedHelp(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");
@@ -153,8 +154,9 @@ private static void writeEscapedHelp(Writer writer, String s) throws IOException
   }
 
   private static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
+    char[] characters = s.toCharArray();
+    for (int i = 0; i < characters.length; i++) {
+      char c = characters[i];
       switch (c) {
         case '\\':
           writer.append("\\\\");uau(4fde8312ca337674dd9981ab5d7d280840e37183}(sha(4fde8312ca337674dd9981ab5d7d280840e37183node_idEC_kwDOAHoJt9oAKDRmZGU4MzEyY2EzMzc2NzRkZDk5ODFhYjVkN2QyODA4NDBlMzcxODMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-11T20:37:32Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-29T20:30:16ZumessageKAdd OpenTelemetry exporter

Signed-off-by: Fabian Stäber <fabian@fstab.de>tree}(j  (cd15180898bc086f6217a425700a937f9ed92597urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/cd15180898bc086f6217a425700a937f9ed92597uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/4fde8312ca337674dd9981ab5d7d280840e37183
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/4fde8312ca337674dd9981ab5d7d280840e37183html_urlYhttps://github.com/prometheus/client_java/commit/4fde8312ca337674dd9981ab5d7d280840e37183comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/4fde8312ca337674dd9981ab5d7d280840e37183/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j   fstabj"  J' j  MDQ6VXNlcjMzMDUzNQ==j$  2https://avatars.githubusercontent.com/u/330535?v=4j&  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj)  ,https://api.github.com/users/fstab/followersj+  9https://api.github.com/users/fstab/following{/other_user}j-  2https://api.github.com/users/fstab/gists{/gist_id}j/  9https://api.github.com/users/fstab/starred{/owner}{/repo}j1  0https://api.github.com/users/fstab/subscriptionsj3  'https://api.github.com/users/fstab/orgsj5  (https://api.github.com/users/fstab/reposj7  3https://api.github.com/users/fstab/events{/privacy}j9  2https://api.github.com/users/fstab/received_eventsj;  Userj=  uparents]}(j  (c208b817c60035bcc07ea9008e6c1d6a066ddc40j  dhttps://api.github.com/repos/prometheus/client_java/commits/c208b817c60035bcc07ea9008e6c1d6a066ddc40j  Yhttps://github.com/prometheus/client_java/commit/c208b817c60035bcc07ea9008e6c1d6a066ddc40uastats}(totalMZ	additionsM	deletionsM`ufiles](}(j  (ee84aafe6d637f9451ea2a45a98ad2789c7d80a7filename.circleci/config.ymlstatusmodifiedjW  KjX  KchangesKblob_urlnhttps://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/.circleci%2Fconfig.ymlraw_urlmhttps://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/.circleci%2Fconfig.yml?ref=4fde8312ca337674dd9981ab5d7d280840e37183patchX  @@ -3,20 +3,20 @@ machine: true
 jobs:
   build:
     machine:
-      image: ubuntu-2204:2023.04.2
+      image: ubuntu-2204:2023.07.2
     working_directory: ~/circleci-java
     steps:
       - run:
-          name: Install OpenJDK 11
+          name: Install OpenJDK 17
           command: |
-              sudo apt-get update && sudo apt-get install openjdk-11-jdk
-              sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-              sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
+              sudo apt-get update && sudo apt-get install -y openjdk-17-jdk
+              sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
+              sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
               java -version
       - checkout
       - restore_cache:
           key: maven-dependencies-{{ checksum "pom.xml" }}
-      # - run: cd protobuf-shaded && ../mvnw install && cd ..
+      - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd ..
       - run: ./mvnw clean install
       - run: ./mvnw javadoc:jar
       - save_cache:u}(j  (bbe7aab8ad67d7ecfec27072a34f33936d1c1953j]  2examples/example-exemplars-tail-sampling/README.mdj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2FREADME.mdjf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2FREADME.md?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -60,7 +60,7 @@ The example is built as part of the `client_java` parent project with
 ./mvnw package
 ```
 
-This should generate two Java services `.../example-greeting-service/target/example-greeting-service-[version].jar` and `.../example-hello-world-app/target/example-hello-world-app-[version].jar`.
+This should generate two Java services `.../example-greeting-service/target/example-greeting-service.jar` and `.../example-hello-world-app/target/example-hello-world-app.jar`.
 
 ## Run the Example
 u}(j  (ed293444607ffb9985c6670a77cc6042b9f84eddj]  <examples/example-exemplars-tail-sampling/docker-compose.yamlj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yamljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fdocker-compose.yaml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XD  @@ -12,7 +12,7 @@ services:
     ports:
       - "8080:8080"
     volumes:
-      - ./example-hello-world-app/target/example-hello-world-app-1.0.0-alpha-2-SNAPSHOT.jar:/hello-world-app.jar
+      - ./example-hello-world-app/target/example-hello-world-app.jar:/example-hello-world-app.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -21,15 +21,15 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /hello-world-app.jar
+      - /example-hello-world-app.jar
   greeting-service:
     # The opentelemetry-java-agent image is coming from the hello-world-up service above.
     image: opentelemetry-java-agent
     network_mode: host
     ports:
       - "8081:8081"
     volumes:
-      - ./example-greeting-service/target/example-greeting-service-1.0.0-alpha-2-SNAPSHOT.jar:/greeting-service.jar
+      - ./example-greeting-service/target/example-greeting-service.jar:/example-greeting-service.jar
     environment:
       - OTEL_TRACES_EXPORTER=otlp
       - OTEL_METRICS_EXPORTER=none
@@ -38,7 +38,7 @@ services:
       - java
       - -javaagent:/opentelemetry-javaagent.jar
       - -jar
-      - /greeting-service.jar
+      - /example-greeting-service.jar
   collector:
     image: otel/opentelemetry-collector-contrib:0.79.0
     network_mode: hostu}(j  (81c6d573c5f3130cacfdc28c011a18a260bcd288j]  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmlj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j  (e91ade6aceaf818d176460321559b0b310dcab3dj]  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmlj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>u}(j  (8bdf213ec9a35830a610393c3496be82b3232d26j]  .examples/example-exporter-httpserver/README.mdj_  renamedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2FREADME.mdjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2FREADME.mdjf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2FREADME.md?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/example-httpserver/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-httpserver/target/`.
 
 ```
-java -jar ./examples/example-httpserver/target/example-tomcat-servlet-1.0.0-alpha-3-SNAPSHOT.jar
+java -jar ./examples/example-exporter-httpserver/target/example-exporter-httpserver.jar
 ```
 
 ## Manually testing the Metrics Endpoint
@@ -31,7 +31,3 @@ The exporter supports a `debug` URL parameter to quickly view other formats in y
 * [http://localhost:9400/metrics?debug=text](http://localhost:9400/metrics?debug=text): Prometheus text format, same as without the `debug` option.
 * [http://localhost:9400/metrics?debug=openmetrics](http://localhost:9400/metrics?debug=openmetrics): OpenMetrics text format.
 * [http://localhost:9400/metrics?debug=prometheus-protobuf](http://localhost:9400/metrics?debug=prometheus-protobuf): Text representation of the Prometheus protobuf format.
-
-## TODO
-
-Implement an example of a histogram and show how to use this with Prometheus, see [../example-tomcat-servlet](../example-tomcat-servlet).previous_filename%examples/example-httpserver/README.mdu}(j  (a425c326850318d40de104ce142b72d365af6c29j]  ,examples/example-exporter-httpserver/pom.xmlj_  renamedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xl  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-httpserver</artifactId>
+    <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>Example - HTTPServer</name>
+    <name>>Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>
@@ -45,6 +45,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  #examples/example-httpserver/pom.xmlu}(j  (0563d583a93f32d63b484dd0d677f75db81927caj]  fexamples/example-exporter-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javaj_  renamedjW  K jX  K ja  K jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.javajf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fhttpserver%2FMain.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183j  ]examples/example-httpserver/src/main/java/io/prometheus/metrics/examples/httpserver/Main.javau}(j  (1b95eccc2632c79e6f0939feae3e6d938b8b4f45j]  1examples/example-exporter-opentelemetry/README.mdj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2FREADME.mdjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2FREADME.mdjf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2FREADME.md?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,28 @@
+# OpenTelemetry Exporter Example
+
+## Build
+
+This example is built as part of the `client_java` project.
+
+```
+./mvnw package
+```
+
+## Run
+
+Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is present, run the demo with:
+
+```bash
+cd ./examples/example-exporter-opentelemetry/
+docker-compose up
+```
+
+This will set up the following scenario:
+
+```mermaid
+flowchart LR
+   A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server]
+```
+
+The OpenTelemetry collector is configured to log incoming metrics to the console.
+The Prometheus server is running on [http://localhost:9090](http://localhost:9090).u}(j  (923840e0c85a643976792d88e8dff7c10d446ceej]  Bexamples/example-exporter-opentelemetry/config/otelcol-config.yamlj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yamljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fotelcol-config.yaml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xv  @@ -0,0 +1,21 @@
+receivers:
+  otlp:
+    protocols:
+      grpc:
+      http:
+
+processors:
+  batch:
+
+exporters:
+  prometheusremotewrite:
+    endpoint: http://localhost:9090/api/v1/write
+  logging:
+    verbosity: detailed
+
+service:
+  pipelines:
+    metrics:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [logging, prometheusremotewrite]u}(j  (9f559dae84e3c48a4906a74606ac401cada2f6b9j]  >examples/example-exporter-opentelemetry/config/prometheus.yamlj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -0,0 +1,6 @@
+#global:
+#  scrape_interval: 10s
+#scrape_configs:
+#  - job_name: "prometheus-direct"
+#    static_configs:
+#      - targets: ["localhost:9400"]u}(j  (b66982521545b7d9a42b8a5e7a9c9b62c72e4fa5j]  ;examples/example-exporter-opentelemetry/docker-compose.yamlj_  addedjW  K$jX  K ja  K$jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yamljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fdocker-compose.yaml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X   @@ -0,0 +1,36 @@
+version: "3"
+services:
+  prometheus-opentelemetry-example-app:
+    image: openjdk:11-jre
+    network_mode: host
+    ports:
+      - "5005:5005"
+    volumes:
+      - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar
+    command:
+      - java
+      - -jar
+      #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
+      - /example-exporter-opentelemetry.jar
+  collector:
+    image: otel/opentelemetry-collector-contrib:0.79.0
+    network_mode: host
+    ports:
+      - "4317:4317"
+      - "4318:4318"
+    volumes:
+      - ./config/otelcol-config.yaml:/config.yaml
+    command:
+      - --config=file:/config.yaml
+  prometheus:
+    image: prom/prometheus:v2.45.0
+    network_mode: host
+    ports:
+      - "9090:9090"
+    volumes:
+      - ./config/prometheus.yaml:/prometheus.yaml
+    command:
+      - --enable-feature=exemplar-storage
+      - --enable-feature=native-histograms
+      - --web.enable-remote-write-receiver
+      - --config.file=/prometheus.yamlu}(j  (842faa1a34c19b3c29f56a5a83792306681906b6j]  /examples/example-exporter-opentelemetry/pom.xmlj_  addedjW  KGjX  K ja  KGjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X
  @@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>examples</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>example-exporter-opentelemetry</artifactId>
+
+    <name>Example - OpenTelemetry Metrics Exporter</name>
+    <description>
+        Example of exposing metrics in OpenTelemetry format and pushing them to an OpenTelemetry collector
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>io.prometheus.metrics.examples.opentelemetry.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (9f7a3d5a8e2e66f21cd9317d4878e562f66abf63j]  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,29 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+/**
+ * Simple example of an application exposing metrics pushing metrics via OTLP.
+ */
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+}u}(j  (c0b41e8c50b99702145364ba034f48b544693df3j]  examples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/ManualCompleteMetricsTest.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FManualCompleteMetricsTest.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X#  @@ -0,0 +1,145 @@
+package io.prometheus.metrics.examples.opentelemetry;
+
+/*
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
+import io.prometheus.metrics.core.metrics.Summary;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+
+import java.util.Random;
+*/
+
+public class ManualCompleteMetricsTest {
+
+    // This contains a complete set of all metric types, and target_info and otel_scope_info.
+    // I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
+    // I'm keeping this as a backup for now, but this should be converted to an integration test.
+    //
+    // To run it, add prometheus-metrics-exporter-httpserver as a dependency and configure Prometheus
+    // to scrape from port 9400 in addition to receiving metrics via remote write.
+
+    /*
+    public static void main(String[] args) throws Exception {
+
+        Counter counter = Counter.newBuilder()
+                .withName("uptime_seconds_total")
+                .withHelp("total number of seconds since this application was started")
+                .withUnit(Unit.SECONDS)
+                .register();
+
+        Gauge gauge = Gauge.newBuilder()
+                .withName("temperature_celsius")
+                .withHelp("temperature in celsius")
+                .withUnit(Unit.CELSIUS)
+                .withLabelNames("location")
+                .register();
+
+        gauge.withLabelValues("inside").set(23.4);
+        gauge.withLabelValues("outside").set(9.3);
+
+        // By default, the histogram will be exported as an exponential histogram in OpenTelemetry.
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i = 0; i < 1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        // Explicitly use a classic-only histogram to have an example of a classic histogram in OpenTelemetry
+        Histogram classicHistogram = Histogram.newBuilder()
+                .withName("request_size_bytes")
+                .withHelp("Request size in Bytes")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("path")
+                .classicOnly()
+                .withClassicBuckets(128, 256, 512, 1024, 2048)
+                .register();
+
+        for (int i = 0; i < 15; i++) {
+            classicHistogram.withLabelValues("200").observe(random.nextInt(3000));
+        }
+
+        Summary summary = Summary.newBuilder()
+                .withName("response_latency_seconds")
+                .withHelp("Response latency seconds")
+                .withUnit(Unit.BYTES)
+                .withQuantile(0.95)
+                .withQuantile(0.99)
+                .register();
+
+        for (int i = 0; i < 1000; i++) {
+            summary.observe(random.nextGaussian());
+        }
+
+        Info targetInfo = Info.newBuilder()
+                .withName("target_info")
+                .withHelp("OTel resource")
+                .withLabelNames("service.version")
+                .register();
+        targetInfo.setLabelValues("1.0.0");
+
+        Info scopeInfo = Info.newBuilder()
+                .withName("otel_scope_info")
+                .withLabelNames("otel.scope.name", "otel.scope.version", "library_mascot")
+                .register();
+
+        scopeInfo.setLabelValues("my.instrumentation.lib", "100.3", "bear");
+
+        Info info = Info.newBuilder()
+                .withName("java_runtime_info")
+                .withHelp("Java runtime info")
+                .withLabelNames("version", "vendor", "runtime")
+                .register();
+
+        String version = System.getProperty("java.runtime.version", "unknown");
+        String vendor = System.getProperty("java.vm.vendor", "unknown");
+        String runtime = System.getProperty("java.runtime.name", "unknown");
+
+        info.setLabelValues(version, vendor, runtime);
+
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
+        PrometheusRegistry.defaultRegistry.register(() -> UnknownSnapshot.newBuilder()
+                .withName("my_unknown_metric")
+                .addDataPoint(UnknownSnapshot.UnknownDataPointSnapshot.newBuilder()
+                        .withLabels(Labels.of("a", "1", "b", "2"))
+                        .withValue(3.0)
+                        .build())
+                .build());
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
+        OpenTelemetryExporter.newBuilder()
+                .withIntervalSeconds(5)
+                .buildAndStart();
+
+        while (true) {
+            Thread.sleep(1000);
+            counter.inc();
+        }
+    }
+     */
+}u}(j  (8d50c0c80603d5469a7144bac6387c8bff45e75bj]  2examples/example-exporter-servlet-tomcat/README.mdj_  renamedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md}.     jd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2FREADME.mdjf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2FREADME.md?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X|  @@ -10,10 +10,10 @@ This example is built as part of the `client_java` project.
 
 ## Run
 
-The build creates a JAR file with the example application in `./examples/tomcat-servlet-example/target/`.
+The build creates a JAR file with the example application in `./examples/example-exporter-servlet-tomcat/target/`.
 
 ```
-java -jar ./examples/tomcat-servlet-example/target/tomcat-servlet-example-1.0.0-alpha-2-SNAPSHOT.jar
+java -jar ./examples/example-exporter-servlet-tomcat/target/example-exporter-servlet-tomcat.jar
 ```
 
 Accessing [http://localhost:8080/](http://localhost:8080/) with a Web browser should yield `Hello, World!`.j  )examples/example-tomcat-servlet/README.mdu}(j  (aa89bfc43d3859d5988d9fa2ac2fd1376980dd97j]  0examples/example-exporter-servlet-tomcat/pom.xmlj_  renamedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xx  @@ -8,9 +8,9 @@
         <version>1.0.0-alpha-3-SNAPSHOT</version>
     </parent>
 
-    <artifactId>example-tomcat-servlet</artifactId>
+    <artifactId>example-exporter-servlet-tomcat</artifactId>
 
-    <name>Example - Tomcat Servlet</name>
+    <name>Example - Servlet Exporter with Tomcat</name>
     <description>
         Prometheus Metrics Example using Embedded Tomcat and the Exporter Servlet
     </description>
@@ -50,6 +50,7 @@
     </dependencies>
 
     <build>
+        <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>j  'examples/example-tomcat-servlet/pom.xmlu}(j  (7a95e36da299e8ce780ea5f0d2f2751765754afcj]  {examples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javaj_  renamedjW  K jX  K ja  K jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.javajf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FHelloWorldServlet.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183j  rexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/HelloWorldServlet.javau}(j  (571e55a2b5d259f0401a881e9631fa0acce8e791j]  nexamples/example-exporter-servlet-tomcat/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javaj_  renamedjW  K jX  K ja  K jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.javajf  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Ftomcat_servlet%2FMain.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183j  eexamples/example-tomcat-servlet/src/main/java/io/prometheus/metrics/examples/tomcat_servlet/Main.javau}(j  (6535b05e1474660627803d1962e85282e910cf9dj]  examples/pom.xmlj_  modifiedjW  KjX  Kja  Kjb  jhttps://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fpom.xmljd  ihttps://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/examples%2Fpom.xmljf  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -33,9 +33,10 @@
     </developers>
 
     <modules>
-        <module>example-httpserver</module>
-        <module>example-tomcat-servlet</module>
         <module>example-exemplars-tail-sampling</module>
+        <module>example-exporter-servlet-tomcat</module>
+        <module>example-exporter-httpserver</module>
+        <module>example-exporter-opentelemetry</module>
     </modules>
 
 </project>u}(j  (9cd27a42c58845389736906bc49d2160af05792fj]  integration-tests/it-exporter/it-exporter-httpserver-sample/src/main/java/io/prometheus/metrics/it/exporter/httpserver/HTTPServerSample.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fhttpserver%2FHTTPServerSample.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException, InterruptedException
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-httpserver-sample");
+        info.addLabelValues("exporter-httpserver-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (b46c112af431ec1a41165983f476978e4d0a654ej]  integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.javaj_  modifiedjW  KjX  Kja  Kjb  X  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajd  X
  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.javajf  X   https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Fjetty%2FExporterServletJettySample.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-jetty-sample");
+        info.addLabelValues("exporter-servlet-jetty-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (9a44b01535c57c14d4ace04dd1c4e716316c7c32j]  integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.javaj_  modifiedjW  KjX  Kja  Kjb  X  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajd  X  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.javajf  X#  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fit%2Fexporter%2Fservlet%2Ftomcat%2FExporterServletTomcatSample.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -49,7 +49,7 @@ public static void main(String[] args) throws LifecycleException, IOException {
                 .withHelp("Info metric on this integration test")
                 .withLabelNames("test_name")
                 .register();
-        info.infoLabelValues("exporter-servlet-tomcat-sample");
+        info.addLabelValues("exporter-servlet-tomcat-sample");
 
         Gauge gauge = Gauge.newBuilder()
                 .withName("temperature_celsius")u}(j  (ba5d97577739137181a6d15e70170bba6923ecc0j]  pom.xmlj_  modifiedjW  KjX  Kja  Kjb  _https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/pom.xmljd  ^https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/pom.xmljf  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X$  @@ -47,9 +47,6 @@
     </developers>
 
     <modules>
-        <!-- protobuf-shaded is not included, because the source code contains the un-shaded packages. -->
-        <!-- By not including it, we force Maven to load the shaded version from the Maven repository. -->
-        <!-- However, that means protobuf-shaded must be built and installed manually if there are any changes. -->
         <module>prometheus-metrics-core</module>
         <module>prometheus-metrics-config</module>
         <module>prometheus-metrics-model</module>
@@ -58,6 +55,8 @@
         <module>prometheus-metrics-exporter-common</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
+        <module>prometheus-metrics-exporter-opentelemetry</module>
+        <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
         <module>examples</module>
         <module>integration-tests</module>
 u}(j  (6d06746f76a09f4d3be70c7bf19de87731cf51a5j]  fprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterHttpServerProperties.javaj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterHttpServerProperties.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -38,6 +38,8 @@ public static class Builder {
 
         private Integer port;
 
+        private Builder() {}
+
         public Builder withPort(int port) {
             this.port = port;
             return this;u}(j  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4j]  iprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,190 @@
+package io.prometheus.metrics.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
+public class ExporterOpenTelemetryProperties {
+
+    // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
+    private static String PROTOCOL = "protocol"; // otel.exporter.otlp.protocol
+    private static String ENDPOINT = "endpoint"; // otel.exporter.otlp.endpoint
+    private static String HEADERS = "headers"; // otel.exporter.otlp.headers
+    private static String INTERVAL_SECONDS = "intervalSeconds"; // otel.metric.export.interval
+    private static String TIMEOUT_SECONDS = "timeoutSeconds"; // otel.exporter.otlp.timeout
+    private static String SERVICE_NAME = "serviceName"; // otel.service.name
+    private static String SERVICE_NAMESPACE = "serviceNamespace";
+    private static String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static String SERVICE_VERSION = "serviceVersion";
+    private static String RESOURCE_ATTRIBUTES = "resourceAttributes"; // otel.resource.attributes
+
+    private final String protocol;
+    private final String endpoint;
+    private final Map<String, String> headers;
+    private final Integer intervalSeconds;
+    private final Integer timeoutSeconds;
+    private final String serviceName;
+    private final String serviceNamespace;
+    private final String serviceInstanceId;
+    private final String serviceVersion;
+    private final Map<String, String> resourceAttributes;
+
+    private ExporterOpenTelemetryProperties(String protocol, String endpoint, Map<String, String> headers, Integer intervalSeconds, Integer timeoutSeconds, String serviceName, String serviceNamespace, String serviceInstanceId, String serviceVersion, Map<String, String> resourceAttributes) {
+        this.protocol = protocol;
+        this.endpoint = endpoint;
+        this.headers = headers;
+        this.intervalSeconds = intervalSeconds;
+        this.timeoutSeconds = timeoutSeconds;
+        this.serviceName = serviceName;
+        this.serviceNamespace = serviceNamespace;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceVersion = serviceVersion;
+        this.resourceAttributes = resourceAttributes;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    public Integer getIntervalSeconds() {
+        return intervalSeconds;
+    }
+
+    public Integer getTimeoutSeconds() {
+        return timeoutSeconds;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public String getServiceNamespace() {
+        return serviceNamespace;
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public Map<String, String> getResourceAttributes() {
+        return resourceAttributes;
+    }
+
+    /**
+     * Note that this will remove entries from {@code properties}.
+     * This is because we want to know if there are unused properties remaining after all properties have been loaded.
+     */
+    static ExporterOpenTelemetryProperties load(String prefix, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        String protocol = Util.loadString(prefix + "." + PROTOCOL, properties);
+        String endpoint = Util.loadString(prefix + "." + ENDPOINT, properties);
+        Map<String, String> headers = Util.loadMap(prefix + "." + HEADERS, properties);
+        Integer intervalSeconds = Util.loadInteger(prefix + "." + INTERVAL_SECONDS, properties);
+        Integer timeoutSeconds = Util.loadInteger(prefix + "." + TIMEOUT_SECONDS, properties);
+        String serviceName = Util.loadString(prefix + "." + SERVICE_NAME, properties);
+        String serviceNamespace = Util.loadString(prefix + "." + SERVICE_NAMESPACE, properties);
+        String serviceInstanceId = Util.loadString(prefix + "." + SERVICE_INSTANCE_ID, properties);
+        String serviceVersion = Util.loadString(prefix + "." + SERVICE_VERSION, properties);
+        Map<String, String> resourceAttributes = Util.loadMap(prefix + "." + RESOURCE_ATTRIBUTES, properties);
+        Util.assertValue(intervalSeconds, t -> t > 0, "Expecting value > 0", prefix, INTERVAL_SECONDS);
+        Util.assertValue(timeoutSeconds, t -> t > 0, "Expecting value > 0", prefix, TIMEOUT_SECONDS);
+        if (protocol != null && !protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+            throw new PrometheusPropertiesException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf");
+        }
+        return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private String protocol;
+        private String endpoint;
+        private Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder() {}
+
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalArgumentException(intervalSeconds + ": Expecting intervalSeconds > 0");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalArgumentException(timeoutSeconds + ": Expecting timeoutSeconds > 0");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public ExporterOpenTelemetryProperties build() {
+            return new ExporterOpenTelemetryProperties(protocol, endpoint, headers, intervalSeconds, timeoutSeconds, serviceName, serviceNamespace, serviceInstanceId, serviceVersion, resourceAttributes);
+        }
+    }
+}u}(j  (4707dd862b1a6956db02a8ea544b5f7d4c9cdfdcj]  ^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xq  @@ -17,7 +17,8 @@ public class PrometheusProperties {
     private final ExemplarsProperties exemplarProperties;
     private final ExporterProperties exporterProperties;
     private final ExporterFilterProperties exporterFilterProperties;
-    private final ExporterHttpServerProperties httpServerConfig;
+    private final ExporterHttpServerProperties exporterHttpServerProperties;
+    private final ExporterOpenTelemetryProperties exporterOpenTelemetryProperties;
 
     /**
      * Get the properties instance. When called for the first time, {@code get()} loads the properties from the following locations:
@@ -37,13 +38,15 @@ public PrometheusProperties(
             ExemplarsProperties exemplarProperties,
             ExporterProperties exporterProperties,
             ExporterFilterProperties exporterFilterProperties,
-            ExporterHttpServerProperties httpServerConfig) {
+            ExporterHttpServerProperties httpServerConfig,
+            ExporterOpenTelemetryProperties otelConfig) {
         this.defaultMetricsProperties = defaultMetricsProperties;
         this.metricProperties.putAll(metricProperties);
         this.exemplarProperties = exemplarProperties;
         this.exporterProperties = exporterProperties;
         this.exporterFilterProperties = exporterFilterProperties;
-        this.httpServerConfig = httpServerConfig;
+        this.exporterHttpServerProperties = httpServerConfig;
+        this.exporterOpenTelemetryProperties = otelConfig;
     }
 
     /**
@@ -74,6 +77,10 @@ public ExporterFilterProperties getExporterFilterProperties() {
     }
 
     public ExporterHttpServerProperties getExporterHttpServerProperties() {
-        return httpServerConfig;
+        return exporterHttpServerProperties;
+    }
+
+    public ExporterOpenTelemetryProperties getExporterOpenTelemetryProperties() {
+        return exporterOpenTelemetryProperties;
     }
 }u}(j  (c4a09be7b8ca24e342cd99173c0a8674e703cb60j]  dprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesLoader.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesLoader.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -32,8 +32,9 @@ public static PrometheusProperties load() throws PrometheusPropertiesException {
         ExporterProperties exporterProperties = ExporterProperties.load("io.prometheus.exporter", properties);
         ExporterFilterProperties exporterFilterProperties = ExporterFilterProperties.load("io.prometheus.exporter.filter", properties);
         ExporterHttpServerProperties exporterHttpServerProperties = ExporterHttpServerProperties.load("io.prometheus.exporter.httpServer", properties);
+        ExporterOpenTelemetryProperties exporterOpenTelemetryProperties = ExporterOpenTelemetryProperties.load("io.prometheus.exporter.opentelemetry", properties);
         validateAllPropertiesProcessed(properties);
-        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties);
+        return new PrometheusProperties(defaultMetricsProperties, metricsConfigs, exemplarConfig, exporterProperties, exporterFilterProperties, exporterHttpServerProperties, exporterOpenTelemetryProperties);
     }
 
     // This will remove entries from properties when they are processed.u}(j  (5b3f97252da66db1d71c3bf0f0434788f9a9e6e3j]  Nprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/Util.javaj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FUtil.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -38,6 +39,10 @@ static List<Double> toList(double... values) {
         return result;
     }
 
+    static String loadString(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        return getProperty(name, properties);
+    }
+
     static List<String> loadStringList(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {
@@ -67,6 +72,28 @@ static List<Double> loadDoubleList(String name, Map<Object, Object> properties)
         return null;
     }
 
+    // Map is represented as "key1=value1,key2=value2"
+    static Map<String, String> loadMap(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
+        Map<String, String> result = new HashMap<>();
+        String property = getProperty(name, properties);
+        if (property != null) {
+            String[] pairs = property.split(",");
+            for (String pair : pairs) {
+                if (pair.contains("=")) {
+                    String[] keyValue = pair.split("=", 1);
+                    if (keyValue.length == 2) {
+                        String key = keyValue[0].trim();
+                        String value = keyValue[1].trim();
+                        if (key.length() > 0 && value.length() > 0) {
+                            result.putIfAbsent(key, value);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
     static Integer loadInteger(String name, Map<Object, Object> properties) throws PrometheusPropertiesException {
         String property = getProperty(name, properties);
         if (property != null) {u}(j  (ea32a6ccacc2f3a8b2040d1a91a98369337b4770j]  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesjf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X   @@ -17,4 +17,10 @@ io.prometheus.exemplars.sampleIntervalMilliseconds = 30
 
 io.prometheus.exporter.httpServer.port = 9000
 
+io.prometheus.exporter.opentelemetry.endpoint=http://localhost:4318
+io.prometheus.exporter.opentelemetry.intervalSeconds=30
+io.prometheus.exporter.opentelemetry.serviceName=hello-world-app
+io.prometheus.exporter.opentelemetry.serviceNamespace=prod
+io.prometheus.exporter.opentelemetry.serviceInstanceId=localhost:8081
+
 # io.prometheus.metrics.unusedLabelsRetentionTimeSeconds = 0u}(j  (acfed6c2fa7fdcc65bb3c4b25669e9c382db5c99j]  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj_  modifiedjW  K&jX  Kja  K4jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -8,9 +8,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static io.prometheus.metrics.model.snapshots.PrometheusNaming.prometheusName;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 /**
  * Info metric. Example:
@@ -25,40 +24,65 @@
  * String vendor = System.getProperty("java.vm.vendor", "unknown");
  * String runtime = System.getProperty("java.runtime.name", "unknown");
  *
- * info.infoLabelValues("prod", version, vendor, runtime);
- * info.infoLabelValues("dev", version, vendor, runtime);
+ * info.addLabelValues("prod", version, vendor, runtime);
+ * info.addLabelValues("dev", version, vendor, runtime);
  * }</pre>
  */
 public class Info extends MetricWithFixedMetadata {
 
-    private final List<Labels> labels = new CopyOnWriteArrayList<>();
+    private final Set<Labels> labels = new CopyOnWriteArraySet<>();
 
     private Info(Builder builder) {
         super(builder);
     }
 
+    /**
+     * Set the info label values. This will replace any previous values,
+     * i.e. the info metric will only have one data point after calling setLabelValues().
+     * This is good for a metric like {@code target_info} where you want only one single data point.
+     */
+    public void setLabelValues(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called setLabelValues() with " + labelValues.length + " label values.");
+        }
+        Labels newLabels = Labels.of(labelNames, labelValues);
+        labels.add(newLabels);
+        labels.retainAll(Collections.singletonList(newLabels));
+    }
+
     /**
      * Create an info data point with the given label values.
      */
-    public void infoLabelValues(String... labelValues) {
+    public void addLabelValues(String... labelValues) {
         if (labelValues.length != labelNames.length) {
-            if (labelValues.length == 0) {
-                throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with label names, so you must call withLabelValues(...) when using it.");
-            } else {
-                throw new IllegalArgumentException("Expected " + labelNames.length + " label values, but got " + labelValues.length + ".");
-            }
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called addLabelValues() with " + labelValues.length + " label values.");
         }
         labels.add(Labels.of(labelNames, labelValues));
     }
 
+    /**
+     * Remove the data point with the specified label values.
+     */
+    public void remove(String... labelValues) {
+        if (labelValues.length != labelNames.length) {
+            throw new IllegalArgumentException(getClass().getSimpleName() + " " + getMetadata().getName() + " was created with " + labelNames.length + " label names, but you called remove() with " + labelValues.length + " label values.");
+        }
+        Labels toBeRemoved = Labels.of(labelNames, labelValues);
+        labels.remove(toBeRemoved);
+    }
+
     /**
      * {@inheritDoc}
      */
     @Override
     public InfoSnapshot collect() {
         List<InfoSnapshot.InfoDataPointSnapshot> data = new ArrayList<>(labels.size());
-        for (int i = 0; i < labels.size(); i++) {
-            data.add(new InfoSnapshot.InfoDataPointSnapshot(labels.get(i).merge(constLabels)));
+        if (labelNames.length == 0) {
+            data.add(new InfoSnapshot.InfoDataPointSnapshot(constLabels));
+        } else {
+            for (Labels label : labels) {
+                data.add(new InfoSnapshot.InfoDataPointSnapshot(label.merge(constLabels)));
+            }
         }
         return new InfoSnapshot(getMetadata(), data);
     }u}(j  (d324a2700c70b915e444403f75a9c17c96e70bbfj]  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -28,7 +28,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
 
         protected final List<String> illegalLabelNames;
         protected final PrometheusProperties properties;
-        private Labels constLabels = Labels.EMPTY;
+        protected Labels constLabels = Labels.EMPTY;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             this.illegalLabelNames = new ArrayList<>(illegalLabelNames);u}(j  (a1c1769d98559841ca83eb49e1ca2977e32e6114j]  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj_  modifiedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -78,11 +78,23 @@ public B withLabelNames(String... labelNames) {
                 if (illegalLabelNames.contains(labelName)) {
                     throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
                 }
+                if (constLabels.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
             }
             this.labelNames = labelNames;
             return self();
         }
 
+        public B withConstLabels(Labels constLabels) {
+            for (String labelName : labelNames) {
+                if (constLabels.contains(labelName)) { // Labels.contains() treats dots like underscores
+                    throw new IllegalArgumentException(labelName + ": duplicate label name");
+                }
+            }
+            return super.withConstLabels(constLabels);
+        }
+
         @Override
         public abstract M build();
 u}(j  (035f2133482078e18c05d544d2633b8ade9d8bebj]  Yprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
@@ -297,4 +297,22 @@ public void testExemplarSamplerDisabled() {
         counter.inc(2.0);
         Assert.assertNull(getData(counter).getExemplar());
     }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsFirst() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .withLabelNames("const.a")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsSecond() {
+        Counter.newBuilder()
+                .withName("test_total")
+                .withLabelNames("const.a")
+                .withConstLabels(Labels.of("const_a", "const_b"))
+                .build();
+    }
 }u}(j  (48a3dbd52bb2eb5f451e4d4fd1399fc9b271a980j]  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;u}(j  (c6d5b7719d02f25c2a8635bcc774374e4f552b97j]  Vprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/InfoTest.javaj_  modifiedjW  KRjX  Kja  KTjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfoTest.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X[  @@ -1,10 +1,19 @@
 package io.prometheus.metrics.core.metrics;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
+import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
 import static org.junit.Assert.assertEquals;
 
 public class InfoTest {
@@ -19,10 +28,81 @@ public void testInfoStrippedFromName() {
                         .withName(name)
                         .withLabelNames(labelName)
                         .build();
-                info.infoLabelValues("value");
+                info.addLabelValues("value");
                 Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
                 assertEquals("name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }", TextFormat.printer().shortDebugString(protobufData));
             }
         }
     }
+
+    @Test
+    public void testAddAndRemove() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("test_info")
+                .withLabelNames("a", "b")
+                .build();
+        Assert.assertEquals(0, info.collect().getData().size());
+        info.addLabelValues("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val1", "val2"); // already exist, so no change
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.addLabelValues("val2", "val2");
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val3"); // does not exist, so no change
+        Assert.assertEquals(2, info.collect().getData().size());
+        info.remove("val1", "val2");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.remove("val2", "val2");
+        Assert.assertEquals(0, info.collect().getData().size());
+    }
+
+    @Test
+    public void testSet() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .withLabelNames("service.version")
+                .build();
+        info.setLabelValues("1.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        info.setLabelValues("2.0.0");
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\",service_version=\"2.0.0\"} 1\n", info);
+    }
+
+    @Test
+    public void testConstLabelsOnly() throws IOException {
+        Info info = Info.newBuilder()
+                .withName("target_info")
+                .withConstLabels(Labels.of("service.name", "test", "service.instance.id", "123"))
+                .build();
+        Assert.assertEquals(1, info.collect().getData().size());
+        assertTextFormat("target_info{service_instance_id=\"123\",service_name=\"test\"} 1\n", info);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate1() {
+        Info.newBuilder()
+                .withConstLabels(Labels.of("a_1", "val1"))
+                .withLabelNames("a.1")
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testConstLabelsDuplicate2() {
+        Info.newBuilder()
+                .withLabelNames("a_1")
+                .withConstLabels(Labels.of("a.1", "val1"))
+                .build();
+    }
+
+    private void assertTextFormat(String expected, Info info) throws IOException {
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        writer.write(outputStream, MetricSnapshots.of(info.collect()));
+        String result = outputStream.toString(StandardCharsets.UTF_8.name());
+        if (!result.contains(expected)) {
+            throw new AssertionError(expected + " is not contained in the following output:\n" + result);
+        }
+    }
 }u}(j  (6b5266962f80db0e582089efb438621100a5ce92j]  1prometheus-metrics-exporter-opentelemetry/pom.xmlj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XN  @@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics to OpenTelemetry Exporter</name>
+    <description>
+        Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        -->
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/resources-filtered</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>3.6.0</version>
+            <executions>
+                <execution>
+                    <id>copy</id>
+                    <phase>package</phase>
+                    <goals>
+                        <goal>copy</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-api</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                    <artifactItem>
+                        <groupId>io.opentelemetry</groupId>
+                        <artifactId>opentelemetry-context</artifactId>
+                        <version>1.29.0</version>
+                        <outputDirectory>${project.basedir}/src/main/resources/lib/</outputDirectory>
+                    </artifactItem>
+                </artifactItems>
+                <!-- other configurations here -->
+            </configuration>
+        </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>io.prometheus:prometheus-metrics-core:${project.version}</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
+</project>u}(j  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj_  addedjW  MjX  K ja  Mjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XQ  @@ -0,0 +1,448 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.config.ExporterOpenTelemetryProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.MetricExporter;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.export.PeriodicMetricReader;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class OpenTelemetryExporter {
+
+    private OpenTelemetryExporter(Builder builder, PrometheusProperties config, PrometheusRegistry registry) {
+        InstrumentationScopeInfo instrumentationScopeInfo = PrometheusInstrumentationScope.loadInstrumentationScopeInfo();
+        ExporterOpenTelemetryProperties properties = config.getExporterOpenTelemetryProperties();
+        Resource resource = initResourceAttributes(builder, properties, instrumentationScopeInfo);
+        MetricExporter exporter;
+        if (ConfigHelper.getProtocol(builder, properties).equals("grpc")) {
+            OtlpGrpcMetricExporterBuilder exporterBuilder = OtlpGrpcMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        } else {
+            OtlpHttpMetricExporterBuilder exporterBuilder = OtlpHttpMetricExporter.builder()
+                    .setTimeout(Duration.ofSeconds(ConfigHelper.getTimeoutSeconds(builder, properties)))
+                    .setEndpoint(ConfigHelper.getEndpoint(builder, properties));
+            for (Map.Entry<String, String> header : ConfigHelper.getHeaders(builder, properties).entrySet()) {
+                exporterBuilder.addHeader(header.getKey(), header.getValue());
+            }
+            exporter = exporterBuilder.build();
+        }
+        PeriodicMetricReader reader = PeriodicMetricReader.builder(exporter)
+                .setInterval(Duration.ofSeconds(ConfigHelper.getIntervalSeconds(builder, properties)))
+                .build();
+        PrometheusMetricProducer prometheusMetricProducer = new PrometheusMetricProducer(registry, instrumentationScopeInfo, resource);
+        reader.register(prometheusMetricProducer);
+    }
+
+    private Resource initResourceAttributes(Builder builder, ExporterOpenTelemetryProperties properties, InstrumentationScopeInfo instrumentationScopeInfo) {
+        String serviceName = ConfigHelper.getServiceName(builder, properties);
+        String serviceNamespace = ConfigHelper.getServiceNamespace(builder, properties);
+        String serviceInstanceId = ConfigHelper.getServiceInstanceId(builder, properties);
+        String serviceVersion = ConfigHelper.getServiceVersion(builder, properties);
+        Map<String, String> resourceAttributes = ResourceAttributes.get(instrumentationScopeInfo.getName(), serviceName, serviceNamespace, serviceInstanceId, serviceVersion, ConfigHelper.getResourceAttributes(builder, properties));
+        ResourceBuilder resourceBuilder = Resource.builder();
+        for (Map.Entry<String, String> entry : resourceAttributes.entrySet()) {
+            resourceBuilder.put(entry.getKey(), entry.getValue());
+        }
+        return resourceBuilder.build();
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties config) {
+        return new Builder(config);
+    }
+
+    public static class Builder {
+
+        private final PrometheusProperties config;
+        private PrometheusRegistry registry = null;
+        private String protocol;
+        private String endpoint;
+        private final Map<String, String> headers = new HashMap<>();
+        private Integer intervalSeconds;
+        private Integer timeoutSeconds;
+        private String serviceName;
+        private String serviceNamespace;
+        private String serviceInstanceId;
+        private String serviceVersion;
+        private final Map<String, String> resourceAttributes = new HashMap<>();
+
+        private Builder(PrometheusProperties config) {
+            this.config = config;
+        }
+
+        public Builder withRegistry(PrometheusRegistry registry) {
+            this.registry = registry;
+            return this;
+        }
+
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
+        public Builder withProtocol(String protocol) {
+            if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
+            }
+            this.protocol = protocol;
+            return this;
+        }
+
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
+        public Builder withEndpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
+        public Builder addHeader(String name, String value) {
+            this.headers.put(name, value);
+            return this;
+        }
+
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withIntervalSeconds(int intervalSeconds) {
+            if (intervalSeconds <= 0) {
+                throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
+            }
+            this.intervalSeconds = intervalSeconds;
+            return this;
+        }
+
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
+        public Builder withTimeoutSeconds(int timeoutSeconds) {
+            if (timeoutSeconds <= 0) {
+                throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
+            }
+            this.timeoutSeconds = timeoutSeconds;
+            return this;
+        }
+
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceName(String serviceName) {
+            this.serviceName = serviceName;
+            return this;
+        }
+
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceNamespace(String serviceNamespace) {
+            this.serviceNamespace = serviceNamespace;
+            return this;
+        }
+
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceInstanceId(String serviceInstanceId) {
+            this.serviceInstanceId = serviceInstanceId;
+            return this;
+        }
+
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
+        public Builder withServiceVersion(String serviceVersion) {
+            this.serviceVersion = serviceVersion;
+            return this;
+        }
+
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
+        public Builder addResourceAttribute(String name, String value) {
+            this.resourceAttributes.put(name, value);
+            return this;
+        }
+
+        public OpenTelemetryExporter buildAndStart() {
+            if (registry == null) {
+                registry = PrometheusRegistry.defaultRegistry;
+            }
+            return new OpenTelemetryExporter(this, config, registry);
+        }
+    }
+
+    private static class ConfigHelper {
+
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String protocol = config.getProtocol();
+            if (protocol != null) {
+                return protocol;
+            }
+            protocol = getString("otel.exporter.otlp.protocol");
+            if (protocol != null) {
+                if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
+                    throw new IllegalStateException(protocol + ": Unsupported OpenTelemetry exporter protocol. Expecting grpc or http/protobuf.");
+                }
+                return protocol;
+            }
+            if (builder.protocol != null) {
+                return builder.protocol;
+            }
+            return "grpc";
+        }
+
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String endpoint = config.getEndpoint();
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.metrics.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = getString("otel.exporter.otlp.endpoint");
+            }
+            if (endpoint == null) {
+                endpoint = builder.endpoint;
+            }
+            if (endpoint == null) {
+                if (getProtocol(builder, config).equals("grpc")) {
+                    endpoint = "http://localhost:4317";
+                } else { // http/protobuf
+                    endpoint = "http://localhost:4318/v1/metrics";
+                }
+            }
+            if (getProtocol(builder, config).equals("grpc")) {
+                return endpoint;
+            } else { // http/protobuf
+                if (!endpoint.endsWith("v1/metrics")) {
+                    if (!endpoint.endsWith("/")) {
+                        return endpoint + "/v1/metrics";
+                    } else {
+                        return endpoint + "v1/metrics";
+                    }
+                } else {
+                    return endpoint;
+                }
+            }
+        }
+
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> headers = config.getHeaders();
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            headers = getMap("otel.exporter.otlp.headers");
+            if (!headers.isEmpty()) {
+                return headers;
+            }
+            if (!builder.headers.isEmpty()) {
+                return builder.headers;
+            }
+            return new HashMap<>();
+        }
+
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer intervalSeconds = config.getIntervalSeconds();
+            if (intervalSeconds != null) {
+                return intervalSeconds;
+            }
+            intervalSeconds = getPositiveInteger("otel.metric.export.interval");
+            if (intervalSeconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(intervalSeconds);
+            }
+            if (builder.intervalSeconds != null) {
+                return builder.intervalSeconds;
+            }
+            return 60;
+        }
+
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Integer timeoutSeconds = config.getTimeoutSeconds();
+            if (timeoutSeconds != null) {
+                return timeoutSeconds;
+            }
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
+            }
+            if (builder.timeoutSeconds != null) {
+                return builder.timeoutSeconds;
+            }
+            return 10;
+        }
+
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceName = config.getServiceName();
+            if (serviceName != null) {
+                return serviceName;
+            }
+            serviceName = getString("otel.service.name");
+            if (serviceName != null) {
+                return serviceName;
+            }
+            if (builder.serviceName != null) {
+                return builder.serviceName;
+            }
+            return null;
+        }
+
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceNamespace = config.getServiceNamespace();
+            if (serviceNamespace != null) {
+                return serviceNamespace;
+            }
+            if (builder.serviceNamespace != null) {
+                return builder.serviceNamespace;
+            }
+            return null;
+        }
+
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceInstanceId = config.getServiceInstanceId();
+            if (serviceInstanceId != null) {
+                return serviceInstanceId;
+            }
+            if (builder.serviceInstanceId != null) {
+                return builder.serviceInstanceId;
+            }
+            return null;
+        }
+
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            String serviceVersion = config.getServiceVersion();
+            if (serviceVersion != null) {
+                return serviceVersion;
+            }
+            if (builder.serviceVersion != null) {
+                return builder.serviceVersion;
+            }
+            return null;
+        }
+
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+            Map<String, String> resourceAttributes = config.getResourceAttributes();
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            resourceAttributes = getMap("otel.resource.attributes");
+            if (!resourceAttributes.isEmpty()) {
+                return resourceAttributes;
+            }
+            if (!builder.resourceAttributes.isEmpty()) {
+                return builder.resourceAttributes;
+            }
+            return new HashMap<>();
+        }
+
+        private static String getString(String otelPropertyName) {
+            String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
+            if (System.getenv(otelEnvVarName) != null) {
+                return System.getenv(otelEnvVarName);
+            }
+            if (System.getProperty(otelPropertyName) != null) {
+                return System.getProperty(otelPropertyName);
+            }
+            return null;
+        }
+
+        private static Integer getInteger(String otelPropertyName) {
+            String result = getString(otelPropertyName);
+            if (result == null) {
+                return null;
+            } else {
+                try {
+                    return Integer.parseInt(result);
+                } catch (NumberFormatException e) {
+                    throw new IllegalStateException(otelPropertyName + "=" + result + " - illegal value.");
+                }
+            }
+        }
+
+        private static Integer getPositiveInteger(String otelPropertyName) {
+            Integer result = getInteger(otelPropertyName);
+            if (result == null) {
+                return null;
+            }
+            if (result <= 0) {
+                throw new IllegalStateException(otelPropertyName + "=" + result + ": Expecting value > 0.");
+            }
+            return result;
+        }
+
+        private static Map<String, String> getMap(String otelPropertyName) {
+            Map<String, String> result = new HashMap<>();
+            String property = getString(otelPropertyName);
+            if (property != null) {
+                String[] pairs = property.split(",");
+                for (String pair : pairs) {
+                    if (pair.contains("=")) {
+                        String[] keyValue = pair.split("=", 1);
+                        if (keyValue.length == 2) {
+                            String key = keyValue[0].trim();
+                            String value = keyValue[1].trim();
+                            if (key.length() > 0 && value.length() > 0) {
+                                result.putIfAbsent(key, value);
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+    }
+}u     }(j  (1f38e66e229b1affd0ba181ec4ff285e3e71bcadj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScope.javaj_  addedjW  K jX  K ja  K jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusInstrumentationScope.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,32 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+
+import java.util.Properties;
+
+class PrometheusInstrumentationScope {
+
+    private static final String instrumentationScopePropertiesFile = "instrumentationScope.properties";
+    private static final String instrumentationScopeNameKey = "instrumentationScope.name";
+    private static final String instrumentationScopeVersionKey = "instrumentationScope.version";
+
+    public static InstrumentationScopeInfo loadInstrumentationScopeInfo() {
+        try {
+            Properties properties = new Properties();
+            properties.load(PrometheusInstrumentationScope.class.getClassLoader().getResourceAsStream(instrumentationScopePropertiesFile));
+            String instrumentationScopeName = properties.getProperty(instrumentationScopeNameKey);
+            if (instrumentationScopeName == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeNameKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            String instrumentationScopeVersion = properties.getProperty(instrumentationScopeVersionKey);
+            if (instrumentationScopeVersion == null) {
+                throw new IllegalStateException("Prometheus metrics library initialization error: " + instrumentationScopeVersionKey + " not found in " + instrumentationScopePropertiesFile + " in classpath.");
+            }
+            return InstrumentationScopeInfo.builder(instrumentationScopeName)
+                    .setVersion(instrumentationScopeVersion)
+                    .build();
+        } catch (Exception e) {
+            throw new IllegalStateException("Prometheus metrics library initialization error: Failed to read " + instrumentationScopePropertiesFile + " from classpath.", e);
+        }
+    }
+}u}(j  (762060efcf3f5edfa5be3d9edc50d9e8c4350081j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javaj_  addedjW  K|jX  K ja  K|jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X[  @@ -0,0 +1,124 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import io.prometheus.metrics.exporter.opentelemetry.otelmodel.MetricDataFactory;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+class PrometheusMetricProducer implements MetricProducer {
+
+    private final PrometheusRegistry registry;
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+
+    public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.registry = registry;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+    }
+
+    @Override
+    public Collection<MetricData> collectAllMetrics() {
+        // TODO: We could add a filter configuration for the OpenTelemetry exporter and call registry.scrape(filter) if a filter is configured, like in the Servlet exporter.
+        MetricSnapshots snapshots = registry.scrape();
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
+        InstrumentationScopeInfo scopeFromInfo = instrumentationScopeFromOTelScopeInfo(snapshots);
+        List<MetricData> result = new ArrayList<>(snapshots.size());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, scopeFromInfo != null ? scopeFromInfo : instrumentationScopeInfo, System.currentTimeMillis());
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot instanceof CounterSnapshot) {
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
+            } else if (snapshot instanceof GaugeSnapshot) {
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                if (!((HistogramSnapshot) snapshot).isGaugeHistogram()) {
+                    addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof SummarySnapshot) {
+                addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
+            } else if (snapshot instanceof InfoSnapshot) {
+                String name = snapshot.getMetadata().getPrometheusName();
+                if (!name.equals("target") && !name.equals("otel_scope")) {
+                    addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+                }
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
+            } else if (snapshot instanceof UnknownSnapshot) {
+                addUnlessNull(result, factory.create((UnknownSnapshot) snapshot));
+            }
+        }
+        return result;
+    }
+
+    private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i = 0; i < labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
+            }
+        }
+        return result.build();
+    }
+
+    private InstrumentationScopeInfo instrumentationScopeFromOTelScopeInfo(MetricSnapshots snapshots) {
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getPrometheusName().equals("otel_scope") && snapshot instanceof InfoSnapshot) {
+                InfoSnapshot scopeInfo = (InfoSnapshot) snapshot;
+                if (scopeInfo.getData().size() > 0) {
+                    Labels labels = scopeInfo.getData().get(0).getLabels();
+                    String name = null;
+                    String version = null;
+                    AttributesBuilder attributesBuilder = Attributes.builder();
+                    for (int i = 0; i < labels.size(); i++) {
+                        if (labels.getPrometheusName(i).equals("otel_scope_name")) {
+                            name = labels.getValue(i);
+                        } else if (labels.getPrometheusName(i).equals("otel_scope_version")) {
+                            version = labels.getValue(i);
+                        } else {
+                            attributesBuilder.put(labels.getName(i), labels.getValue(i));
+                        }
+                    }
+                    if (name != null) {
+                        return InstrumentationScopeInfo.builder(name)
+                                .setVersion(version)
+                                .setAttributes(attributesBuilder.build())
+                                .build();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
+}u}(j  (c4319b7fc6bb838489686542d8817d5c53daad94j]  |prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributes.javaj_  addedjW  K"jX  K ja  K"jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributes.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xl  @@ -0,0 +1,34 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResourceAttributes {
+
+    // TODO: The OTel Java instrumentation also has a SpringBootServiceNameDetector, we should port this over.
+    public static Map<String, String> get(String instrumentationScopeName,
+                                          String serviceName,
+                                          String serviceNamespace,
+                                          String serviceInstanceId,
+                                          String serviceVersion,
+                                          Map<String, String> configuredResourceAttributes) {
+        Map<String, String> result = new HashMap<>();
+        ResourceAttributesFromOtelAgent.addIfAbsent(result, instrumentationScopeName);
+        putIfAbsent(result, "service.name", serviceName);
+        putIfAbsent(result, "service.namespace", serviceNamespace);
+        putIfAbsent(result, "service.instance.id", serviceInstanceId);
+        putIfAbsent(result, "service.version", serviceVersion);
+        for (Map.Entry<String, String> attribute : configuredResourceAttributes.entrySet()) {
+            putIfAbsent(result, attribute.getKey(), attribute.getValue());
+        }
+        ResourceAttributesFromJarFileName.addIfAbsent(result);
+        ResourceAttributesDefaults.addIfAbsent(result);
+        return result;
+    }
+
+    private static void putIfAbsent(Map<String, String> result, String key, String value) {
+        if (value != null) {
+            result.putIfAbsent(key, value);
+        }
+    }
+}u}(j  (053c2b53ab0a361d01905748b8e4445d725b3e63j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesDefaults.javaj_  addedjW  K
jX  K ja  K
jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.javajf  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesDefaults.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X   @@ -0,0 +1,10 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.util.Map;
+
+public class ResourceAttributesDefaults {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        result.putIfAbsent("service.name", "unknown_service:java");
+    }
+}u}(j  (093b3b44dc76bd71ffb168b5a87b471c2699ef06j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromJarFileName.javaj_  addedjW  K<jX  K ja  K<jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromJarFileName.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XZ  @@ -0,0 +1,60 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+
+// See io.opentelemetry.instrumentation.resources.JarServiceNameDetector
+public class ResourceAttributesFromJarFileName {
+
+    public static void addIfAbsent(Map<String, String> result) {
+        if (result.containsKey("service.name")) {
+            return;
+        }
+        Path jarPath = getJarPathFromSunCommandLine();
+        if (jarPath == null) {
+            return;
+        }
+        String serviceName = getServiceName(jarPath);
+        result.putIfAbsent("service.name", serviceName);
+    }
+
+    private static Path getJarPathFromSunCommandLine() {
+        String programArguments = System.getProperty("sun.java.command");
+        if (programArguments == null) {
+            return null;
+        }
+        // Take the path until the first space. If the path doesn't exist extend it up to the next
+        // space. Repeat until a path that exists is found or input runs out.
+        int next = 0;
+        while (true) {
+            int nextSpace = programArguments.indexOf(' ', next);
+            if (nextSpace == -1) {
+                return pathIfExists(programArguments);
+            }
+            Path path = pathIfExists(programArguments.substring(0, nextSpace));
+            next = nextSpace + 1;
+            if (path != null) {
+                return path;
+            }
+        }
+    }
+
+    private static Path pathIfExists(String programArguments) {
+        Path candidate;
+        try {
+            candidate = Paths.get(programArguments);
+        } catch (InvalidPathException e) {
+            return null;
+        }
+        return Files.isRegularFile(candidate) ? candidate : null;
+    }
+
+    private static String getServiceName(Path jarPath) {
+        String jarName = jarPath.getFileName().toString();
+        int dotIndex = jarName.lastIndexOf(".");
+        return dotIndex == -1 ? jarName : jarName.substring(0, dotIndex);
+    }
+}u}(j  (fcf6e0ba059e0a7805e7a72ef0c4f239e1f36c16j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/ResourceAttributesFromOtelAgent.javaj_  addedjW  KWjX  K ja  KWjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FResourceAttributesFromOtelAgent.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XN  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry;
+
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import static java.nio.file.Files.createTempDirectory;
+
+public class ResourceAttributesFromOtelAgent {
+
+    private static final String[] OTEL_JARS = new String[]{"opentelemetry-api-1.29.0.jar", "opentelemetry-context-1.29.0.jar"};
+
+    public static void addIfAbsent(Map<String, String> result, String instrumentationScopeName) {
+        try {
+            Path tmpDir = createTempDirectory(instrumentationScopeName + "-");
+            try {
+                URL[] otelJars = copyOtelJarsToTempDir(tmpDir, instrumentationScopeName);
+
+                try (URLClassLoader classLoader = new URLClassLoader(otelJars)) {
+                    Class<?> globalOpenTelemetryClass = classLoader.loadClass("io.opentelemetry.api.GlobalOpenTelemetry");
+                    Object globalOpenTelemetry = globalOpenTelemetryClass.getMethod("get").invoke(null);
+                    if (globalOpenTelemetry.getClass().getSimpleName().contains("ApplicationOpenTelemetry")) {
+                        // GlobalOpenTelemetry is injected by the OTel Java aqent
+                        Object applicationMeterProvider = callMethod("getMeterProvider", globalOpenTelemetry);
+                        Object agentMeterProvider = getField("agentMeterProvider", applicationMeterProvider);
+                        Object sdkMeterProvider = getField("delegate", agentMeterProvider);
+                        Object sharedState = getField("sharedState", sdkMeterProvider);
+                        Object resource = callMethod("getResource", sharedState);
+                        Object attributes = callMethod("getAttributes", resource);
+                        Map<?, ?> attributeMap = (Map<?, ?>) callMethod("asMap", attributes);
+
+                        for (Map.Entry<?, ?> entry : attributeMap.entrySet()) {
+                            if (entry.getKey() != null && entry.getValue() != null) {
+                                result.putIfAbsent(entry.getKey().toString(), entry.getValue().toString());
+                            }
+                        }
+                    }
+                }
+            } finally {
+                deleteTempDir(tmpDir.toFile());
+            }
+        } catch (Exception ignored) {
+        }
+    }
+
+    private static Object getField(String name, Object obj) throws Exception {
+        Field field = obj.getClass().getDeclaredField(name);
+        field.setAccessible(true);
+        return field.get(obj);
+    }
+
+    private static Object callMethod(String name, Object obj) throws Exception {
+        Method method = obj.getClass().getMethod(name);
+        method.setAccessible(true);
+        return method.invoke(obj);
+    }
+
+    private static URL[] copyOtelJarsToTempDir(Path tmpDir, String instrumentationScopeName) throws Exception {
+        URL[] result = new URL[OTEL_JARS.length];
+        for (int i = 0; i < OTEL_JARS.length; i++) {
+            InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("lib/" + OTEL_JARS[i]);
+            if (inputStream == null) {
+                throw new IllegalStateException("Error initializing " + instrumentationScopeName + ": lib/" + OTEL_JARS[i] + " not found in classpath.");
+            }
+            File outputFile = tmpDir.resolve(OTEL_JARS[i]).toFile();
+            Files.copy(inputStream, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            inputStream.close();
+            result[i] = outputFile.toURI().toURL();
+        }
+        return result;
+    }
+
+    private static void deleteTempDir(File tmpDir) {
+        // We don't have subdirectories, so this simple implementation should work.
+        for (File file : tmpDir.listFiles()) {
+            file.delete();
+        }
+        tmpDir.delete();
+    }
+}u}(j  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XC  @@ -0,0 +1,22 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+
+import java.util.List;
+
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
+
+    private final double value;
+
+    public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.value = value;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j  (d365c26fb4969d38448d8e1bd702b7e55e061b2ej]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javaj_  addedjW  K.jX  K ja  K.jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(j  (86d56d2d79c660d5d01c2802f73e94787343c22ej]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javaj_  addedjW  KUjX  K ja  KUjb  X  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajd  X   https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(j  (7908bee2ba3c186de26199f194bdde88245a9b3fj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/HistogramPointDataImpl.javaj_  addedjW  KDjX  K ja  KDjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FHistogramPointDataImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XN  @@ -0,0 +1,68 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+
+import java.util.List;
+
+public class HistogramPointDataImpl extends PointDataImpl implements HistogramPointData {
+
+    private final double sum;
+    private final long count;
+    private final double min;
+    private final double max;
+    private final List<Double> boundaries;
+    private final List<Long> counts;
+
+    public HistogramPointDataImpl(double sum, long count, double min, double max, List<Double> boundaries, List<Long> counts,
+                                  long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.boundaries = boundaries;
+        this.counts = counts;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public List<Double> getBoundaries() {
+        return boundaries;
+    }
+
+    @Override
+    public List<Long> getCounts() {
+        return counts;
+    }
+}u}(j  (3e30c4a6a9fdeef8fae96a4f536fb49119f50b3dj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javaj_  addedjW  K=jX  K ja  K=jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X
  @@ -0,0 +1,61 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+public class MetricDataFactory {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final long currentTimeMillis;
+
+    public MetricDataFactory(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long currentTimeMillis) {
+        this.resource = resource;
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.currentTimeMillis = currentTimeMillis;
+    }
+
+    public MetricData create(CounterSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusCounter(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(GaugeSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
+
+    public MetricData create(SummarySnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusSummary(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(InfoSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+
+    public MetricData create(UnknownSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusUnknown(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
+}u}(j  (a0b4aed8397b8eac69d32d28215f110df28b893bj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javaj_  addedjW  K+jX  K ja  K+jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(j  (a6d4d38306bfcadc9a3f139d83c0672bda6df4d2j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusClassicHistogram.javaj_  addedjW  KPjX  K ja  KPjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusClassicHistogram.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,80 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.HistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusClassicHistogram extends PrometheusData<HistogramPointData> implements HistogramData {
+
+    private final List<HistogramPointData> points;
+
+    PrometheusClassicHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<HistogramPointData> getPoints() {
+        return points;
+    }
+
+    private HistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasClassicHistogramData()) {
+            return null;
+        } else {
+            return new HistogramPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint.getClassicBuckets()),
+                    Double.NaN,
+                    Double.NaN,
+                    makeBoundaries(dataPoint.getClassicBuckets()),
+                    makeCounts(dataPoint.getClassicBuckets()),
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+        }
+    }
+
+    private long calculateCount(ClassicHistogramBuckets buckets) {
+        int result = 0;
+        for (int i=0; i<buckets.size(); i++ ) {
+            result += buckets.getCount(i);
+        }
+        return result;
+    }
+
+    private List<Double> makeBoundaries(ClassicHistogramBuckets buckets) {
+        List<Double> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getUpperBound(i));
+        }
+        return result;
+    }
+
+    private List<Long> makeCounts(ClassicHistogramBuckets buckets) {
+        List<Long> result = new ArrayList<>(buckets.size());
+        for (int i=0; i<buckets.size(); i++) {
+            result.add(buckets.getCount(i));
+        }
+        return result;
+    }
+}u}(j  (883b06e08475fcbe0e3464b61fa883d3db0a28d1j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javaj_  addedjW  K1jX  K ja  K1jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xr  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusCounter extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusCounter(CounterSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return true;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (353a1623c7ae3932afa295452af773fa7d9aecdbj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javaj_  addedjW  K:jX  K ja  K:jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajf  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X}	  @@ -0,0 +1,58 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+import io.prometheus.metrics.model.snapshots.Exemplar;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+abstract class PrometheusData<T extends PointData> implements Data<T> {
+
+    private final MetricDataType type;
+
+    public PrometheusData(MetricDataType type) {
+        this.type = type;
+    }
+
+    public MetricDataType getType() {
+        return type;
+    }
+
+    protected Attributes labelsToAttributes(Labels labels) {
+        if (labels.isEmpty()) {
+            return Attributes.empty();
+        } else {
+            AttributesBuilder builder = Attributes.builder();
+            for (int i=0; i<labels.size(); i++) {
+                builder.put(labels.getName(i), labels.getValue(i));
+            }
+            return builder.build();
+        }
+    }
+
+    protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
+        return Collections.emptyList();
+    }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
+}u}(j  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javaj_  addedjW  K&jX  K ja  K&jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X(  @@ -0,0 +1,38 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+class PrometheusGauge extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusGauge(GaugeSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (0dce35fa640fb1e114f86e0bfc229347a8d616dej]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javaj_  addedjW  K1jX  K ja  K1jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javajf  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X>  @@ -0,0 +1,49 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusInfo extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(InfoSnapshot.InfoDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                1.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                Collections.emptyList()
+        );
+    }
+}u}(j  (ddf2160d04ae48dbdec91f99d371475820c13180j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,135 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
+import io.prometheus.metrics.model.snapshots.Unit;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+
+class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
+
+    private final Resource resource;
+    private final InstrumentationScopeInfo instrumentationScopeInfo;
+    private final String name;
+    private final String description;
+    private final String unit;
+    T data;
+
+    PrometheusMetricData(MetricMetadata metricMetadata, T data, InstrumentationScopeInfo instrumentationScopeInfo, Resource resource) {
+        this.instrumentationScopeInfo = instrumentationScopeInfo;
+        this.resource = resource;
+        this.name = getNameWithoutUnit(metricMetadata);
+        this.description = metricMetadata.getHelp();
+        this.unit = convertUnit(metricMetadata.getUnit());
+        this.data = data;
+    }
+
+    // In OpenTelemetry the unit should not be part of the metric name.
+    private String getNameWithoutUnit(MetricMetadata metricMetadata) {
+        String name = metricMetadata.getName();
+        if (metricMetadata.getUnit() != null) {
+            String unit = metricMetadata.getUnit().toString();
+            if (name.endsWith(unit)) {
+                name = name.substring(0, name.length() - unit.length());
+            }
+            while (name.endsWith("_")) {
+                name = name.substring(0, name.length()-1);
+            }
+        }
+        return name;
+    }
+
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
+    @Override
+    public Resource getResource() {
+        return resource;
+    }
+
+    @Override
+    public InstrumentationScopeInfo getInstrumentationScopeInfo() {
+    return instrumentationScopeInfo;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public String getUnit() {
+        return unit;
+    }
+
+    @Override
+    public MetricDataType getType() {
+        return data.getType();
+    }
+
+    @Override
+    public T getData() {
+        return data;
+    }
+
+    @Override
+    public SumData<DoublePointData> getDoubleSumData() {
+        if (data instanceof PrometheusCounter) {
+            return (PrometheusCounter) data;
+        }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
+        return MetricData.super.getDoubleSumData();
+    }
+}u}(j  (7584949f6dab0fc979ebe2f8d8b5afa4f10b8cc8j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javaj_  addedjW  KWjX  K ja  KWjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u      }(j  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ej]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javaj_  addedjW  K5jX  K ja  K5jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}u}(j  (9b2f53c1255abbda709af7892125aa70ba69f819j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusSummary.javaj_  addedjW  K+jX  K ja  K+jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusSummary.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Quantile;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusSummary extends PrometheusData<SummaryPointData> implements SummaryData {
+
+    private final List<SummaryPointData> points;
+
+    PrometheusSummary(SummarySnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.SUMMARY);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<SummaryPointData> getPoints() {
+        return points;
+    }
+
+    private SummaryPointData toOtelDataPoint(SummarySnapshot.SummaryDataPointSnapshot dataPoint, long currentTimeMillis) {
+            SummaryPointDataImpl result = new SummaryPointDataImpl(
+                    dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                    dataPoint.hasCount() ? dataPoint.getCount() : 0,
+                    getStartEpochNanos(dataPoint),
+                    getEpochNanos(dataPoint, currentTimeMillis),
+                    labelsToAttributes(dataPoint.getLabels()),
+                    convertExemplars(dataPoint.getExemplars())
+            );
+            for (Quantile quantile : dataPoint.getQuantiles()) {
+                result.addValue(quantile.getQuantile(), quantile.getValue());
+            }
+            return result;
+    }
+}u}(j  (930715492a4380a13a088d728e21b7460031bb2cj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusUnknown.javaj_  addedjW  K%jX  K ja  K%jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusUnknown.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X
  @@ -0,0 +1,37 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.UnknownSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.GaugeData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class PrometheusUnknown extends PrometheusData<DoublePointData> implements GaugeData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+
+    public PrometheusUnknown(UnknownSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_GAUGE);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(UnknownSnapshot.UnknownDataPointSnapshot dataPoint, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.getValue(),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplar(dataPoint.getExemplar())
+        );
+    }
+}u}(j  (0e9c61c1f039218ae47e778f137078dcd1ed1cbdj]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/SummaryPointDataImpl.javaj_  addedjW  K)jX  K ja  K)jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FSummaryPointDataImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,41 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SummaryPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SummaryPointDataImpl extends PointDataImpl implements SummaryPointData {
+    private final double sum;
+    private final long count;
+    private final List<ValueAtQuantile> values;
+
+    public SummaryPointDataImpl(double sum, long count, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.sum = sum;
+        this.count = count;
+        this.values = new ArrayList<>();
+    }
+
+    void addValue(double quantile, double value) {
+        values.add(new ValueAtQuantileImpl(quantile, value));
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public List<ValueAtQuantile> getValues() {
+        return values;
+    }
+}u}(j  (fafc2be77024fc40abd2d2e78abe8864b891c438j]  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.javaj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FValueAtQuantileImpl.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xk  @@ -0,0 +1,24 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ValueAtQuantile;
+
+public class ValueAtQuantileImpl implements ValueAtQuantile {
+
+    private final double quantile;
+    private final double value;
+
+    public ValueAtQuantileImpl(double quantile, double value) {
+        this.quantile = quantile;
+        this.value = value;
+    }
+
+    @Override
+    public double getQuantile() {
+        return quantile;
+    }
+
+    @Override
+    public double getValue() {
+        return value;
+    }
+}u}(j  (f5d86ba1f71fd7393035dff48f730aca3caea09ej]  eprometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.propertiesj_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.propertiesjf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources-filtered%2FinstrumentationScope.properties?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -0,0 +1,3 @@
+# Variables will be replaced by Maven at build time when this file is copied to the target/ directory.
+instrumentationScope.name=${project.artifactId}
+instrumentationScope.version=${project.version}u}(j  (d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105j]  Kprometheus-metrics-exporter-opentelemetry/src/main/resources/lib/.gitignorej_  addedjW  KjX  K ja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorejd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignorejf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fresources%2Flib%2F.gitignore?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -0,0 +1 @@
+*.jaru}(j  (24a9f8dffef1509961ecdc2e2deee91f7072c264j]  :prometheus-metrics-exposition-formats/generate-protobuf.shj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.shjf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fgenerate-protobuf.sh?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xi  @@ -13,4 +13,4 @@ curl -sL https://raw.githubusercontent.com/prometheus/client_model/master/io/pro
 sed -i "s/java_package = \"io.prometheus.client\"/java_package = \"io.prometheus.metrics.expositionformats.generated.com_google_protobuf_${PROTOBUF_VERSION_STRING}\"/" src/main/protobuf/metrics.proto
 rm -rf src/main/generated/*
 protoc --java_out src/main/generated src/main/protobuf/metrics.proto
-sed -i "s/com\\.google\\.protobuf/io.prometheus.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"
+sed -i "s/com\\.google\\.protobuf/io.prometheus.metrics.shaded.com_google_protobuf_${PROTOBUF_VERSION_STRING}/g" "src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_${PROTOBUF_VERSION_STRING}/Metrics.java"u}(j  (a8eef2c7a6358645e787ef96c3c16364ed5f2452j]  -prometheus-metrics-exposition-formats/pom.xmlj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -45,8 +45,8 @@
         </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
-            <artifactId>protobuf-shaded</artifactId>
-            <version>1.0.0-alpha-1</version>
+            <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+            <version>${project.version}</version>
         </dependency>
 
         <!-- test dependencies -->u}(j  (d66bf16a8ab922374af7c7723bf3a41c1b7b90a7j]  prometheus-metrics-exposition-formats/src/main/generated/io/prometheus/metrics/expositionformats/generated/com_google_protobuf_3_21_7/Metrics.javaj_  modifiedjW  MjX  Mzja  Mjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.javajf  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fgenerated%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2Fgenerated%2Fcom_google_protobuf_3_21_7%2FMetrics.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183u}(j  (eea5f929a0b4ea14792d7806f6306662879017f8j]  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;u}(j  (e8beeee6cc34e7c8cb4a02386ae20f3488fdf936j]  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.Timestamp;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.Timestamp;
 
 public class ProtobufUtil {
 u}(j  (1faefbca46121f8d67424c0ff3d4ff8f51eb9cf9j]  Eprometheus-metrics-exposition-formats/src/main/protobuf/metrics.protoj_  modifiedjW  K	jX  K ja  K	jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.protojf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fprotobuf%2Fmetrics.proto?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -46,6 +46,8 @@ message Gauge {
 message Counter {
   optional double   value    = 1;
   optional Exemplar exemplar = 2;
+
+  optional google.protobuf.Timestamp  created_timestamp = 3;
 }
 
 message Quantile {
@@ -57,6 +59,8 @@ message Summary {
   optional uint64   sample_count = 1;
   optional double   sample_sum   = 2;
   repeated Quantile quantile     = 3;
+
+  optional google.protobuf.Timestamp  created_timestamp = 4;
 }
 
 message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
   // Buckets for the conventional histogram.
   repeated Bucket bucket             = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
 
+  optional google.protobuf.Timestamp created_timestamp = 15;
+
   // Everything below here is for native histograms (also known as sparse histograms).
   // Native histograms are an experimental feature without stability guarantees.
 
@@ -92,6 +98,9 @@ message Histogram {
   repeated double negative_count    = 11; // Absolute count of each bucket.
 
   // Positive buckets for the native histogram.
+  // Use a no-op span (offset 0, length 0) for a native histogram without any
+  // observations yet and with a zero_threshold of 0. Otherwise, it would be
+  // indistinguishable from a classic histogram.
   repeated BucketSpan positive_span = 12;
   // Use either "positive_delta" or "positive_count", the former for
   // regular histograms with integer counts, the latter for floatu}(j  (cf6cb09a68200d8a7ee152c58204667a90c06ce1j]  vprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -1,6 +1,6 @@
 package io.prometheus.metrics.expositionformats;
 
-import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
+import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot;u}(j  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbej]  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javaj_  modifiedjW  KjX  Kja  Kjb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {u}(j  (b872ee0cefa8765c12f85f4d0580453c1b4de6ccj]  .prometheus-metrics-shaded-dependencies/pom.xmlj_  addedjW  K(jX  K ja  K(jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  XA  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Shaded Dependencies</name>
+    <description>
+        Shaded (relocated to another packagage) dependencies.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <modules>
+        <module>prometheus-metrics-shaded-opentelemetry</module>
+        <module>prometheus-metrics-shaded-protobuf</module>
+    </modules>
+
+</project>u}(j  (d68cc1c041afdbe3b0e6b071317d9b9a2755e068j]  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmlj_  addedjW  K~jX  K ja  K~jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X  @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
+
+    <name>Shaded OpenTelemetry</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the OpenTelemetry exporter module.
+    </description>
+
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+        <otel.version.string>1_28_0</otel.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-api</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-semconv</artifactId>
+            <version>${otel.semconv.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
+            <version>${otel.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.intellij</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.intellij</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.jetbrains</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.org.jetbrains</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.io_opentelemetry_${otel.version.string}.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/org.jctools/**</exclude>
+                                        <exclude>META-INF/maven/org.jetbrains/**</exclude>
+                                        <exclude>META-INF/versions/**</exclude>
+                                        <exclude>META-INF/native-image/**</exclude>
+                                        <exclude>META-INF/proguard/**</exclude>
+                                        <exclude>META-INF/*.kotlin_module</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (7b0019461389b754822ed106979b1e5c461f8032j]  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/src/main/java/io/prometheus/metrics/shaded/io_opentelemetry/PrometheusMetricsShadedOpenTelemetry.javaj_  addedjW  K	jX  K ja  K	jb  X   https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javajd  X  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.javajf  X2  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fio_opentelemetry%2FPrometheusMetricsShadedOpenTelemetry.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xh  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.io_opentelemetry;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedOpenTelemetry {
+}u}(j  (b856ef185427b3939f8b4292d464b4b9f1de817cj]  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmlj_  addedjW  K\jX  K ja  K\jb  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljd  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  X8  @@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
+        <version>1.0.0-alpha-3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-shaded-protobuf</artifactId>
+
+    <name>Shaded Protobuf</name>
+    <description>
+        Shaded (reolocated to another package) dependencies for the Protobuf library used to create the Prometheus
+        Protobuf format
+    </description>
+
+
+    <properties>
+        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
+        <!-- in the Prometheus protobuf exposition format. -->
+        <protobuf.version>3.21.7</protobuf.version>
+        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
+        <protobuf.version.string>3_21_7</protobuf.version.string>
+    </properties>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <createSourcesJar>true</createSourcesJar>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.google.protobuf</pattern>
+                                    <shadedPattern>io.prometheus.metrics.shaded.com_google_protobuf_${protobuf.version.string}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/com.google.protobuf/**</exclude>
+                                        <exclude>**/*.proto</exclude>
+                                        <exclude>META-INF/MANIFEST.MF</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>u}(j  (3f63392a763257f697e79251d10d442a341fa7eaj]  prometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/src/main/java/io/prometheus/metrics/shaded/com_google_protobuf/PrometheusMetricsShadedProtobuf.javaj_  addedjW  K	jX  K ja  K	jb  X  https://github.com/prometheus/client_java/blob/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javajd  X  https://github.com/prometheus/client_java/raw/4fde8312ca337674dd9981ab5d7d280840e37183/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.javajf  X+  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fshaded%2Fcom_google_protobuf%2FPrometheusMetricsShadedProtobuf.java?ref=4fde8312ca337674dd9981ab5d7d280840e37183jh  Xf  @@ -0,0 +1,9 @@
+package io.prometheus.metrics.shaded.com_google_protobuf;
+
+/**
+ * This module does not need any source code, however, in order to publish it to Maven central it needs JavaDoc.
+ * <p>
+ * I'm adding this dummy class here to get JavaDoc so I can publish this module to Maven central.
+ */
+public class PrometheusMetricsShadedProtobuf {
+}u}(j  (b929015f99f5db26a5d2aed1b1bd53518ed59b5cj]  protobuf-shaded/.gitignorej_  removedjW  K jX  Kja  Kjb  thttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2F.gitignorejd  shttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2F.gitignorejf  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2F.gitignore?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jh  @@ -1 +0,0 @@
-src/main/javau}(j  (5db4149b724982e6ff8f55ae96f4f8a07804d590j]  protobuf-shaded/README.mdj_  removedjW  K jX  Kja  Kjb  shttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2FREADME.mdjd  rhttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2FREADME.mdjf  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2FREADME.md?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jh  @@ -1 +0,0 @@
-See [https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf](https://github.com/apache/hbase-thirdparty/tree/master/hbase-shaded-protobuf)u}(j  (ddfe62d9884175f9b37ea50638f1dcd45dd63c34j]  protobuf-shaded/pom.xmlj_  removedjW  K jX  Kja  Kjb  qhttps://github.com/prometheus/client_java/blob/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2Fpom.xmljd  phttps://github.com/prometheus/client_java/raw/c208b817c60035bcc07ea9008e6c1d6a066ddc40/protobuf-shaded%2Fpom.xmljf  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=c208b817c60035bcc07ea9008e6c1d6a066ddc40jh  X  @@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.prometheus</groupId>
-        <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-2-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>protobuf-shaded</artifactId>
-    <name>Shaded (relocated to another package) Protobuf</name>
-    <description>
-        Downloads Google Protobuf, compiles it, and reloacates/shades.
-        See also hbase-thirdparty/hbase-shaded-protobuf
-    </description>
-
-    <properties>
-        <!-- Must be the same as the version of the protoc command that generated Metrics.java -->
-        <!-- in the Prometheus protobuf exposition format. -->
-        <protobuf.version>3.21.7</protobuf.version>
-        <!-- The version string is part of the relocated package name to make it safe to update in the future. -->
-        <protobuf.version.string>3_21_7</protobuf.version.string>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <!-- include the protos -->
-                    <include>google/**</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <!--Clean needs to purge src/main/java since this is where
-                     the unpack of protobuf is overlaid. Do it for usual
-                     clean goal but also before we unpack in case patches
-                     delete/add files. We use src/main/java instead of dir
-                     under 'target' because the jar plugin is dumb, hard to
-                     make it source from other then src/main/java.-->
-                <artifactId>maven-clean-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>pre-generate-sources</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>clean</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}/src/main/java</directory>
-                            <includes>
-                                <include>**/**</include>
-                            </includes>
-                            <followSymlinks>false</followSymlinks>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!--Download our dependency src, i.e. protobuf, and
-                     unpack it. Overlays src/main/java so ready for
-                    compile-time (the jar plugin expects src in
-                    src/main/java)-->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <!--
-                              The protobuf-java has no compile or runtime dependency so we
-                              only depend it here, without adding it to our dependencies
-                              section. Need to review later if protobuf-java has compile or
-                              runtime dependencies in the future.
-                            -->
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.google.protobuf</groupId>
-                                    <artifactId>protobuf-java</artifactId>
-                                    <!-- must be the same as the version of the protoc command that generated Metrics.java -->
-                                    <version>3.21.7</version>
-                                    <classifier>sources</classifier>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                                    <includes>**/**</includes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--Above we built a jar. Now at package step, do relocation/shade-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <createSourcesJar>true</createSourcesJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.google.protobuf</pattern>
-                                    <shadedPattern>
-                                        io.prometheus.metrics.com_google_protobuf_${protobuf.version.string}
-                                    </shadedPattern>
-                                </relocation>
-                            </relocations>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>google/protobuf/*.proto</exclude>
-                        <exclude>google/protobuf/compiler/*.proto</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <!-- The upstream protobuf classes have JavaDoc errors. Ignore them. -->
-                    <excludePackageNames>com.google.protobuf</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>ueu(6f19357786a4d2451864b873bcd7f623590e5fe5}(sha(6f19357786a4d2451864b873bcd7f623590e5fe5node_idEC_kwDOAHoJt9oAKDZmMTkzNTc3ODZhNGQyNDUxODY0Yjg3M2JjZDdmNjIzNTkwZTVmZTUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T09:05:48Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-17T09:05:48Zumessage6Temporarily add protobuf-shaded to prepare for releasetree}(j  (4a19dec2613bd79c69b6d669d36156144bd54524urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/4a19dec2613bd79c69b6d669d36156144bd54524uj   hhttps://api.github.com/repos/prometheus/client_java/git/commits/6f19357786a4d2451864b873bcd7f623590e5fe5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj   dhttps://api.github.com/repos/prometheus/client_java/commits/6f19357786a4d2451864b873bcd7f623590e5fe5html_urlYhttps://github.com/prometheus/client_java/commit/6f19357786a4d2451864b873bcd7f623590e5fe5comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6f19357786a4d2451864b873bcd7f623590e5fe5/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j   "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j   "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j   9https://api.github.com/users/fstab/starred{/owner}{/repo}j"  0https://api.github.com/users/fstab/subscriptionsj$  'https://api.github.com/users/fstab/orgsj&  (https://api.github.com/users/fstab/reposj(  3https://api.github.com/users/fstab/events{/privacy}j*  2https://api.github.com/users/fstab/received_eventsj,  Userj.  uparents]}(j  (6284222cc856ead9c341e2c57c6b16dd5975f26bj   dhttps://api.github.com/repos/prometheus/client_java/commits/6284222cc856ead9c341e2c57c6b16dd5975f26bj  Yhttps://github.com/prometheus/client_java/commit/6284222cc856ead9c341e2c57c6b16dd5975f26buastats}(totalK	additionsK	deletionsK ufiles]}(j  (038744d94a9cb3d08b8484a32d086f175a62cd8efilenamepom.xmlstatusmodifiedjH  KjI  K changesKblob_url_https://github.com/prometheus/client_java/blob/6f19357786a4d2451864b873bcd7f623590e5fe5/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/6f19357786a4d2451864b873bcd7f623590e5fe5/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=6f19357786a4d2451864b873bcd7f623590e5fe5patchX;  @@ -47,6 +47,7 @@
         <module>prometheus-metrics-exposition-formats</module>
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>examples</module>
+        <module>protobuf-shaded</module>
 
         <module>simpleclient</module>
         <module>simpleclient_common</module>uau(b26b2514ad84e7683ec30077d2239f161f288b35}(sha(b26b2514ad84e7683ec30077d2239f161f288b35node_idEC_kwDOAHoJt9oAKGIyNmIyNTE0YWQ4NGU3NjgzZWMzMDA3N2QyMjM5ZjE2MWYyODhiMzUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T18:56:35Zu	committer}(je  Fabian Stäberjg  fabian@fstab.deji  2023-08-29T18:56:35Zumessage>Add support for StateSet metrics in the OpenTelemetry exportertree}(j]  (4465995e992bcbd21da4d2de1cd840e0fe6c2f33urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/4465995e992bcbd21da4d2de1cd840e0fe6c2f33uju  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b26b2514ad84e7683ec30077d2239f161f288b35
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuju  dhttps://api.github.com/repos/prometheus/client_java/commits/b26b2514ad84e7683ec30077d2239f161f288b35html_urlYhttps://github.com/prometheus/client_java/commit/b26b2514ad84e7683ec30077d2239f161f288b35comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b26b2514ad84e7683ec30077d2239f161f288b35/commentsjc  }(loginfstabidJ' j_  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3ju  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujk  }(j  fstabj  J' j_  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3ju  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j]  (8c36ed33e01107f49eb24422ce9558287af82887ju  dhttps://api.github.com/repos/prometheus/client_java/commits/8c36ed33e01107f49eb24422ce9558287af82887j  Yhttps://github.com/prometheus/client_java/commit/8c36ed33e01107f49eb24422ce9558287af82887uastats}(totalKS	additionsKQ	deletionsKufiles](}(j]  (741c71680b685fc05621ab363c207a1d894277e6filenamelexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaraw_urlhttps://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35patchX  @@ -4,9 +4,11 @@
 import io.prometheus.metrics.core.metrics.Gauge;
 import io.prometheus.metrics.core.metrics.Histogram;
 import io.prometheus.metrics.core.metrics.Info;
+import io.prometheus.metrics.core.metrics.StateSet;
 import io.prometheus.metrics.core.metrics.Summary;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.proto.metrics.v1.internal.Sum;
 
@@ -95,6 +97,15 @@ public static void main(String[] args) throws Exception {
 
         info.setLabelValues(version, vendor, runtime);
 
+        StateSet stateSet = StateSet.newBuilder()
+                .withName("feature_flags")
+                .withLabelNames("env")
+                .withStates("feature1", "feature2")
+                .register();
+
+        stateSet.withLabelValues("dev").setFalse("feature1");
+        stateSet.withLabelValues("dev").setTrue("feature2");
+
         HTTPServer server = HTTPServer.newBuilder()
                 .withPort(9400)
                 .buildAndStart();u}(j]  (2ab2c47aac4c290b571ff89ba4b99c1252795cfajÓ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajœ  modifiedj  Kj  K jǓ  Kjȓ  https://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajʓ  https://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj̓  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35jΓ  X  @@ -9,6 +9,7 @@
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
@@ -51,6 +52,8 @@ public Collection<MetricData> collectAllMetrics() {
                 addUnlessNull(result, factory.create((SummarySnapshot) snapshot));
             } else if (snapshot instanceof InfoSnapshot) {
                 addUnlessNull(result, factory.create((InfoSnapshot) snapshot));
+            } else if (snapshot instanceof StateSetSnapshot) {
+                addUnlessNull(result, factory.create((StateSetSnapshot) snapshot));
             }
         }
         return result;u}(j]  (1f720cfe24514bb36c65bc0983a8e1239d63d8c3jÓ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajœ  modifiedj  Kj  K jǓ  Kjȓ  https://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajʓ  https://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj̓  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35jΓ  X  @@ -3,6 +3,7 @@
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
@@ -48,4 +49,8 @@ public MetricData create(SummarySnapshot snapshot) {
     public MetricData create(InfoSnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusInfo(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(StateSetSnapshot snapshot) {
+        return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusStateSet(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+    }
 }u}(j]  (0dce35fa640fb1e114f86e0bfc229347a8d616dejÓ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusInfo.javajœ  modifiedj  Kj  KjǓ  Kjȓ  https://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.javajʓ  https://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java      j̓  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusInfo.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35jΓ  X  @@ -16,7 +16,7 @@ public class PrometheusInfo extends PrometheusData<DoublePointData> implements S
     private final List<DoublePointData> points;
 
     public PrometheusInfo(InfoSnapshot snapshot, long currentTimeMillis) {
-        super(MetricDataType.LONG_SUM);
+        super(MetricDataType.DOUBLE_SUM);
         this.points = snapshot.getData().stream()
                 .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
                 .collect(Collectors.toList());u}(j]  (ddf2160d04ae48dbdec91f99d371475820c13180jÓ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javajœ  modifiedj  Kj  KjǓ  K	jȓ  https://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javajʓ  https://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaj̓  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35jΓ  X  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.PrometheusNaming;
 import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
@@ -120,9 +121,15 @@ public T getData() {
 
     @Override
     public SumData<DoublePointData> getDoubleSumData() {
-        if (getType() == MetricDataType.DOUBLE_SUM) {
+        if (data instanceof PrometheusCounter) {
             return (PrometheusCounter) data;
         }
+        if (data instanceof PrometheusStateSet) {
+            return (PrometheusStateSet) data;
+        }
+        if (data instanceof PrometheusInfo) {
+            return (PrometheusInfo) data;
+        }
         return MetricData.super.getDoubleSumData();
     }
 }u}(j]  (3d19d9e8fc2d5fa8750abbedb2ea2efde2ae164ejÓ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusStateSet.javajœ  addedj  K5j  K jǓ  K5jȓ  https://github.com/prometheus/client_java/blob/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javajʓ  https://github.com/prometheus/client_java/raw/b26b2514ad84e7683ec30077d2239f161f288b35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.javaj̓  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusStateSet.java?ref=b26b2514ad84e7683ec30077d2239f161f288b35jΓ  X  @@ -0,0 +1,53 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.SumData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class PrometheusStateSet extends PrometheusData<DoublePointData> implements SumData<DoublePointData> {
+
+    private final List<DoublePointData> points;
+    public PrometheusStateSet(StateSetSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.DOUBLE_SUM);
+        this.points = new ArrayList<>();
+        for (StateSetSnapshot.StateSetDataPointSnapshot dataPoint : snapshot.getData()) {
+            for (int i=0; i<dataPoint.size(); i++) {
+                this.points.add(toOtelDataPoint(snapshot, dataPoint, i, currentTimeMillis));
+            }
+        }
+    }
+
+    @Override
+    public boolean isMonotonic() {
+        return false;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<DoublePointData> getPoints() {
+        return points;
+    }
+
+    private DoublePointData toOtelDataPoint(StateSetSnapshot snapshot, StateSetSnapshot.StateSetDataPointSnapshot dataPoint, int i, long currentTimeMillis) {
+        return new DoublePointDataImpl(
+                dataPoint.isTrue(i) ? 1.0 : 0.0,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels().merge(Labels.of(snapshot.getMetadata().getName(), dataPoint.getName(i)))),
+                Collections.emptyList()
+        );
+    }
+}ueu(4129fe061903eccea4a12bb8f110b73b2dcb5c35}(sha(4129fe061903eccea4a12bb8f110b73b2dcb5c35node_idEC_kwDOAHoJt9oAKDQxMjlmZTA2MTkwM2VjY2VhNGExMmJiOGYxMTBiNzNiMmRjYjVjMzUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-28T21:18:38Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-28T21:18:38Zumessage1Parse resource attributes from target_info metrictree}(j  (0493a0998961ff2c1003d2f2e311c3dadcf9d8a8urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/0493a0998961ff2c1003d2f2e311c3dadcf9d8a8uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/4129fe061903eccea4a12bb8f110b73b2dcb5c35
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/4129fe061903eccea4a12bb8f110b73b2dcb5c35html_urlYhttps://github.com/prometheus/client_java/commit/4129fe061903eccea4a12bb8f110b73b2dcb5c35comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/4129fe061903eccea4a12bb8f110b73b2dcb5c35/commentsj   }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j#  fstabj%  J' j  MDQ6VXNlcjMzMDUzNQ==j'  2https://avatars.githubusercontent.com/u/330535?v=4j)  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj,  ,https://api.github.com/users/fstab/followersj.  9https://api.github.com/users/fstab/following{/other_user}j0  2https://api.github.com/users/fstab/gists{/gist_id}j2  9https://api.github.com/users/fstab/starred{/owner}{/repo}j4  0https://api.github.com/users/fstab/subscriptionsj6  'https://api.github.com/users/fstab/orgsj8  (https://api.github.com/users/fstab/reposj:  3https://api.github.com/users/fstab/events{/privacy}j<  2https://api.github.com/users/fstab/received_eventsj>  Userj@  uparents]}(j  (1ccd6d495fa4ed58e000d11a7e688f15fa880e21j  dhttps://api.github.com/repos/prometheus/client_java/commits/1ccd6d495fa4ed58e000d11a7e688f15fa880e21j  Yhttps://github.com/prometheus/client_java/commit/1ccd6d495fa4ed58e000d11a7e688f15fa880e21uastats}(totalK	additionsK	deletionsKufiles]}(j  (cbf5d987b190038a9450cc36066d871f9f7fa365filenameprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javastatusmodifiedjZ  Kj[  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/4129fe061903eccea4a12bb8f110b73b2dcb5c35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaraw_urlhttps://github.com/prometheus/client_java/raw/4129fe061903eccea4a12bb8f110b73b2dcb5c35/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=4129fe061903eccea4a12bb8f110b73b2dcb5c35patchX  @@ -5,13 +5,16 @@
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.InfoSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
 import io.prometheus.metrics.model.snapshots.MetricSnapshots;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.ResourceBuilder;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -32,11 +35,9 @@ public PrometheusMetricProducer(PrometheusRegistry registry, InstrumentationScop
     @Override
     public Collection<MetricData> collectAllMetrics() {
         MetricSnapshots snapshots = registry.scrape(); // TODO: Filter
-
-        //resource.merge()
-
+        Resource resourceWithTargetInfo = resource.merge(resourceFromTargetInfo(snapshots));
         List<MetricData> result = new ArrayList<>(snapshots.size());
-        MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
+        MetricDataFactory factory = new MetricDataFactory(resourceWithTargetInfo, instrumentationScopeInfo, System.currentTimeMillis());
         for (MetricSnapshot snapshot : snapshots) {
             if (snapshot instanceof CounterSnapshot) {
                 addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
@@ -53,16 +54,22 @@ public Collection<MetricData> collectAllMetrics() {
         return result;
     }
 
-    /*
     private Resource resourceFromTargetInfo(MetricSnapshots snapshots) {
+        ResourceBuilder result = Resource.builder();
         for (MetricSnapshot snapshot : snapshots) {
             if (snapshot.getMetadata().getName().equals("target") && snapshot instanceof InfoSnapshot) {
                 InfoSnapshot targetInfo = (InfoSnapshot) snapshot;
-                targetInfo.getData().
+                if (targetInfo.getData().size() > 0) {
+                    InfoSnapshot.InfoDataPointSnapshot data = targetInfo.getData().get(0);
+                    Labels labels = data.getLabels();
+                    for (int i=0; i<labels.size(); i++) {
+                        result.put(labels.getName(i), labels.getValue(i));
+                    }
+                }
             }
         }
+        return result.build();
     }
-     */
 
     private void addUnlessNull(List<MetricData> result, MetricData data) {
         if (data != null) {uau(9ed810debcacaa52bd4dfb9db0ce476d6c379a97}(sha(9ed810debcacaa52bd4dfb9db0ce476d6c379a97node_idEC_kwDOAHoJt9oAKDllZDgxMGRlYmNhY2FhNTJiZDRkZmI5ZGIwY2U0NzZkNmMzNzlhOTccommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T18:21:21Zu	committer}(jw  Fabian Stäberjy  fabian@fstab.dej{  2023-08-27T18:21:21Zumessage(First OTel exponential histogram exampletree}(jo  (812871ab0926e734978b79dacb1303ebabfaacfcurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/812871ab0926e734978b79dacb1303ebabfaacfcuj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/9ed810debcacaa52bd4dfb9db0ce476d6c379a97
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/9ed810debcacaa52bd4dfb9db0ce476d6c379a97html_urlYhttps://github.com/prometheus/client_java/commit/9ed810debcacaa52bd4dfb9db0ce476d6c379a97comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/commentsju  }(loginfstabidJ' jq  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj}  }(j  fstabj  J' jq  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jo  (9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dj  dhttps://api.github.com/repos/prometheus/client_java/commits/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dj  Yhttps://github.com/prometheus/client_java/commit/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2duastats}(totalM	additionsMX	deletionsK+ufiles](}(jo  (e5d4e01d34dddbb87f4b134cd16c60909caf63affilename>examples/example-exporter-opentelemetry/config/prometheus.yamlstatusmodifiedjϔ  KjД  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlraw_urlhttps://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97patch@@ -0,0 +1,6 @@
+global:
+  scrape_interval: 10s
+scrape_configs:
+  - job_name: "prometheus-direct"
+    static_configs:
+      - targets: ["localhost:9400"]u}(jo  (ba0a58f2101902c5eaca8d6eb7b54ce20e9abcfcjՔ  /examples/example-exporter-opentelemetry/pom.xmljה  modifiedjϔ  KjД  K jٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljޔ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X	  @@ -37,6 +37,11 @@
             <artifactId>prometheus-metrics-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>u}(jo  (16a1790a5e6392a377b40d0dc7cfec1460c6aa01jՔ  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javajה  modifiedjϔ  KjД  K jٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javajޔ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -2,9 +2,13 @@
 
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
 import io.prometheus.metrics.model.snapshots.Unit;
 
+import java.util.Random;
+
 /**
  * Simple example of an application exposing metrics pushing metrics via OTLP.
  */
@@ -28,6 +32,23 @@ public static void main(String[] args) throws Exception {
         gauge.withLabelValues("inside").set(23.4);
         gauge.withLabelValues("outside").set(9.3);
 
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i=0; i<1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
         OpenTelemetryExporter.newBuilder()
                 .withIntervalSeconds(5)
                 .buildAndStart();u}(jo  (b54e1743030e61ca7f0c2a1916ac339fc25962a8jՔ  pom.xmljה  modifiedjϔ  KjД  K jٔ  Kjڔ  _https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/pom.xmljܔ  ^https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/pom.xmljޔ  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -57,6 +57,7 @@
         <module>prometheus-metrics-exporter-httpserver</module>
         <module>prometheus-metrics-exporter-opentelemetry</module>
         <!-- <module>prometheus-metrics-shaded-dependencies</module> --> <!-- during development we exclude this to make sure we use the shaded versions -->
+        <module>tmp_example</module>
         <module>examples</module>
         <module>integration-tests</module>
 u}(jo  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10jՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javajޔ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -76,14 +76,14 @@ public static class Builder {
         private PrometheusRegistry registry = null;
         private String protocol;
         private String endpoint;
-        private Map<String, String> headers = new HashMap<>();
+        private final Map<String, String> headers = new HashMap<>();
         private Integer intervalSeconds;
         private Integer timeoutSeconds;
         private String serviceName;
         private String serviceNamespace;
         private String serviceInstanceId;
         private String serviceVersion;
-        private Map<String, String> resourceAttributes = new HashMap<>();
+        private final Map<String, String> resourceAttributes = new HashMap<>();
 
         private Builder(PrometheusProperties config) {
             this.config = config;u}(jo  (f890e97391dae4b86bc8267366cd11a01bd5427ajՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javajޔ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X>  @@ -1,6 +1,8 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
@@ -34,12 +36,19 @@ public Collection<MetricData> collectAllMetrics() {
         MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
         for (MetricSnapshot snapshot : snapshots) {
             if (snapshot instanceof CounterSnapshot) {
-                result.add(factory.create((CounterSnapshot) snapshot));
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
             } else if (snapshot instanceof GaugeSnapshot) {
-                result.add(factory.create((GaugeSnapshot) snapshot));
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
             }
-
         }
         return result;
     }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
 }u}(jo  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fjՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -6,44 +6,17 @@
 
 import java.util.List;
 
-class DoublePointDataImpl implements DoublePointData {
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
 
     private final double value;
-    private final long startEpochNanos;
-    private final long epochNanos;
-    private final Attributes attributes;
-    private final List<DoubleExemplarData> exemplars;
 
     public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
         this.value = value;
-        this.startEpochNanos = startEpochNanos;
-        this.epochNanos = epochNanos;
-        this.attributes = attributes;
-        this.exemplars = exemplars;
     }
 
     @Override
     public double getValue() {
         return value;
     }
-
-    @Override
-    public long getStartEpochNanos() {
-        return startEpochNanos;
-    }
-
-    @Override
-    public long getEpochNanos() {
-        return epochNanos;
-    }
-
-    @Override
-    public Attributes getAttributes() {
-        return attributes;
-    }
-
-    @Override
-    public List<DoubleExemplarData> getExemplars() {
-        return exemplars;
-    }
 }u}(jo  (d365c26fb4969d38448d8e1bd702b7e55e061b2ejՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javajה  addedjϔ  K.jД  K jٔ  K.jڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(jo  (86d56d2d79c660d5d01c2802f73e94787343c22ejՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javajה  addedjϔ  KUjД  K jٔ  KUjڔ  X  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajܔ  X   https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(jo  (9605ffcb1bf67a030eb87af3d7d6524deed62729jՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajה  modifiedjϔ  K
jД  K jٔ  K
jڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
@@ -25,4 +26,16 @@ public MetricData create(CounterSnapshot snapshot) {
     public MetricData create(GaugeSnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return null;//new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
 }u}(jo  (a0b4aed8397b8eac69d32d28215f110df28b893bjՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javajה  addedjϔ  K+jД  K jٔ  K+jڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javajޔ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(jo  (883b06e08475fcbe0e3464b61fa883d3db0a28d1jՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -38,12 +38,10 @@ public Collection<DoublePointData> getPoints() {
     }
 
     private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
-        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
-        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
         return new DoublePointDataImpl(
                 dataPoint.getValue(),
-                startEpochNanos,
-                epochNanos,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
                 labelsToAttributes(dataPoint.getLabels()),
                 convertExemplar(dataPoint.getExemplar())
         );u}(jo  (353a1623c7ae3932afa295452af773fa7d9aecdbjՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javajה  modifiedjϔ  KjД  K jٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javajޔ  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -1,5 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
@@ -11,6 +13,7 @@
 
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 abstract class PrometheusData<T extends PointData> implements Data<T> {
 
@@ -37,6 +40,19 @@ protected Attributes labelsToAttributes(Labels labels) {
     }
 
     protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
         return Collections.emptyList();
     }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
 }u}(jo  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77jՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -27,12 +27,10 @@ public Collection<DoublePointData> getPoints() {
     }
 
     private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
-        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
-        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
         return new DoublePointDataImpl(
                 dataPoint.getValue(),
-                startEpochNanos,
-                epochNanos,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
                 labelsToAttributes(dataPoint.getLabels()),
                 convertExemplar(dataPoint.getExemplar())
         );u}(jo  (c9d11623e817271e498174f1bee39cb8b344be6ejՔ  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javajה  addedjϔ  KWjД  K jٔ  KWjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javajޔ  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    public PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(jo  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbejՔ  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajה  modifiedjϔ  KjД  Kjٔ  Kjڔ  https://github.com/prometheus/client_java/blob/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajܔ  https://github.com/prometheus/client_java/raw/9ed810debcacaa52bd4dfb9db0ce476d6c379a97/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javajޔ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=9ed810debcacaa52bd4dfb9db0ce476d6c379a97j  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {ueu(b02fa28fb1dfa9b43738f659694c8366e7408d04}(sha(b02fa28fb1dfa9b43738f659694c8366e7408d04node_idEC_kwDOAHoJt9oAKGIwMmZhMjhmYjFkZmE5YjQzNzM4ZjY1OTY5NGM4MzY2ZTc0MDhkMDQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T07:15:01Zu	committer}(jd  Fabian Stäberjf  fabian@fstab.dejh  2023-08-27T07:15:01Zumessage/Add proper unit conversion to the OTel exportertree}(j\  (d9c934270725d0b4f44ee57bd9ca6b5b2d047e96urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/d9c934270725d0b4f44ee57bd9ca6b5b2d047e96ujt  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b02fa28fb1dfa9b43738f659694c8366e7408d04
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujt  dhttps://api.github.com/repos/prometheus/client_java/commits/b02fa28fb1dfa9b43738f659694c8366e7408d04html_urlYhttps://github.com/prometheus/client_java/commit/b02fa28fb1dfa9b43738f659694c8366e7408d04comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b02fa28fb1dfa9b43738f659694c8366e7408d04/commentsjb  }(loginfstabidJ' j^  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jt  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujj  }(j  fstabj  J' j^  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jt  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j\  (7bb727ce4cd20e1b08cb30e0b97b54334aac49dfjt  dhttps://api.github.com/repos/prometheus/client_java/commits/7bb727ce4cd20e1b08cb30e0b97b54334aac49dfj  Yhttps://github.com/prometheus/client_java/commit/7bb727ce4cd20e1b08cb30e0b97b54334aac49dfuastats}(totalK,	additionsK+	deletionsKufiles]}(j\  (bd33fdc0569b20e2221ba4747e06da8e01509460filenameprometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusMetricData.javastatusmodifiedj  K+j  KchangesK,blob_urlhttps://github.com/prometheus/client_java/blob/b02fa28fb1dfa9b43738f659694c8366e7408d04/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javaraw_urlhttps://github.com/prometheus/client_java/raw/b02fa28fb1dfa9b43738f659694c8366e7408d04/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusMetricData.java?ref=b02fa28fb1dfa9b43738f659694c8366e7408d04patchX
  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
+import io.prometheus.metrics.model.snapshots.Unit;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoublePointData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
@@ -22,7 +23,7 @@ class PrometheusMetricData<T extends PrometheusData<?>> implements MetricData {
         this.resource = resource;
         this.name = getNameWithoutUnit(metricMetadata);
         this.description = metricMetadata.getHelp();
-        this.unit = metricMetadata.getUnit() == null ? null : metricMetadata.getUnit().toString();
+        this.unit = convertUnit(metricMetadata.getUnit());
         this.data = data;
     }
 
@@ -41,6 +42,47 @@ private String getNameWithoutUnit(MetricMetadata metricMetadata) {
         return name;
     }
 
+    // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6cf4dec6cb42d87d8840e9f67d4acf66d4eb8fda/pkg/translator/prometheus/normalize_name.go#L19
+    private String convertUnit(Unit unit) {
+        if (unit == null) {
+            return null;
+        }
+        switch (unit.toString()) {
+            // Time
+            case "days": return "d";
+            case "hours": return "h";
+            case "minutes": return "min";
+            case "seconds": return "s";
+            case "milliseconds": return "ms";
+            case "microseconds": return "us";
+            case "nanoseconds": return "ns";
+            // Bytes
+            case "bytes": return "By";
+            case "kibibytes": return "KiBy";
+            case "mebibytes": return "MiBy";
+            case "gibibytes": return "GiBy";
+            case "tibibytes": return "TiBy";
+            case "kilobytes": return "KBy";
+            case "megabytes": return "MBy";
+            case "gigabytes": return "GBy";
+            case "terabytes": return "TBy";
+            // SI
+            case "meters": return "m";
+            case "volts": return "V";
+            case "amperes": return "A";
+            case "joules": return "J";
+            case "watts": return "W";
+            case "grams": return "g";
+            // Misc
+            case "celsius": return "Cel";
+            case "hertz": return "Hz";
+            case "percent": return "%";
+            // default
+            default:
+                return unit.toString();
+        }
+    }
+
     @Override
     public Resource getResource() {
         return resource;uau(603009f431fee370bc0f1f44837600c002fbec5c}(sha(603009f431fee370bc0f1f44837600c002fbec5cnode_idEC_kwDOAHoJt9oAKDYwMzAwOWY0MzFmZWUzNzBiYzBmMWY0NDgzNzYwMGMwMDJmYmVjNWMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-17T10:07:50Zu	committer}(jٕ  Fabian Stäberjە  fabian@fstab.dejݕ  2023-07-17T10:07:50Zumessage@[maven-release-plugin] prepare release client_java-1.0.0-alpha-1tree}(jѕ  (fadee43675df084c4379c2b044d930d8b0025999urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/fadee43675df084c4379c2b044d930d8b0025999uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/603009f431fee370bc0f1f44837600c002fbec5c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/603009f431fee370bc0f1f44837600c002fbec5chtml_urlYhttps://github.com/prometheus/client_java/commit/603009f431fee370bc0f1f44837600c002fbec5ccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/603009f431fee370bc0f1f44837600c002fbec5c/commentsjו  }(loginfstabidJ' jӕ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujߕ  }(j  fstabj  J' jӕ  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j   h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j	  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj
  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jѕ  (3a024be96d3b07625b020ed950404da436fdf847j  dhttps://api.github.com/repos/prometheus/client_java/commits/3a024be96d3b07625b020ed950404da436fdf847j  Yhttps://github.com/prometheus/client_java/commit/3a024be96d3b07625b020ed950404da436fdf847uastats}(totalKv	additionsK8	deletionsK>ufiles](}(jѕ  (8c3fe0d433e43a8ee869b9d6fb490d727ce5d326filenamebenchmarks/pom.xmlstatusmodifiedj1  Kj2  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cpatchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jѕ  (180db27c8beb75c55e1ad27357ea14636d103bb0j7  examples/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  jhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/examples%2Fpom.xmlj>  ihttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/examples%2Fpom.xmlj@  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X
  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jѕ  (00e9c7303620aa434cfd3c21a97bd264a524ded1j7  'examples/tomcat-servlet-example/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/examples%2Ftomcat-servlet-example%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/examples%2Ftomcat-servlet-example%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/examples%2Ftomcat-servlet-example%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>tomcat-servlet-example</artifactId>u}(jѕ  (467ae1dc0526f17004539e3e414a3fcc3371c330j7  #integration_tests/it_common/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_common%2Fpom.xmlj>  ~https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_common%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jѕ  (bdb7a36349a3a9403d9fd225a5dca6e47824aee6j7  1integration_tests/it_exemplars_otel_agent/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml      j@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jѕ  (23a3b2458e6b097acbff64a00488ce81617534cdj7  /integration_tests/it_exemplars_otel_sdk/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jѕ  (101fb04b4f8ac90a3a2f97f6e9864af048df5355j7  *integration_tests/it_java_versions/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_java_versions%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_java_versions%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jѕ  (79019eb3ee8c365ee28eefc05bacdd964934afaej7  #integration_tests/it_log4j2/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_log4j2%2Fpom.xmlj>  ~https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_log4j2%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jѕ  (4c8190bf867a5b19065632c89ec2860939e5f34dj7  (integration_tests/it_pushgateway/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_pushgateway%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_pushgateway%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X   @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jѕ  (dce018335dd45dd2e31e72aafb5603069a50dc1ej7  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jѕ  (dd8a9666abb8d37acd349dbebc2c6d4fbd0fb020j7  integration_tests/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  shttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fpom.xmlj>  rhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/integration_tests%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jѕ  (93b20af609866d8f4776a6d7524a0a83883f084aj7  pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  _https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/pom.xmlj>  ^https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/pom.xmlj@  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>
@@ -25,7 +25,7 @@
         <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
         <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
         <url>git@github.com:prometheus/client_java.git</url>
-        <tag>HEAD</tag>
+        <tag>client_java-1.0.0-alpha-1</tag>
     </scm>
 
     <developers>u}(jѕ  (5b6a16a1802f0ff8c90a433c6be69f7e17e11e5ej7  !prometheus-metrics-config/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  {https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-config%2Fpom.xmlj>  zhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-config%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jѕ  (0c64d204426a6070fe6136887d6fe93b25aab78fj7  prometheus-metrics-core/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  yhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-core%2Fpom.xmlj>  xhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-core%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jѕ  (e7829efad62c1cab88d5eb67b69b7a79a926100ej7  3prometheus-metrics-exporter-servlet-jakarta/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jѕ  (364c081fac426c63a8cffb2c7420d78a776cce56j7  -prometheus-metrics-exposition-formats/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-exposition-formats%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-exposition-formats%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X!  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jѕ  (8815b15d2fe9752c0273af42507c118312a05f24j7   prometheus-metrics-model/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  zhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-model%2Fpom.xmlj>  yhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-model%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jѕ  (0c11768347ac58814bb550c48ad50bda939f6226j7  !prometheus-metrics-tracer/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  {https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fpom.xmlj>  zhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jѕ  (40e4e6dd6e4a4657e4169edeaaeb2a62387d1cb2j7  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jѕ  (9a4cfda2e19fb4e342b45c7972046cd09c2beb42j7  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jѕ  (d7163b2d9951a06d15f584c534d61b9e414cfcd6j7  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jѕ  (ad3900400eee996fab4b372362ea7ca7b8328b7cj7  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jѕ  (63730a23c4096a528db9bfb718318c1db6351828j7  protobuf-shaded/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  qhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/protobuf-shaded%2Fpom.xmlj>  phttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/protobuf-shaded%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/protobuf-shaded%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>protobuf-shaded</artifactId>u}(jѕ  (a94a98560359e7587c1ddb6ffd82f98f0d67c71cj7  simpleclient/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  nhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient%2Fpom.xmlj>  mhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jѕ  (47fff77bd4eb3648b69db213d755e3c3266700d0j7  simpleclient_bom/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  rhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_bom%2Fpom.xmlj>  qhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_bom%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jѕ  (c020a91e4b01cbef3ce7194dcb9fb13c31586f96j7  simpleclient_caffeine/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  whttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_caffeine%2Fpom.xmlj>  vhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_caffeine%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jѕ  (2dbe544515e9662086977112d331b98172460bacj7  simpleclient_common/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  uhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_common%2Fpom.xmlj>  thttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_common%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jѕ  (3be5f95827586539e282f2b6f8495d533ab6d06ej7  simpleclient_dropwizard/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  yhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_dropwizard%2Fpom.xmlj>  xhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_dropwizard%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jѕ  (30f5436f13d500c236fedcbdf5431305d41d7873j7  $simpleclient_graphite_bridge/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  ~https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_graphite_bridge%2Fpom.xmlj>  }https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_graphite_bridge%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jѕ  (53f8ebcdfd16fb461e5ca7965a09bc5d762ef675j7  simpleclient_guava/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  thttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_guava%2Fpom.xmlj>  shttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_guava%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jѕ  (acc2f9638a1917550ca157ca5b35cd5fcfd65d11j7  simpleclient_hibernate/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  xhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_hibernate%2Fpom.xmlj>  whttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_hibernate%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jѕ  (2c01371a30e9a325492521c0e30b7c53077846f1j7  simpleclient_hotspot/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  vhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_hotspot%2Fpom.xmlj>  uhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_hotspot%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jѕ  (a336c0995776a227a83ef953e10ee7929cf792aaj7  simpleclient_httpserver/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  yhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_httpserver%2Fpom.xmlj>  xhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_httpserver%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jѕ  (57563ce625f4d84f17241bde1627e87b5bed8ab0j7  simpleclient_jetty/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  thttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_jetty%2Fpom.xmlj>  shttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_jetty%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jѕ  (0b6d8b4ba0a540e74c02b80bcf5ddead0e432324j7  simpleclient_jetty_jdk8/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  yhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_jetty_jdk8%2Fpom.xmlj>  xhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_jetty_jdk8%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jѕ  (6f9b8f65572fb49fdde098f06c6706b8f9bc13ddj7  simpleclient_log4j/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  thttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_log4j%2Fpom.xmlj>  shttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_log4j%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jѕ  (ad85625aa843f97e3e2334b677ed99c01603e124j7  simpleclient_log4j2/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  uhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_log4j2%2Fpom.xmlj>  thttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_log4j2%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jѕ  (e78ef0b106a19912201ea06c1dda79450ee40748j7  simpleclient_logback/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  vhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_logback%2Fpom.xmlj>  uhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_logback%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jѕ  (df6f86248d8896d3874bfb07da087826df9a0e77j7   simpleclient_pushgateway/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  zhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_pushgateway%2Fpom.xmlj>  yhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_pushgateway%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jѕ  (ddedfc18de610e39a9a3ce45467f1a057870e8f4j7  simpleclient_servlet/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  vhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet%2Fpom.xmlj>  uhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jѕ  (5e71a629d32a125ecff3ebd46f5747afe8c6c5d2j7  #simpleclient_servlet_common/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  }https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet_common%2Fpom.xmlj>  |https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet_common%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jѕ  (94b821104c33682d5229f397324f0bab21dd0d24j7  $simpleclient_servlet_jakarta/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  ~https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet_jakarta%2Fpom.xmlj>  }https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_servlet_jakarta%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jѕ  (4ccbcee9a02a44b8a8d6de45a4e7644e79b4ba3fj7  simpleclient_spring_web/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  yhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_spring_web%2Fpom.xmlj>  xhttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_spring_web%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jѕ  (8efaae5108c151dfd1dcbd3c3bb5961d76dec4f6j7  simpleclient_tracer/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  uhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fpom.xmlj>  thttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jѕ  (fcdd572fcdafd05a57480a754b16b0727e6dd784j7  6simpleclient_tracer/simpleclient_tracer_common/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jѕ  (56be6b1a244a2b4d1e6e60a07efe5fceacd5a829j7  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jѕ  (19c8edc4d016d831fc80dd3f46b0dcab30dab25dj7  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  https://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj>  https://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-1-SNAPSHOT</version>
+    <version>1.0.0-alpha-1</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jѕ  (cf0649de1aad505b197841d2a8c782fe136fcf59j7  simpleclient_vertx/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  thttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_vertx%2Fpom.xmlj>  shttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_vertx%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jѕ  (155425d2fcf0dfd7c630c5ba17e0b1ef020b1d28j7  simpleclient_vertx4/pom.xmlj9  modifiedj1  Kj2  Kj;  Kj<  uhttps://github.com/prometheus/client_java/blob/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_vertx4%2Fpom.xmlj>  thttps://github.com/prometheus/client_java/raw/603009f431fee370bc0f1f44837600c002fbec5c/simpleclient_vertx4%2Fpom.xmlj@  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=603009f431fee370bc0f1f44837600c002fbec5cjB  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-1-SNAPSHOT</version>
+        <version>1.0.0-alpha-1</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(6e1666e979c7e4ad69dd8ae1c10881172e3110d9}(sha(6e1666e979c7e4ad69dd8ae1c10881172e3110d9node_idEC_kwDOAHoJt9oAKDZlMTY2NmU5NzljN2U0YWQ2OWRkOGFlMWMxMDg4MTE3MmUzMTEwZDkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-01T21:13:27Zu	committer}(jΗ  Fabian StäberjЗ  fabian@fstab.dejҗ  2023-07-01T21:13:27Zumessagecallback metricstree}(jƗ  (44cbf09edb909fb437cc72b48636b7699970bc15urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/44cbf09edb909fb437cc72b48636b7699970bc15ujޗ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/6e1666e979c7e4ad69dd8ae1c10881172e3110d9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujޗ  dhttps://api.github.com/repos/prometheus/client_java/commits/6e1666e979c7e4ad69dd8ae1c10881172e3110d9html_urlYhttps://github.com/prometheus/client_java/commit/6e1666e979c7e4ad69dd8ae1c10881172e3110d9comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/commentsj̗  }(loginfstabidJ' jȗ  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jޗ  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujԗ  }(j  fstabj  J' jȗ  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jޗ  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j   0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj
  Userj  uparents]}(jƗ  (7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1jޗ  dhttps://api.github.com/repos/prometheus/client_java/commits/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1j  Yhttps://github.com/prometheus/client_java/commit/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1uastats}(totalM	additionsM	deletionsKufiles](}(jƗ  (a1d0893b872cb87bdbc006c8783c177cb74adde4filename^prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusProperties.javastatusmodifiedj&  Kj'  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusProperties.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9patchXc  @@ -5,16 +5,16 @@
 
 public class PrometheusProperties {
 
-    private static final PrometheusProperties instance = PrometheusPropertiesLoader.load();
+    private static final PrometheusProperties defaultInstance = PrometheusPropertiesLoader.load();
 
     private final MetricProperties defaultMetricProperties;
     private final Map<String, MetricProperties> metricProperties = new HashMap<>();
     private final ExemplarProperties exemplarConfig;
     private final ExpositionFormatProperties expositionFormatProperties;
     private final HttpServerProperties httpServerConfig;
 
-    public static PrometheusProperties getInstance() throws PrometheusPropertiesException {
-        return instance;
+    public static PrometheusProperties get() throws PrometheusPropertiesException {
+        return defaultInstance;
     }
 
     public PrometheusProperties(u}(jƗ  (1a49a5747ff5f48a84fcbc0b0d2774b7a6eceb93j,  bprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -11,7 +11,7 @@ public class PrometheusPropertiesTest {
 
     @Test
     public void testPrometheusConfig() {
-        PrometheusProperties result = PrometheusProperties.getInstance();
+        PrometheusProperties result = PrometheusProperties.get();
         Assert.assertEquals(11, result.getDefaultMetricProperties().getHistogramClassicUpperBounds().length);
         Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().length);
     }u}(jƗ  (f1c8b4a8724f2316b134ca964ceb692991ec2a69j,  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/CounterDataPoint.javaj.  renamedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FCounterDataPoint.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core.observer;
+package io.prometheus.metrics.core.datapoints;
 
 import io.prometheus.metrics.model.snapshots.Labels;
 previous_filename_prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/CounterDataPoint.javau}(jƗ  (8dd277d8157d6f2473fd4f1c5b03f0d9d1bf252bj,  Zprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DataPoint.javaj.  addedj&  Kj'  K j0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDataPoint.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  b@@ -0,0 +1,4 @@
+package io.prometheus.metrics.core.datapoints;
+
+public interface DataPoint {
+}u}(jƗ  (ca9d979ae61474e213fdefcddb1351b0dbe8c315j,  fprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DistributionDataPoint.javaj.  renamedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FDistributionDataPoint.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core.observer;
+package io.prometheus.metrics.core.datapoints;
 
 import io.prometheus.metrics.model.snapshots.Labels;
 jI  dprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DistributionDataPoint.javau}(jƗ  (92de17aa972d8b001bc6bc27b6df58273eac6bb5j,  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/GaugeDataPoint.javaj.  renamedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FGaugeDataPoint.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core.observer;
+package io.prometheus.metrics.core.datapoints;
 
 import io.prometheus.metrics.model.snapshots.Labels;
 jI  ]prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/GaugeDataPoint.javau}(jƗ  (6f938dbbf2249ac22d2ca5f45b4acd466de85a3cj,  bprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/StateSetDataPoint.javaj.  renamedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FStateSetDataPoint.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  @@ -1,4 +1,4 @@
-package io.prometheus.metrics.core.observer;
+package io.prometheus.metrics.core.datapoints;
 
 public interface StateSetDataPoint extends DataPoint {
     void setTrue(String state);jI  `prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/StateSetDataPoint.javau}(jƗ  (ee68061c9a1a0b2a24c2039038e7d24f9f068acbj,  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/Timer.javaj.  renamedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fdatapoints%2FTimer.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  @@ -1,7 +1,6 @@
-package io.prometheus.metrics.core.observer;
+package io.prometheus.metrics.core.datapoints;
 
 import java.io.Closeable;
-import java.io.IOException;
 import java.util.function.DoubleConsumer;
 
 public class Timer implements Closeable {jI  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/Timer.javau}(jƗ  (89bf55f391b7c9dba54afd7fc417e0bf1b502bb8j,  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CallbackMetric.javaj.  addedj&  K/j'  K j0  K/j1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCallbackMetric.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X@	  @@ -0,0 +1,47 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
+
+import java.util.List;
+
+/**
+ * There are two kinds of metrics:
+ * <ul>
+ *     <li>A {@code StatefulMetric} actively maintains its current values, e.g. a stateful counter actively stores its current count.</li>
+ *     <li>A {@code CallbackMetric} gets its values on demand when it is collected, e.g. a callback gauge representing the current heap size.</li>
+ * </ul>
+ * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
+ * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
+ * but this has nothing to do with multi-threading.
+ */
+abstract class CallbackMetric extends MetricWithFixedMetadata {
+
+    protected CallbackMetric(Builder<?, ?> builder) {
+        super(builder);
+    }
+
+    protected Labels makeLabels(String... labelValues) {
+        if (labelNames.length == 0) {
+            if (labelValues != null && labelValues.length > 0) {
+                throw new IllegalArgumentException("Cannot pass label values to a " + this.getClass().getSimpleName() + " that was created without label names.");
+            }
+            return constLabels;
+        } else {
+            if (labelValues == null) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with label names, but the callback was called without label values.");
+            }
+            if (labelValues.length != labelNames.length) {
+                throw new IllegalArgumentException(this.getClass().getSimpleName() + " was created with " + labelNames.length + " label names, but the callback was called with " + labelValues.length + " label values.");
+            }
+            return constLabels.merge(Labels.of(labelNames, labelValues));
+        }
+    }
+
+    static abstract class Builder<B extends Builder<B, M>, M extends CallbackMetric> extends MetricWithFixedMetadata.Builder<B, M> {
+
+        protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
+            super(illegalLabelNames, properties);
+        }
+    }
+}u}(jƗ  (ea7e09842ec502358dec97e243b6d357bfbc227bj,  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Counter.javaj.  modifiedj&  Kj'  K1j0  K5j1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounter.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X`
  @@ -2,20 +2,19 @@
 
 import io.prometheus.metrics.config.MetricProperties;
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
 import io.prometheus.metrics.core.exemplars.ExemplarSampler;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig;
 import io.prometheus.metrics.model.registry.Collector;
 import io.prometheus.metrics.model.snapshots.CounterSnapshot;
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.CounterDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.DoubleAdder;
 import java.util.concurrent.atomic.LongAdder;
-import java.util.function.DoubleSupplier;
 
 /**
  * Counter metric.
@@ -24,6 +23,7 @@
  * <pre>{@code
  * Counter requestCount = Counter.newBuilder()
  *     .withName("requests_total")
+ *     .withHelp("Total number of requests")
  *     .withLabelNames("path", "status")
  *     .register();
  * requestCount.withLabelValues("/hello-world", "200").inc();
@@ -110,14 +110,14 @@ protected CounterSnapshot collect(List<Labels> labels, List<DataPoint> metricDat
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Builder newBuilder(PrometheusProperties config) {
         return new Builder(config);
     }
 
-    private static String normalizeName(String name) {
+    static String normalizeName(String name) {
         if (name != null && name.endsWith("_total")) {
             name = name.substring(0, name.length() - 6);
         }
@@ -249,49 +249,4 @@ protected Builder self() {
             return this;
         }
     }
-
-    public static class FromCallback extends MetricWithFixedMetadata {
-
-        private final DoubleSupplier callback;
-        private final long createdTimeMillis = System.currentTimeMillis();
-
-        private FromCallback(Counter.FromCallback.Builder builder) {
-            super(builder);
-            this.callback = builder.callback;
-        }
-
-        @Override
-        public CounterSnapshot collect() {
-            return new CounterSnapshot(getMetadata(), Collections.singletonList(new CounterSnapshot.CounterDataPointSnapshot(
-                    callback.getAsDouble(),
-                    constLabels,
-                    null,
-                    createdTimeMillis
-            )));
-        }
-
-        public static class Builder extends MetricWithFixedMetadata.Builder<Counter.FromCallback.Builder, Counter.FromCallback> {
-
-            private DoubleSupplier callback;
-
-            private Builder(PrometheusProperties config) {
-                super(Collections.emptyList(), config);
-            }
-
-            public Counter.FromCallback.Builder withCallback(DoubleSupplier callback) {
-                this.callback = callback;
-                return this;
-            }
-
-            @Override
-            public Counter.FromCallback build() {
-                return new Counter.FromCallback(withName(normalizeName(name)));
-            }
-
-            @Override
-            protected Counter.FromCallback.Builder self() {
-                return this;
-            }
-        }
-    }
 }u}(jƗ  (c7446f4c1b0684d4b14ed8bb39b4c655f1fd9a95j,  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CounterWithCallback.javaj.  addedj&  Kej'  K j0  Kej1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterWithCallback.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X
  @@ -0,0 +1,101 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+ *
+ * CounterWithCallback.newBuilder()
+ *         .withName("classes_loaded_total")
+ *         .withHelp("The total number of classes that have been loaded since the JVM has started execution")
+ *         .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
+ *         .register();
+ * }</pre>
+ */
+public class CounterWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private CounterWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public CounterSnapshot collect() {
+        List<CounterSnapshot.CounterDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new CounterSnapshot.CounterDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new CounterSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<CounterWithCallback.Builder, CounterWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        /**
+         * The {@code _total} suffix will automatically be appended if it's missing.
+         * <pre>{@code
+         * CounterWithCallback c1 = CounterWithCallback.newBuilder()
+         *     .withName("events_total")
+         *     .build();
+         * CounterWithCallback c2 = CounterWithCallback.newBuilder()
+         *     .withName("events")
+         *     .build();
+         * }</pre>
+         * In the example above both {@code c1} and {@code c2} would be named {@code "events_total"} in Prometheus.
+         * <p>
+         * Throws an {@link IllegalArgumentException} if
+         * {@link io.prometheus.metrics.model.snapshots.MetricMetadata#isValidMetricName(String) MetricMetadata.isValidMetricName(name)}
+         * is {@code false}.
+         */
+        @Override
+        public Builder withName(String name) {
+            return super.withName(Counter.normalizeName(name));
+        }
+
+        @Override
+        public CounterWithCallback build() {
+            return new CounterWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(jƗ  (420ad710d1e8f96c59041b33f512c3d05b6e1f7cj,  Sprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Gauge.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGauge.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9     j7  X  @@ -7,7 +7,7 @@
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.GaugeDataPoint;
+import io.prometheus.metrics.core.datapoints.GaugeDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -197,7 +197,7 @@ protected Gauge.FromCallback.Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Builder newBuilder(PrometheusProperties config) {u}(jƗ  (7a1424d95eecee5e16d7b4e3fd75278b7fff50c9j,  _prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/GaugeWithCallback.javaj.  addedj&  KVj'  K j0  KVj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeWithCallback.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X
  @@ -0,0 +1,86 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+ *
+ * GaugeWithCallback.newBuilder()
+ *     .withName("jvm_memory_bytes_used")
+ *     .withHelp("Used bytes of a given JVM memory area.")
+ *     .withUnit(Unit.BYTES)
+ *     .withLabelNames("area")
+ *     .withCallback(callback -> {
+ *         callback.call(memoryBean.getHeapMemoryUsage().getUsed(), "heap");
+ *         callback.call(memoryBean.getNonHeapMemoryUsage().getUsed(), "nonheap");
+ *     })
+ *     .register();
+ * }</pre>
+ */
+public class GaugeWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(double value, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private GaugeWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public GaugeSnapshot collect() {
+        List<GaugeSnapshot.GaugeDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((value, labelValues) -> {
+            dataPoints.add(new GaugeSnapshot.GaugeDataPointSnapshot(value, makeLabels(labelValues), null, 0L));
+        });
+        return new GaugeSnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<GaugeWithCallback.Builder, GaugeWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.emptyList(), properties);
+        }
+
+        @Override
+        public GaugeWithCallback build() {
+            return new GaugeWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(jƗ  (0a3c8b9db6b1e9db0034730f51807fd9b654b5aej,  Wprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Histogram.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogram.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -10,7 +10,7 @@
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
-import io.prometheus.metrics.core.observer.DistributionDataPoint;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import io.prometheus.metrics.core.util.Scheduler;
 
 import java.math.BigDecimal;
@@ -611,7 +611,7 @@ protected DataPoint newDataPoint() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Builder newBuilder(PrometheusProperties config) {u}(jƗ  (02c35e2bd7d35e8475f30a119a3571fa57199176j,  Rprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Info.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FInfo.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X'  @@ -71,7 +71,7 @@ protected Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Builder newBuilder(PrometheusProperties config) {u}(jƗ  (5fe15cf54fc1d5eb96dd302ea96a36036edaea95j,  Tprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Metric.javaj.  modifiedj&  K j'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetric.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -56,18 +56,6 @@ public M register() {
 
         public abstract M build();
 
-        /*
-        public M register() {
-            return register(PrometheusRegistry.defaultRegistry);
-        }
-
-        public M register(PrometheusRegistry registry) {
-            M metric = build();
-            registry.register(metric);
-            return metric;
-        }
-         */
-
         protected abstract B self();
     }
 }u}(jƗ  (f6116710de3705666fb952befa99fff297f8833bj,  eprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/MetricWithFixedMetadata.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FMetricWithFixedMetadata.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X3	  @@ -1,18 +1,22 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.model.snapshots.Unit;
 
+import java.util.Arrays;
 import java.util.List;
 
 public abstract class MetricWithFixedMetadata extends Metric {
 
     private final MetricMetadata metadata;
+    protected final String[] labelNames;
 
     protected MetricWithFixedMetadata(Builder<?, ?> builder) {
         super(builder);
         this.metadata = new MetricMetadata(makeName(builder.name, builder.unit), builder.help, builder.unit);
+        this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
     }
 
     protected MetricMetadata getMetadata() {
@@ -34,6 +38,7 @@ protected static abstract class Builder<B extends Builder<B, M>, M extends Metri
         protected String name;
         private Unit unit;
         private String help;
+        private String[] labelNames = new String[0];
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties properties) {
             super(illegalLabelNames, properties);
@@ -57,20 +62,23 @@ public B withHelp(String help) {
             return self();
         }
 
-        public abstract M build();
-
-        /*
-        public M register() {
-            return register(PrometheusRegistry.defaultRegistry);
+        public B withLabelNames(String... labelNames) {
+            for (String labelName : labelNames) {
+                if (!Labels.isValidLabelName(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name");
+                }
+                if (illegalLabelNames.contains(labelName)) {
+                    throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
+                }
+            }
+            this.labelNames = labelNames;
+            return self();
         }
 
-        public M register(PrometheusRegistry registry) {
-            M metric = build();
-            registry.register(metric);
-            return metric;
-        }
-         */
+        @Override
+        public abstract M build();
 
+        @Override
         protected abstract B self();
     }
 }u}(jƗ  (275ccaabb9ccb4735642f1511e8ff9642d9c53fcj,  Vprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StateSet.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStateSet.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -4,7 +4,7 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.StateSetSnapshot;
-import io.prometheus.metrics.core.observer.StateSetDataPoint;
+import io.prometheus.metrics.core.datapoints.StateSetDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -130,7 +130,7 @@ protected Builder self() {
     }
 
     public static Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Builder newBuilder(PrometheusProperties config) {u}(jƗ  (e7ca0635d952aaeb0417149199ce4b0e9d8e6773j,  \prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/StatefulMetric.javaj.  modifiedj&  Kj'  Kj0  K)j1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FStatefulMetric.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -4,7 +4,7 @@
 import io.prometheus.metrics.config.PrometheusProperties;
 import io.prometheus.metrics.model.snapshots.Labels;
 import io.prometheus.metrics.model.snapshots.MetricSnapshot;
-import io.prometheus.metrics.core.observer.DataPoint;
+import io.prometheus.metrics.core.datapoints.DataPoint;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -19,33 +19,27 @@
 /**
  * There are two kinds of metrics:
  * <ul>
- *     <li>A {@code StatefulMetric} actively maintains its current value, e.g. a stateful counter actively stores its current count.</li>
- *     <li>A {@code CallbackMetric} gets its value on demand when it is collected, e.g. a callback gauge representing the current heap size has
- *     a callback for calling JMX when it's collected.</li>
+ *     <li>A {@code StatefulMetric} actively maintains its current values, e.g. a stateful counter actively stores its current count.</li>
+ *     <li>A {@code CallbackMetric} gets its values on demand when it is collected, e.g. a callback gauge representing the current heap size.</li>
  * </ul>
  * The OpenTelemetry terminology for <i>stateful</i> is <i>synchronous</i> and the OpenTelemetry terminology for <i>callback</i> is <i>asynchronous</i>.
  * We are using our own terminology here because in Java <i>synchronous</i> and <i>asynchronous</i> usually refers to multi-threading,
  * but this has nothing to do with multi-threading.
  */
 abstract class StatefulMetric<D extends DataPoint, T extends D> extends MetricWithFixedMetadata {
-    private final String[] labelNames;
-    //private final Boolean exemplarsEnabled;
 
     /**
-     * Map from variableLabelValues to MetricData.
+     * Map label values to data points.
      */
     private final ConcurrentHashMap<List<String>, T> data = new ConcurrentHashMap<>();
 
     /**
-     * Shortcut to data.get(Collections.emptyList())
+     * Shortcut for data.get(Collections.emptyList())
      */
     private volatile T noLabels;
 
     protected StatefulMetric(Builder<?, ?> builder) {
         super(builder);
-        this.labelNames = Arrays.copyOf(builder.labelNames, builder.labelNames.length);
-        //this.exemplarsEnabled = builder.exemplarsEnabled;
-        //this.exemplarConfig = builder.exemplarConfig;
     }
 
     /**
@@ -61,8 +55,8 @@ public MetricSnapshot collect() {
         List<Labels> labels = new ArrayList<>(data.size());
         List<T> metricData = new ArrayList<>(data.size());
         for (Map.Entry<List<String>, T> entry : data.entrySet()) {
-            String[] variableLabelValues = entry.getKey().toArray(new String[labelNames.length]);
-            labels.add(constLabels.merge(labelNames, variableLabelValues));
+            String[] labelValues = entry.getKey().toArray(new String[labelNames.length]);
+            labels.add(constLabels.merge(labelNames, labelValues));
             metricData.add(entry.getValue());
         }
         return collect(labels, metricData);
@@ -126,26 +120,13 @@ protected <T> T getConfigProperty(MetricProperties[] properties, Function<Metric
     protected abstract boolean isExemplarsEnabled();
 
     static abstract class Builder<B extends Builder<B, M>, M extends StatefulMetric<?, ?>> extends MetricWithFixedMetadata.Builder<B, M> {
-        private String[] labelNames = new String[0];
+
         protected Boolean exemplarsEnabled;
 
         protected Builder(List<String> illegalLabelNames, PrometheusProperties config) {
             super(illegalLabelNames, config);
         }
 
-        public B withLabelNames(String... labelNames) {
-            for (String labelName : labelNames) {
-                if (!Labels.isValidLabelName(labelName)) {
-                    throw new IllegalArgumentException(labelName + ": illegal label name");
-                }
-                if (illegalLabelNames.contains(labelName)) {
-                    throw new IllegalArgumentException(labelName + ": illegal label name for this metric type");
-                }
-            }
-            this.labelNames = labelNames;
-            return self();
-        }
-
         public B withExemplars() {
             this.exemplarsEnabled = TRUE;
             return self();
@@ -156,12 +137,18 @@ public B withoutExemplars() {
             return self();
         }
 
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
         protected MetricProperties toProperties() {
             return MetricProperties.newBuilder()
                     .withExemplarsEnabled(exemplarsEnabled)
                     .build();
         }
 
+        /**
+         * Override if there are more properties than just exemplars enabled.
+         */
         public MetricProperties getDefaultProperties() {
             return MetricProperties.newBuilder()
                     .withExemplarsEnabled(true)u}(jƗ  (c291fa9440b654fb0fdeb751ba5c0bb6ac539fb7j,  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/Summary.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummary.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -7,7 +7,7 @@
 import io.prometheus.metrics.model.snapshots.Quantile;
 import io.prometheus.metrics.model.snapshots.Quantiles;
 import io.prometheus.metrics.model.snapshots.SummarySnapshot;
-import io.prometheus.metrics.core.observer.DistributionDataPoint;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -224,7 +224,7 @@ protected Builder self() {
     }
 
     public static Summary.Builder newBuilder() {
-        return new Builder(PrometheusProperties.getInstance());
+        return new Builder(PrometheusProperties.get());
     }
 
     public static Summary.Builder newBuilder(PrometheusProperties config) {u}(jƗ  (c9bdcfdfe9d0a497adf1d44e909971dd5b2f301fj,  aprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SummaryWithCallback.javaj.  addedj&  K]j'  K j0  K]j1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FSummaryWithCallback.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X$  @@ -0,0 +1,93 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.snapshots.Exemplars;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+
+/**
+ * Example:
+ * <pre>{@code
+ * double MILLISECONDS_PER_SECOND = 1E3;
+ *
+ * SummaryWithCallback.newBuilder()
+ *         .withName("jvm_gc_collection_seconds")
+ *         .withHelp("Time spent in a given JVM garbage collector in seconds.")
+ *         .withUnit(Unit.SECONDS)
+ *         .withLabelNames("gc")
+ *         .withCallback(callback -> {
+ *             for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
+ *                 callback.call(
+ *                         gc.getCollectionCount(),
+ *                         gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
+ *                         Quantiles.EMPTY,
+ *                         gc.getName()
+ *                 );
+ *             }
+ *         })
+ *         .register();
+ * }</pre>
+ */
+public class SummaryWithCallback extends CallbackMetric {
+
+    @FunctionalInterface
+    public interface Callback {
+        void call(long count, double sum, Quantiles quantiles, String... labelValues);
+    }
+
+    private final Consumer<Callback> callback;
+
+    private SummaryWithCallback(Builder builder) {
+        super(builder);
+        this.callback = builder.callback;
+        if (callback == null) {
+            throw new IllegalArgumentException("callback cannot be null");
+        }
+    }
+
+    @Override
+    public SummarySnapshot collect() {
+        List<SummarySnapshot.SummaryDataPointSnapshot> dataPoints = new ArrayList<>();
+        callback.accept((count, sum, quantiles, labelValues) -> {
+            dataPoints.add(new SummarySnapshot.SummaryDataPointSnapshot(count, sum, quantiles, makeLabels(labelValues), Exemplars.EMPTY, 0L));
+        });
+        return new SummarySnapshot(getMetadata(), dataPoints);
+    }
+
+    public static Builder newBuilder() {
+        return new Builder(PrometheusProperties.get());
+    }
+
+    public static Builder newBuilder(PrometheusProperties properties) {
+        return new Builder(properties);
+    }
+
+    public static class Builder extends CallbackMetric.Builder<SummaryWithCallback.Builder, SummaryWithCallback> {
+
+        private Consumer<Callback> callback;
+
+        public Builder withCallback(Consumer<Callback> callback) {
+            this.callback = callback;
+            return self();
+        }
+
+        private Builder(PrometheusProperties properties) {
+            super(Collections.singletonList("quantile"), properties);
+        }
+
+        @Override
+        public SummaryWithCallback build() {
+            return new SummaryWithCallback(this);
+        }
+
+        @Override
+        protected Builder self() {
+            return this;
+        }
+    }
+}u}(jƗ  (2094ba5915e52b3bf497cb79d778ab6cb6d95d7dj,  Uprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/TmpTest.javaj.  addedj&  Kfj'  K j0  Kfj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FTmpTest.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -0,0 +1,102 @@
+package io.prometheus.metrics.core.metrics;
+
+import io.prometheus.metrics.model.snapshots.CounterSnapshot;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.Labels;
+import io.prometheus.metrics.model.snapshots.Quantiles;
+import io.prometheus.metrics.model.snapshots.SummarySnapshot;
+import io.prometheus.metrics.model.snapshots.Unit;
+
+import java.lang.management.ClassLoadingMXBean;
+import java.lang.management.GarbageCollectorMXBean;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.util.Collections;
+import java.util.function.Consumer;
+
+public class TmpTest {
+
+    static Consumer<CounterWithCallback.Callback> messageCountCallback = callback -> {
+        double successfulMessageCount = getSuccessfulMessageCount();
+        double erroneousMessageCount = getErroneousMessageCount();
+        callback.call(successfulMessageCount, "success");
+        callback.call(erroneousMessageCount, "error");
+    };
+
+    private static double getSuccessfulMessageCount() {
+        return 2.0;
+    }
+
+    private static double getErroneousMessageCount() {
+        return 8.0;
+    }
+
+    public static void main(String[] args) {
+
+        /*
+
+        JVM_GC_COLLECTION_SECONDS,
+              "Time spent in a given JVM garbage collector in seconds.",
+              Collections.singletonList("gc"));
+         */
+        double MILLISECONDS_PER_SECOND = 1E3;
+
+        SummaryWithCallback gcSeconds = SummaryWithCallback.newBuilder()
+                .withName("jvm_gc_collection_seconds")
+                .withHelp("Time spent in a given JVM garbage collector in seconds.")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("gc")
+                .withCallback(callback -> {
+                    for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) {
+                        callback.call(
+                                gc.getCollectionCount(),
+                           gc.getCollectionTime() / MILLISECONDS_PER_SECOND,
+                                Quantiles.EMPTY,
+                                gc.getName()
+                        );
+                    }
+                })
+                .build();
+
+        Runtime.getRuntime().gc();
+        /*
+        GaugeMetricFamily used = new GaugeMetricFamily(
+                JVM_MEMORY_BYTES_USED,
+                "Used bytes of a given JVM memory area.",
+                Collections.singletonList("area"));
+        used.addMetric(Collections.singletonList("heap"), heapUsage.getUsed());
+        used.addMetric(Collections.singletonList("nonheap"), nonHeapUsage.getUsed());
+        sampleFamilies.add(used);
+         */
+
+        MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+
+        GaugeWithCallback memoryBytesUsed = GaugeWithCallback.newBuilder()
+                .withName("jvm_memory_bytes_used")
+                .withHelp("Used bytes of a given JVM memory area.")
+                .withUnit(Unit.BYTES)
+                .withLabelNames("area")
+                .withCallback(callback -> {
+                    callback.call(memoryBean.getHeapMemoryUsage().getUsed(), "heap");
+                    callback.call(memoryBean.getNonHeapMemoryUsage().getUsed(), "nonheap");
+                })
+                .build();
+
+        CounterWithCallback messageCount = CounterWithCallback.newBuilder()
+                .withName("messages_total")
+                .withLabelNames("status")
+                .withConstLabels(Labels.of("staus", "b"))
+                .withCallback(messageCountCallback)
+                .build();
+
+        ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
+        CounterWithCallback counter = CounterWithCallback.newBuilder()
+                .withName("classes_loaded_total")
+                .withCallback(callback -> callback.call(classLoadingMXBean.getLoadedClassCount()))
+                .build();
+        CounterSnapshot sn = messageCount.collect();
+        GaugeSnapshot sn2 = memoryBytesUsed.collect();
+        SummarySnapshot sn3 = gcSeconds.collect();
+        System.out.println(sn2);
+    }
+}u}(jƗ  (915174abc8eaecbf04b33d0e2b9987631368e265j,  Xprometheus-metrics-core/src/main/java/io/prometheus/metrics/core/observer/DataPoint.javaj.  removedj&  K j'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.javaj3  https://github.com/prometheus/client_java/raw/7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fobserver%2FDataPoint.java?ref=7ca4e41e9877d110ce1a66f4cb81f9c2b6a285a1j7  `@@ -1,4 +0,0 @@
-package io.prometheus.metrics.core.observer;
-
-public interface DataPoint {
-}u}(jƗ  (4c437281ec73d4eac29e975d8eb7535918ff37d0j,  Wprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/GaugeTest.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FGaugeTest.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  Xo  @@ -6,7 +6,7 @@
 import io.prometheus.metrics.model.snapshots.Exemplar;
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.Timer;
+import io.prometheus.metrics.core.datapoints.Timer;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;u}(jƗ  (4243601cdbae6a635d1ecb09cc5884d7ae034adbj,  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -11,7 +11,7 @@
 import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.model.snapshots.Labels;
-import io.prometheus.metrics.core.observer.DistributionDataPoint;
+import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;u}(jƗ  (5536f01e9ad09822a4a631ba235a552fbb238d3bj,  oprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DistributionDataPointSnapshot.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FDistributionDataPointSnapshot.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -17,10 +17,7 @@ protected DistributionDataPointSnapshot(long count, double sum, Exemplars exempl
         super(labels, createdTimestampMillis, scrapeTimestampMillis);
         this.count = count;
         this.sum = sum;
-        this.exemplars = exemplars;
-        if (exemplars == null) {
-            throw new NullPointerException("Exemplars cannot be null. Use Exemplars.EMPTY if there are no Exemplars.");
-        }
+        this.exemplars = exemplars == null ? Exemplars.EMPTY : exemplars;
         validate();
     }
 u}(jƗ  (8f9d36ea43c443a1ed5e36c88c8352b0493496daj,  Xprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Labels.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.javaj5  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FLabels.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -213,7 +213,7 @@ public Labels merge(Labels other) {
                 values[thisPos + otherPos] = other.values[otherPos];
                 otherPos++;
             } else {
-                throw new IllegalArgumentException("duplicate label name " + this.names[thisPos]);
+                throw new IllegalArgumentException("Duplicate label name: '" + this.names[thisPos] + "'.");
             }
         }
         return new Labels(names, values);u}(jƗ  (b5402f30ee042a51267ee047d7f26455643add63j,  :tmp_example/src/main/java/com/example/BenchmarkRunner.javaj.  modifiedj&  Kj'  K j0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.javaj5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FBenchmarkRunner.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  XJ  @@ -1,6 +1,30 @@
 package com.example;
 
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.api.metrics.DoubleHistogram;
+import io.opentelemetry.api.metrics.LongCounter;
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
+import io.opentelemetry.context.propagation.ContextPropagators;
+import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.metrics.Aggregation;
+import io.opentelemetry.sdk.metrics.InstrumentSelector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.View;
+import io.opentelemetry.sdk.resources.Resource;
+import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
+import io.prometheus.metrics.core.metrics.Counter;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Threads;
+
 import java.util.Random;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.LongAdder;
 
 //@State(Scope.Benchmark)
 public class BenchmarkRunner {u}(jƗ  (1b6bf2a3909909213477645c81e71a30430d3335j,  /tmp_example/src/main/java/com/example/Main.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.javaj5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fcom%2Fexample%2FMain.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X6  @@ -1,7 +1,7 @@
 package com.example;
 
 import io.prometheus.metrics.core.metrics.Counter;
-import io.prometheus.metrics.core.observer.CounterDataPoint;
+import io.prometheus.metrics.core.datapoints.CounterDataPoint;
 import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 
 import java.io.IOException;u}(jƗ  (50d6052395c3f7576a55e882aed0609afc1b16a6j,  Stmp_example/src/main/java/io/prometheus/metrics/exporter/httpserver/HTTPServer.javaj.  modifiedj&  Kj'  Kj0  Kj1  https://github.com/prometheus/client_java/blob/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj3  https://github.com/prometheus/client_java/raw/6e1666e979c7e4ad69dd8ae1c10881172e3110d9/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.javaj5  https://api.github.com/repos/prometheus/client_java/contents/tmp_example%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fhttpserver%2FHTTPServer.java?ref=6e1666e979c7e4ad69dd8ae1c10881172e3110d9j7  X  @@ -221,7 +221,7 @@ private int findPort() {
             if (port != null) {
                 return port;
             }
-            HttpServerProperties defaultProperties = PrometheusProperties.getInstance().getHttpServerConfig();
+            HttpServerProperties defaultProperties = PrometheusProperties.get().getHttpServerConfig();
             if (defaultProperties != null && defaultProperties.getPort() != null) {
                 return defaultProperties.getPort();
             }ueu(b6c123bfce7a110d4e1d4be2fab092153df2d63f}(sha(b6c123bfce7a110d4e1d4be2fab092153df2d63fnode_idEC_kwDOAHoJt9oAKGI2YzEyM2JmY2U3YTExMGQ0ZTFkNGJlMmZhYjA5MjE1M2RmMmQ2M2Ycommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-10T21:59:31Zu	committer}(j1  Fabian Stäberj3  fabian@fstab.dej5  2023-07-10T21:59:31Zumessagejavax -> jakartatree}(j)  (c9dc16d5edc3f6a6f6e85a612ceac7ebdb3bfb8curlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c9dc16d5edc3f6a6f6e85a612ceac7ebdb3bfb8cujA  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b6c123bfce7a110d4e1d4be2fab092153df2d63f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujA  dhttps://api.github.com/repos/prometheus/client_java/commits/b6c123bfce7a110d4e1d4be2fab092153df2d63fhtml_urlYhttps://github.com/prometheus/client_java/commit/b6c123bfce7a110d4e1d4be2fab092153df2d63fcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b6c123bfce7a110d4e1d4be2fab092153df2d63f/commentsj/  }(loginfstabidJ' j+  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jA  "https://api.github.com/users/fstabjM  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj7  }(jR  fstabjT  J' j+  MDQ6VXNlcjMzMDUzNQ==jV  2https://avatars.githubusercontent.com/u/330535?v=4jX  h3jA  "https://api.github.com/users/fstabjM  https://github.com/fstabj[  ,https://api.github.com/users/fstab/followersj]  9https://api.github.com/users/fstab/following{/other_user}j_  2https://api.github.com/users/fstab/gists{/gist_id}ja  9https://api.github.com/users/fstab/starred{/owner}{/repo}jc  0https://api.github.com/users/fstab/subscriptionsje  'https://api.github.com/users/fstab/orgsjg  (https://api.github.com/users/fstab/reposji  3https://api.github.com/users/fstab/events{/privacy}jk  2https://api.github.com/users/fstab/received_eventsjm  Userjo  uparents]}(j)  (f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56jA  dhttps://api.github.com/repos/prometheus/client_java/commits/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56jM  Yhttps://github.com/prometheus/client_java/commit/f4f2fa4769c876bab1893bbf3fdf9e3c4e62ee56uastats}(totalK	additionsK	deletionsKufiles]}(j)  (1f6b39f4090da5c9aa915eec104bb67fd182c3edfilenameprometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.javastatusrenamedj  Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/b6c123bfce7a110d4e1d4be2fab092153df2d63f/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javaraw_urlhttps://github.com/prometheus/client_java/raw/b6c123bfce7a110d4e1d4be2fab092153df2d63f/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.javacontents_urlX  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjakarta%2FPrometheusMetricsServlet.java?ref=b6c123bfce7a110d4e1d4be2fab092153df2d63fpatch@@ -1,4 +1,4 @@
-package io.prometheus.metrics.exporter.servlet.javax;
+package io.prometheus.metrics.exporter.servlet.jakarta;
 
 import io.prometheus.metrics.config.ExporterFilterProperties;
 import io.prometheus.metrics.config.PrometheusProperties;previous_filenameprometheus-metrics-exporter-servlet-jakarta/src/main/java/io/prometheus/metrics/exporter/servlet/javax/PrometheusMetricsServlet.javauau(d2d3cf48a5c04bad61d793c469cd37d483d12618}(sha(d2d3cf48a5c04bad61d793c469cd37d483d12618node_idEC_kwDOAHoJt9oAKGQyZDNjZjQ4YTVjMDRiYWQ2MWQ3OTNjNDY5Y2QzN2Q0ODNkMTI2MTgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-04T21:49:02Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-04T21:49:02Zumessage	Fix teststree}(j  (9037c9c2512fc9f95a97d13b0b4ea4b40d182384urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/9037c9c2512fc9f95a97d13b0b4ea4b40d182384uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/d2d3cf48a5c04bad61d793c469cd37d483d12618
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/d2d3cf48a5c04bad61d793c469cd37d483d12618html_urlYhttps://github.com/prometheus/client_java/commit/d2d3cf48a5c04bad61d793c469cd37d483d12618comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/d2d3cf48a5c04bad61d793c469cd37d483d12618/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabję  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(jə  fstabj˙  J' j  MDQ6VXNlcjMzMDUzNQ==j͙  2https://avatars.githubusercontent.com/u/330535?v=4jϙ  h3j  "https://api.github.com/users/fstabję  https://github.com/fstabjҙ  ,https://api.github.com/users/fstab/followersjԙ  9https://api.github.com/users/fstab/following{/other_user}j֙  2https://api.github.com/users/fstab/gists{/gist_id}jؙ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jڙ  0https://api.github.com/users/fstab/subscriptionsjܙ  'https://api.github.com/users/fstab/orgsjޙ  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (41380512582ddd13f695f5e00db5683ab1e29c0aj  dhttps://api.github.com/repos/prometheus/client_java/commits/41380512582ddd13f695f5e00db5683ab1e29c0aję  Yhttps://github.com/prometheus/client_java/commit/41380512582ddd13f695f5e00db5683ab1e29c0auastats}(totalK	additionsK	deletionsKufiles](}(j  (747356ad322b0d1d9ca064b17cabbf034df89590filenamebprometheus-metrics-config/src/test/java/io/prometheus/metrics/config/PrometheusPropertiesTest.javastatusmodifiedj   Kj  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FPrometheusPropertiesTest.java?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618patchX  @@ -16,13 +16,14 @@ public void testPrometheusConfig() {
         Assert.assertEquals(4, result.getMetricProperties("http_duration_seconds").getHistogramClassicUpperBounds().length);
     }
 
-    @Test(expected=PrometheusPropertiesException.class) // can't configure empty histogram classic bounds
+    @Test
     public void testEmptyUpperBounds() throws IOException {
         Properties properties = new Properties();
         try (InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("emptyUpperBounds.properties")) {
             properties.load(stream);
         }
         Assert.assertEquals(1, properties.size());
         MetricProperties.load("io.prometheus.metrics", properties);
+        Assert.assertEquals(0, properties.size());
     }
 }u}(j  (8a504587aade42b18c2b71d7889650c1195f58c1j  Bprometheus-metrics-config/src/test/resources/prometheus.propertiesj  modifiedj   Kj  Kj
  Kj  https://github.com/prometheus/client_java/blob/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj
  https://github.com/prometheus/client_java/raw/d2d3cf48a5c04bad61d793c469cd37d483d12618/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.propertiesj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Ftest%2Fresources%2Fprometheus.properties?ref=d2d3cf48a5c04bad61d793c469cd37d483d12618j  X  @@ -7,7 +7,7 @@ io.prometheus.metrics.exemplarsEnabled = true
 io.prometheus.metrics.http_duration_seconds.exemplarsEnabled = true
 
 io.prometheus.expositionFormat.includeCreatedTimestamps = false
-io.prometheus.expositionFormat.exemplarsForAllMetricTypes = true
+# io.prometheus.expositionFormat.exemplarsForAllMetricTypes = true
 
 io.prometheus.exemplars.minRetentionPeriodSeconds = 30
 io.prometheus.exemplars.maxRetentionPeriodSeconds = 30ueu(9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d}(sha(9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dnode_idEC_kwDOAHoJt9oAKDlkYWE1ZTQzZmNhNGY3MTVmMWRkOGJlZjI5OGU4ZGRiNDNjNmJhMmQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T07:49:04Zu	committer}(j%  Fabian Stäberj'  fabian@fstab.dej)  2023-08-27T07:49:04Zumessage,Add JavaDoc to OpenTelemetryExporter.Buildertree}(j  (aec3e52f6330585a0de7f5af2cee10d4fdb83643urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/aec3e52f6330585a0de7f5af2cee10d4fdb83643uj5  hhttps://api.github.com/repos/prometheus/client_java/git/commits/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj5  dhttps://api.github.com/repos/prometheus/client_java/commits/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dhtml_urlYhttps://github.com/prometheus/client_java/commit/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d/commentsj#  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j5  "https://api.github.com/users/fstabjA  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj+  }(jF  fstabjH  J' j  MDQ6VXNlcjMzMDUzNQ==jJ  2https://avatars.githubusercontent.com/u/330535?v=4jL  h3j5  "https://api.github.com/users/fstabjA  https://github.com/fstabjO  ,https://api.github.com/users/fstab/followersjQ  9https://api.github.com/users/fstab/following{/other_user}jS  2https://api.github.com/users/fstab/gists{/gist_id}jU  9https://api.github.com/users/fstab/starred{/owner}{/repo}jW  0https://api.github.com/users/fstab/subscriptionsjY  'https://api.github.com/users/fstab/orgsj[  (https://api.github.com/users/fstab/reposj]  3https://api.github.com/users/fstab/events{/privacy}j_  2https://api.github.com/users/fstab/received_eventsja  Userjc  uparents]}(j  (b02fa28fb1dfa9b43738f659694c8366e7408d04j5  dhttps://api.github.com/repos/prometheus/client_java/commits/b02fa28fb1dfa9b43738f659694c8366e7408d04jA  Yhttps://github.com/prometheus/client_java/commit/b02fa28fb1dfa9b43738f659694c8366e7408d04uastats}(totalKf	additionsKU	deletionsKufiles](}(j  (66ed3633b53aa109119a31abbd0e7ed1828a1eb4filenameiprometheus-metrics-config/src/main/java/io/prometheus/metrics/config/ExporterOpenTelemetryProperties.javastatusmodifiedj}  Kj~  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javaraw_urlhttps://github.com/prometheus/client_java/raw/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fconfig%2FExporterOpenTelemetryProperties.java?ref=9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dpatchXG  @@ -3,6 +3,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
+// TODO: JavaDoc is currently only in OpenTelemetryExporter.Builder. Look there for reference.
 public class ExporterOpenTelemetryProperties {
 
     // See https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.mdu}(j  (db501ea8207983ae1da1af03101f657495325361j  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javaj  modifiedj}  KTj~  Kj  Kej  https://github.com/prometheus/client_java/blob/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://github.com/prometheus/client_java/raw/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2d/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dj  X5  @@ -94,6 +94,13 @@ public Builder withRegistry(PrometheusRegistry registry) {
             return this;
         }
 
+        /**
+         * Specifies the OTLP transport protocol to be used when exporting metrics.
+         * <p>
+         * Supported values are {@code "grpc"} and {@code "http/protobuf"}. Default is {@code "grpc"}.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol">OTEL_EXPORTER_OTLP_PROTOCOL</a>.
+         */
         public Builder withProtocol(String protocol) {
             if (!protocol.equals("grpc") && !protocol.equals("http/protobuf")) {
                 throw new IllegalArgumentException(protocol + ": Unsupported protocol. Expecting grpc or http/protobuf");
@@ -102,16 +109,40 @@ public Builder withProtocol(String protocol) {
             return this;
         }
 
+        /**
+         * The OTLP endpoint to send metric data to.
+         * <p>
+         * The default depends on the protocol:
+         * <ul>
+         * <li>{@code "grpc"}: {@code "http://localhost:4317"}</li>
+         * <li>{@code "http/protobuf"}: {@code "http://localhost:4318/v1/metrics"}</li>
+         * </ul>
+         * If the protocol is {@code "http/protobuf"} and the endpoint does not have the {@code "/v1/metrics"} suffix,
+         * the {@code "/v1/metrics"} suffix will automatically be appended.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_endpoint">OTEL_EXPORTER_OTLP_METRICS_ENDPOINT</a>.
+         */
         public Builder withEndpoint(String endpoint) {
             this.endpoint = endpoint;
             return this;
         }
 
+        /**
+         * Add an HTTP header to be applied to outgoing requests.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers">OTEL_EXPORTER_OTLP_HEADERS</a>.
+         */
         public Builder addHeader(String name, String value) {
             this.headers.put(name, value);
             return this;
         }
 
+        /**
+         * The interval between the start of two export attempts. Default is 60000.
+         * <p>
+         * Like OpenTelemetry's <a href="https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#periodic-metric-reader">OTEL_METRIC_EXPORT_INTERVAL</a>,
+         * but in seconds rather than milliseconds.
+         */
         public Builder withIntervalSeconds(int intervalSeconds) {
             if (intervalSeconds <= 0) {
                 throw new IllegalStateException(intervalSeconds + ": expecting a push interval > 0s");
@@ -120,6 +151,12 @@ public Builder withIntervalSeconds(int intervalSeconds) {
             return this;
         }
 
+        /**
+         * The timeout for outgoing requests. Default is 10.
+         * <p>
+         * Like OpenTelemetry's <a href="https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_metrics_timeout">OTEL_EXPORTER_OTLP_METRICS_TIMEOUT</a>,
+         * but in seconds rather than milliseconds.
+         */
         public Builder withTimeoutSeconds(int timeoutSeconds) {
             if (timeoutSeconds <= 0) {
                 throw new IllegalStateException(timeoutSeconds + ": expecting a push interval > 0s");
@@ -128,26 +165,53 @@ public Builder withTimeoutSeconds(int timeoutSeconds) {
             return this;
         }
 
+        /**
+         * The {@code service.name} resource attribute.
+         * <p>
+         * If not explicitly specified, {@code client_java} will try to initialize it with a reasonable default, like the JAR file name.
+         * <p>
+         * See {@code service.name} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service">Resource Semantic Conventions</a>.
+         */
         public Builder withServiceName(String serviceName) {
             this.serviceName = serviceName;
             return this;
         }
 
+        /**
+         * The {@code service.namespace} resource attribute.
+         * <p>
+         * See {@code service.namespace} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
         public Builder withServiceNamespace(String serviceNamespace) {
             this.serviceNamespace = serviceNamespace;
             return this;
         }
 
+        /**
+         * The {@code service.instance.id} resource attribute.
+         * <p>
+         * See {@code service.instance.id} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
         public Builder withServiceInstanceId(String serviceInstanceId) {
             this.serviceInstanceId = serviceInstanceId;
             return this;
         }
 
+        /**
+         * The {@code service.version} resource attribute.
+         * <p>
+         * See {@code service.version} in OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/resource/semantic_conventions/#service-experimental">Resource Semantic Conventions</a>.
+         */
         public Builder withServiceVersion(String serviceVersion) {
             this.serviceVersion = serviceVersion;
             return this;
         }
 
+        /**
+         * Add a resource attribute.
+         * <p>
+         * See OpenTelemetry's <a href="https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration">OTEL_RESOURCE_ATTRIBUTES</a>.
+         */
         public Builder addResourceAttribute(String name, String value) {
             this.resourceAttributes.put(name, value);
             return this;
@@ -163,7 +227,7 @@ public OpenTelemetryExporter buildAndStart() {
 
     private static class ConfigHelper {
 
-        static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String protocol = config.getProtocol();
             if (protocol != null) {
                 return protocol;
@@ -181,7 +245,7 @@ static String getProtocol(OpenTelemetryExporter.Builder builder, ExporterOpenTel
             return "grpc";
         }
 
-        static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String endpoint = config.getEndpoint();
             if (endpoint == null) {
                 endpoint = getString("otel.exporter.otlp.metrics.endpoint");
@@ -214,7 +278,7 @@ static String getEndpoint(OpenTelemetryExporter.Builder builder, ExporterOpenTel
             }
         }
 
-        static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             Map<String, String> headers = config.getHeaders();
             if (!headers.isEmpty()) {
                 return headers;
@@ -229,7 +293,7 @@ static Map<String, String> getHeaders(OpenTelemetryExporter.Builder builder, Exp
             return new HashMap<>();
         }
 
-        static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             Integer intervalSeconds = config.getIntervalSeconds();
             if (intervalSeconds != null) {
                 return intervalSeconds;
@@ -244,22 +308,25 @@ static int getIntervalSeconds(OpenTelemetryExporter.Builder builder, ExporterOpe
             return 60;
         }
 
-        static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static int getTimeoutSeconds(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             Integer timeoutSeconds = config.getTimeoutSeconds();
             if (timeoutSeconds != null) {
                 return timeoutSeconds;
             }
-            timeoutSeconds = getPositiveInteger("otel.exporter.otlp.timeout");
-            if (timeoutSeconds != null) {
-                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutSeconds);
+            Integer timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.metrics.timeout");
+            if (timeoutMilliseconds == null) {
+                timeoutMilliseconds = getPositiveInteger("otel.exporter.otlp.timeout");
+            }
+            if (timeoutMilliseconds != null) {
+                return (int) TimeUnit.MILLISECONDS.toSeconds(timeoutMilliseconds);
             }
             if (builder.timeoutSeconds != null) {
                 return builder.timeoutSeconds;
             }
             return 10;
         }
 
-        static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String serviceName = config.getServiceName();
             if (serviceName != null) {
                 return serviceName;
@@ -274,7 +341,7 @@ static String getServiceName(OpenTelemetryExporter.Builder builder, ExporterOpen
             return null;
         }
 
-        static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getServiceNamespace(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String serviceNamespace = config.getServiceNamespace();
             if (serviceNamespace != null) {
                 return serviceNamespace;
@@ -285,7 +352,7 @@ static String getServiceNamespace(OpenTelemetryExporter.Builder builder, Exporte
             return null;
         }
 
-        static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String serviceInstanceId = config.getServiceInstanceId();
             if (serviceInstanceId != null) {
                 return serviceInstanceId;
@@ -296,7 +363,7 @@ static String getServiceInstanceId(OpenTelemetryExporter.Builder builder, Export
             return null;
         }
 
-        static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             String serviceVersion = config.getServiceVersion();
             if (serviceVersion != null) {
                 return serviceVersion;
@@ -307,7 +374,7 @@ static String getServiceVersion(OpenTelemetryExporter.Builder builder, ExporterO
             return null;
         }
 
-        static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
+        private static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder builder, ExporterOpenTelemetryProperties config) {
             Map<String, String> resourceAttributes = config.getResourceAttributes();
             if (!resourceAttributes.isEmpty()) {
                 return resourceAttributes;
@@ -322,7 +389,7 @@ static Map<String, String> getResourceAttributes(OpenTelemetryExporter.Builder b
             return new HashMap<>();
         }
 
-        static String getString(String otelPropertyName) {
+        private static String getString(String otelPropertyName) {
             String otelEnvVarName = otelPropertyName.replace(".", "_").replace("-", "_").toUpperCase();
             if (System.getenv(otelEnvVarName) != null) {
                 return System.getenv(otelEnvVarName);
@@ -333,7 +400,7 @@ static String getString(String otelPropertyName) {
             return null;
         }
 
-        static Integer getInteger(String otelPropertyName) {
+        private static Integer getInteger(String otelPropertyName) {
             String result = getString(otelPropertyName);
             if (result == null) {
                 return null;
@@ -346,7 +413,7 @@ static Integer getInteger(String otelPropertyName) {
             }
         }
 
-        static Integer getPositiveInteger(String otelPropertyName) {
+        private static Integer getPositiveInteger(String otelPropertyName) {
             Integer result = getInteger(otelPropertyName);
             if (result == null) {
                 return null;
@@ -357,7 +424,7 @@ static Integer getPositiveInteger(String otelPropertyName) {
             return result;
         }
 
-        static Map<String, String> getMap(String otelPropertyName) {
+        private static Map<String, String> getMap(String otelPropertyName) {
             Map<String, String> result = new HashMap<>();
             String property = getString(otelPropertyName);
             if (property != null) {ueu      (02ccb6f0e9b916ae198ea0f7d576e44416497bbc}(sha(02ccb6f0e9b916ae198ea0f7d576e44416497bbcnode_idEC_kwDOAHoJt9oAKDAyY2NiNmYwZTliOTE2YWUxOThlYTBmN2Q1NzZlNDQ0MTY0OTdiYmMcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-11T12:39:53Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-07-11T12:39:53Zumessage!Make sure Unit names are not nulltree}(j  (02768b55826f4b9669c336ffd7e87e613cfc69e6urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/02768b55826f4b9669c336ffd7e87e613cfc69e6uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/02ccb6f0e9b916ae198ea0f7d576e44416497bbc
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/02ccb6f0e9b916ae198ea0f7d576e44416497bbchtml_urlYhttps://github.com/prometheus/client_java/commit/02ccb6f0e9b916ae198ea0f7d576e44416497bbccomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/02ccb6f0e9b916ae198ea0f7d576e44416497bbc/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(jÚ  fstabjŚ  J' j  MDQ6VXNlcjMzMDUzNQ==jǚ  2https://avatars.githubusercontent.com/u/330535?v=4jɚ  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj̚  ,https://api.github.com/users/fstab/followersjΚ  9https://api.github.com/users/fstab/following{/other_user}jК  2https://api.github.com/users/fstab/gists{/gist_id}jҚ  9https://api.github.com/users/fstab/starred{/owner}{/repo}jԚ  0https://api.github.com/users/fstab/subscriptionsj֚  'https://api.github.com/users/fstab/orgsjؚ  (https://api.github.com/users/fstab/reposjښ  3https://api.github.com/users/fstab/events{/privacy}jܚ  2https://api.github.com/users/fstab/received_eventsjޚ  Userj  uparents]}(j  (5a61cade730e1b0e262cb5fd42637dd4fe4e3261j  dhttps://api.github.com/repos/prometheus/client_java/commits/5a61cade730e1b0e262cb5fd42637dd4fe4e3261j  Yhttps://github.com/prometheus/client_java/commit/5a61cade730e1b0e262cb5fd42637dd4fe4e3261uastats}(totalK	additionsK	deletionsK ufiles]}(j  (232cd914311299356ae719ea034766531c512b90filenameVprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Unit.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/02ccb6f0e9b916ae198ea0f7d576e44416497bbc/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javaraw_urlhttps://github.com/prometheus/client_java/raw/02ccb6f0e9b916ae198ea0f7d576e44416497bbc/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FUnit.java?ref=02ccb6f0e9b916ae198ea0f7d576e44416497bbcpatchXf  @@ -24,6 +24,12 @@ public class Unit {
 
     public Unit(String name) {
         this.name = name;
+        if (name == null) {
+            throw new NullPointerException("Unit name cannot be null.");
+        }
+        if (name.isEmpty()) {
+            throw new IllegalArgumentException("Unit name cannot be empty.");
+        }
     }
 
     @Overrideuau(9a924ca905fb4ba10b028f3d8dae9d9e161f8824}(sha(9a924ca905fb4ba10b028f3d8dae9d9e161f8824node_idEC_kwDOAHoJt9oAKDlhOTI0Y2E5MDVmYjRiYTEwYjAyOGYzZDhkYWU5ZDllMTYxZjg4MjQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:24:36Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-12T20:24:36Zumessage#Move core expositionformats packagetree}(j  (1d5055cd473bc128a002d94cce1b766e99c4fb06urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1d5055cd473bc128a002d94cce1b766e99c4fb06uj'  hhttps://api.github.com/repos/prometheus/client_java/git/commits/9a924ca905fb4ba10b028f3d8dae9d9e161f8824
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj'  dhttps://api.github.com/repos/prometheus/client_java/commits/9a924ca905fb4ba10b028f3d8dae9d9e161f8824html_urlYhttps://github.com/prometheus/client_java/commit/9a924ca905fb4ba10b028f3d8dae9d9e161f8824comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j'  "https://api.github.com/users/fstabj3  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j8  fstabj:  J' j  MDQ6VXNlcjMzMDUzNQ==j<  2https://avatars.githubusercontent.com/u/330535?v=4j>  h3j'  "https://api.github.com/users/fstabj3  https://github.com/fstabjA  ,https://api.github.com/users/fstab/followersjC  9https://api.github.com/users/fstab/following{/other_user}jE  2https://api.github.com/users/fstab/gists{/gist_id}jG  9https://api.github.com/users/fstab/starred{/owner}{/repo}jI  0https://api.github.com/users/fstab/subscriptionsjK  'https://api.github.com/users/fstab/orgsjM  (https://api.github.com/users/fstab/reposjO  3https://api.github.com/users/fstab/events{/privacy}jQ  2https://api.github.com/users/fstab/received_eventsjS  UserjU  uparents]}(j  (1d01ba565e2e591629716c995bbbdbda55ac1fa4j'  dhttps://api.github.com/repos/prometheus/client_java/commits/1d01ba565e2e591629716c995bbbdbda55ac1fa4j3  Yhttps://github.com/prometheus/client_java/commit/1d01ba565e2e591629716c995bbbdbda55ac1fa4uastats}(totalK*	additionsK	deletionsKufiles](}(j  (1552c019a135ad4aa90936878a5217cd5010f933filenameYprometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.javastatusmodifiedjo  Kjp  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FCounterTest.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824patchX  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
-import io.prometheus.expositionformat.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;u}(j  (7d4d1e95a6a1db65a4115926efb5664d0308276fju  [prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.javajw  modifiedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fcore%2Fmetrics%2FHistogramTest.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  X  @@ -1,7 +1,7 @@
 package io.prometheus.metrics.core.metrics;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
-import io.prometheus.expositionformat.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
 import io.prometheus.metrics.exemplars.tracer.common.SpanContext;u}(j  (23dfdf7a7b4c9a841d6dc604d0a781f851c91815ju  |prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.javajw  renamedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FOpenMetricsTextFormatWriter.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  X  @@ -1,4 +1,4 @@
-package io.prometheus.expositionformat;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
 import io.prometheus.metrics.model.CounterSnapshot;
@@ -24,11 +24,11 @@
 import java.nio.charset.StandardCharsets;
 import java.util.List;
 
-import static io.prometheus.expositionformat.TextFormatUtil.writeDouble;
-import static io.prometheus.expositionformat.TextFormatUtil.writeEscapedLabelValue;
-import static io.prometheus.expositionformat.TextFormatUtil.writeLabels;
-import static io.prometheus.expositionformat.TextFormatUtil.writeLong;
-import static io.prometheus.expositionformat.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
 
 /**
  * Write the OpenMetrics text format as defined on <a href="https://openmetrics.io/">https://openmetrics.io</a>.previous_filenamesprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/OpenMetricsTextFormatWriter.javau}(j  (dd8bbc39366e7f9f1d5a046777bf1dd31be86550ju  yprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriter.javajw  renamedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusProtobufWriter.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  X=  @@ -1,4 +1,4 @@
-package io.prometheus.expositionformat;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import static io.prometheus.expositionformat.ProtobufUtil.timestampFromMillis;
+import static io.prometheus.metrics.expositionformats.ProtobufUtil.timestampFromMillis;
 
 /**
  * Write the Prometheus protobuf format as defined inj  pprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusProtobufWriter.javau}(j  (321a78165354ea6f4760d1fa3582c3c8f4a2967eju  {prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/PrometheusTextFormatWriter.javajw  renamedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FPrometheusTextFormatWriter.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  X  @@ -1,4 +1,4 @@
-package io.prometheus.expositionformat;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.ClassicHistogramBuckets;
@@ -21,11 +21,11 @@
 import java.io.Writer;
 import java.nio.charset.StandardCharsets;
 
-import static io.prometheus.expositionformat.TextFormatUtil.writeDouble;
-import static io.prometheus.expositionformat.TextFormatUtil.writeEscapedLabelValue;
-import static io.prometheus.expositionformat.TextFormatUtil.writeLabels;
-import static io.prometheus.expositionformat.TextFormatUtil.writeLong;
-import static io.prometheus.expositionformat.TextFormatUtil.writeTimestamp;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeDouble;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeEscapedLabelValue;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLabels;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeLong;
+import static io.prometheus.metrics.expositionformats.TextFormatUtil.writeTimestamp;
 
 /**
  * Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your Web browser.j  rprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/PrometheusTextFormatWriter.javau}(j  (24d2c1acc05eec683afc5258517b36c6d526e18eju  mprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/ProtobufUtil.javajw  renamedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FProtobufUtil.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  @@ -1,4 +1,4 @@
-package io.prometheus.expositionformat;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.com_google_protobuf_3_21_7.Timestamp;
 j  dprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/ProtobufUtil.javau}(j  (4b8c06e16d3eb3efd3334eeeedc397461b74dc79ju  oprometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/TextFormatUtil.javajw  renamedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FTextFormatUtil.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  @@ -1,4 +1,4 @@
-package io.prometheus.expositionformat;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.metrics.model.Labels;
 j  fprometheus-metrics-exposition-formats/src/main/java/io/prometheus/expositionformat/TextFormatUtil.javau}(j  (ecf2bb0d6f0888db01bc6a11086e6ae941f98d8eju  rprometheus-metrics-exposition-formats/src/test/java/io/prometheus/expositionformat/text/ExpositionFormatsTest.javajw  modifiedjo  Kjp  Kjy  Kjz  https://github.com/prometheus/client_java/blob/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj|  https://github.com/prometheus/client_java/raw/9a924ca905fb4ba10b028f3d8dae9d9e161f8824/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.javaj~  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fexpositionformat%2Ftext%2FExpositionFormatsTest.java?ref=9a924ca905fb4ba10b028f3d8dae9d9e161f8824j  X  @@ -1,9 +1,9 @@
 package io.prometheus.expositionformat.text;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
-import io.prometheus.expositionformat.OpenMetricsTextFormatWriter;
-import io.prometheus.expositionformat.PrometheusProtobufWriter;
-import io.prometheus.expositionformat.PrometheusTextFormatWriter;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
+import io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter;
 import io.prometheus.expositionformat.protobuf.generated.com_google_protobuf_3_21_7.Metrics;
 import io.prometheus.metrics.model.CounterSnapshot;
 import io.prometheus.metrics.model.CounterSnapshot.CounterData;ueu(b987f508316e4b4ec898dee75c3c577656619c4d}(sha(b987f508316e4b4ec898dee75c3c577656619c4dnode_idEC_kwDOAHoJt9oAKGI5ODdmNTA4MzE2ZTRiNGVjODk4ZGVlNzVjM2M1Nzc2NTY2MTljNGQcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-30T21:15:16Zu	committer}(jʛ  Fabian Stäberj̛  fabian@fstab.dejΛ  2023-08-30T21:15:16ZumessageAdd JVM metricstree}(j  (c3151ae8a311af6a28652be2ee7648af86426065urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c3151ae8a311af6a28652be2ee7648af86426065ujڛ  hhttps://api.github.com/repos/prometheus/client_java/git/commits/b987f508316e4b4ec898dee75c3c577656619c4d
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujڛ  dhttps://api.github.com/repos/prometheus/client_java/commits/b987f508316e4b4ec898dee75c3c577656619c4dhtml_urlYhttps://github.com/prometheus/client_java/commit/b987f508316e4b4ec898dee75c3c577656619c4dcomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/b987f508316e4b4ec898dee75c3c577656619c4d/commentsjț  }(loginfstabidJ' jě  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jڛ  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujЛ  }(j  fstabj  J' jě  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jڛ  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj   (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(j  (f9a42e604e59385dd7e44554fae6663663c404bfjڛ  dhttps://api.github.com/repos/prometheus/client_java/commits/f9a42e604e59385dd7e44554fae6663663c404bfj  Yhttps://github.com/prometheus/client_java/commit/f9a42e604e59385dd7e44554fae6663663c404bfuastats}(totalM	additionsM	deletionsK ufiles](}(j  (18be07c93093f8243d5ef81355930d4ac6627827filenamepom.xmlstatusmodifiedj"  Kj#  K changesKblob_url_https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=b987f508316e4b4ec898dee75c3c577656619c4dpatchX  @@ -56,6 +56,7 @@
         <module>prometheus-metrics-exporter-servlet-jakarta</module>
         <module>prometheus-metrics-exporter-httpserver</module>
         <module>prometheus-metrics-exporter-opentelemetry</module>
+        <module>prometheus-metrics-instrumentation-jvm</module>
         <!-- <module>prometheus-metrics-shaded-dependencies</module> -->
         <module>examples</module>
         <module>integration-tests</module>u}(j  (fdddcc1eedd5b0a815a36bf7f1af2a692b867908j(  .prometheus-metrics-instrumentation-jvm/pom.xmlj*  addedj"  KIj#  K j,  KIj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fpom.xmlj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fpom.xmlj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fpom.xml?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  X
  @@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-instrumentation-jvm</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Metrics Instrumentation - JVM</name>
+    <description>
+        Instrumentation library for JVM metrics
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>brian-brazil</id>
+            <name>Brian Brazil</name>
+            <email>brian.brazil@boxever.com</email>
+        </developer>
+        <developer>
+            <id>fstab</id>
+            <name>Fabian Stäber</name>
+            <email>fabian@fstab.de</email>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>4.11.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>u}(j  (229222a8c564abe54a676efa73ee2d150e275eafj(  nprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmMetrics.javaj*  addedj"  Kj#  K j,  Kj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.javaj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmMetrics.java?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  X  @@ -0,0 +1,30 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+ /**
+ * Registers all JVM metrics. Example usage:
+ * <pre>{@code
+ *   JvmMetrics.register();
+ * }</pre>
+ */
+public class JvmMetrics {
+
+    public static void register() {
+        register(PrometheusRegistry.defaultRegistry, PrometheusProperties.get());
+    }
+
+    public static void register(PrometheusRegistry registry) {
+        register(registry, PrometheusProperties.get());
+    }
+
+    public static void register(PrometheusProperties config) {
+        register(PrometheusRegistry.defaultRegistry, config);
+    }
+
+    public static void register(PrometheusRegistry registry, PrometheusProperties config) {
+        JvmThreadsMetrics.register(registry, config);
+        // TODO: Add all other JVM metrics here.
+    }
+}u}(j  (4fc0c19a7e83b55f599486a5b982cce918339cb4j(  uprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetrics.javaj*  addedj"  Kj#  K j,  Kj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javaj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.javaj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetrics.java?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  X`  @@ -0,0 +1,183 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.core.metrics.CounterWithCallback;
+import io.prometheus.metrics.core.metrics.GaugeWithCallback;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * JVM Thread metrics. The {@link JvmThreadsMetrics} are registered as part of the {@link JvmMetrics} like this:
+ * <pre>{@code
+ *   JvmMetrics.register();
+ * }</pre>
+ * However, if you want only the {@link JvmThreadsMetrics} you can also register them directly:
+ * <pre>{@code
+ *   JvmThreadMetrics.register();
+ * }</pre>
+ * Example metrics being exported:
+ * <pre>
+ * # HELP jvm_threads_current Current thread count of a JVM
+ * # TYPE jvm_threads_current gauge
+ * jvm_threads_current 10.0
+ * # HELP jvm_threads_daemon Daemon thread count of a JVM
+ * # TYPE jvm_threads_daemon gauge
+ * jvm_threads_daemon 8.0
+ * # HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers
+ * # TYPE jvm_threads_deadlocked gauge
+ * jvm_threads_deadlocked 0.0
+ * # HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors
+ * # TYPE jvm_threads_deadlocked_monitor gauge
+ * jvm_threads_deadlocked_monitor 0.0
+ * # HELP jvm_threads_peak Peak thread count of a JVM
+ * # TYPE jvm_threads_peak gauge
+ * jvm_threads_peak 10.0
+ * # HELP jvm_threads_started_total Started thread count of a JVM
+ * # TYPE jvm_threads_started_total counter
+ * jvm_threads_started_total 10.0
+ * # HELP jvm_threads_state Current count of threads by state
+ * # TYPE jvm_threads_state gauge
+ * jvm_threads_state{state="BLOCKED"} 0.0
+ * jvm_threads_state{state="NEW"} 0.0
+ * jvm_threads_state{state="RUNNABLE"} 5.0
+ * jvm_threads_state{state="TERMINATED"} 0.0
+ * jvm_threads_state{state="TIMED_WAITING"} 2.0
+ * jvm_threads_state{state="UNKNOWN"} 0.0
+ * jvm_threads_state{state="WAITING"} 3.0
+ * </pre>
+ */
+public class JvmThreadsMetrics {
+
+    public static final String UNKNOWN = "UNKNOWN";
+
+    public static final String JVM_THREADS_STATE = "jvm_threads_state";
+    private static final String JVM_THREADS_CURRENT = "jvm_threads_current";
+    private static final String JVM_THREADS_DAEMON = "jvm_threads_daemon";
+    private static final String JVM_THREADS_PEAK = "jvm_threads_peak";
+    private static final String JVM_THREADS_STARTED_TOTAL = "jvm_threads_started_total";
+    private static final String JVM_THREADS_DEADLOCKED = "jvm_threads_deadlocked";
+    private static final String JVM_THREADS_DEADLOCKED_MONITOR = "jvm_threads_deadlocked_monitor";
+
+    private JvmThreadsMetrics() {
+    }
+
+    public static void register() {
+        register(PrometheusRegistry.defaultRegistry, PrometheusProperties.get());
+    }
+
+    public static void register(PrometheusRegistry registry) {
+        register(registry, PrometheusProperties.get());
+    }
+
+    public static void register(PrometheusProperties config) {
+        register(PrometheusRegistry.defaultRegistry, config);
+    }
+
+    public static void register(PrometheusRegistry registry, PrometheusProperties config) {
+        Boolean isNativeImage = NativeImageChecker.isGraalVmNativeImage;
+        ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
+        register(isNativeImage, threadBean, registry, config);
+    }
+
+    // package private for testing
+    static void register(Boolean isNativeImage, ThreadMXBean threadBean, PrometheusRegistry registry, PrometheusProperties config) {
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_THREADS_CURRENT)
+                .withHelp("Current thread count of a JVM")
+                .withCallback(callback -> callback.call(threadBean.getThreadCount()))
+                .register(registry);
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_THREADS_DAEMON)
+                .withHelp("Daemon thread count of a JVM")
+                .withCallback(callback -> callback.call(threadBean.getDaemonThreadCount()))
+                .register(registry);
+
+        GaugeWithCallback.newBuilder(config)
+                .withName(JVM_THREADS_PEAK)
+                .withHelp("Peak thread count of a JVM")
+                .withCallback(callback -> callback.call(threadBean.getPeakThreadCount()))
+                .register(registry);
+
+        CounterWithCallback.newBuilder(config)
+                .withName(JVM_THREADS_STARTED_TOTAL)
+                .withHelp("Started thread count of a JVM")
+                .withCallback(callback -> callback.call(threadBean.getTotalStartedThreadCount()))
+                .register(registry);
+
+        if (!isNativeImage) {
+            GaugeWithCallback.newBuilder(config)
+                    .withName(JVM_THREADS_DEADLOCKED)
+                    .withHelp("Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers")
+                    .withCallback(callback -> callback.call(nullSafeArrayLength(threadBean.findDeadlockedThreads())))
+                    .register(registry);
+
+            GaugeWithCallback.newBuilder(config)
+                    .withName(JVM_THREADS_DEADLOCKED_MONITOR)
+                    .withHelp("Cycles of JVM-threads that are in deadlock waiting to acquire object monitors")
+                    .withCallback(callback -> callback.call(nullSafeArrayLength(threadBean.findMonitorDeadlockedThreads())))
+                    .register(registry);
+
+
+            GaugeWithCallback.newBuilder(config)
+                    .withName(JVM_THREADS_STATE)
+                    .withHelp("Current count of threads by state")
+                    .withLabelNames("state")
+                    .withCallback(callback -> {
+                        Map<String, Integer> threadStateCounts = getThreadStateCountMap(threadBean);
+                        for (Map.Entry<String, Integer> entry : threadStateCounts.entrySet()) {
+                            callback.call(entry.getValue(), entry.getKey());
+                        }
+                    })
+                    .register(registry);
+        }
+    }
+
+    private static Map<String, Integer> getThreadStateCountMap(ThreadMXBean threadBean) {
+        long[] threadIds = threadBean.getAllThreadIds();
+
+        // Code to remove any thread id values <= 0
+        int writePos = 0;
+        for (int i = 0; i < threadIds.length; i++) {
+            if (threadIds[i] > 0) {
+                threadIds[writePos++] = threadIds[i];
+            }
+        }
+
+        int numberOfInvalidThreadIds = threadIds.length - writePos;
+        threadIds = Arrays.copyOf(threadIds, writePos);
+
+        // Get thread information without computing any stack traces
+        ThreadInfo[] allThreads = threadBean.getThreadInfo(threadIds, 0);
+
+        // Initialize the map with all thread states
+        HashMap<String, Integer> threadCounts = new HashMap<String, Integer>();
+        for (Thread.State state : Thread.State.values()) {
+            threadCounts.put(state.name(), 0);
+        }
+
+        // Collect the actual thread counts
+        for (ThreadInfo curThread : allThreads) {
+            if (curThread != null) {
+                Thread.State threadState = curThread.getThreadState();
+                threadCounts.put(threadState.name(), threadCounts.get(threadState.name()) + 1);
+            }
+        }
+
+        // Add the thread count for invalid thread ids
+        threadCounts.put(UNKNOWN, numberOfInvalidThreadIds);
+
+        return threadCounts;
+    }
+
+    private static double nullSafeArrayLength(long[] array) {
+        return null == array ? 0 : array.length;
+    }
+}u}(j  (a7ecbf242d540e97db75a195c8d8c5219d8a48b6j(  vprometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/NativeImageChecker.javaj*  addedj"  K
j#  K j,  K
j-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FNativeImageChecker.javaj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FNativeImageChecker.javaj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FNativeImageChecker.java?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  X  @@ -0,0 +1,13 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+/**
+ * Contains utilities to check if we are running inside or building for native image. Default behavior is to check
+ * if specific for graalvm runtime property is present. For additional optimizations it is possible to do add
+ * "--initialize-at-build-time=io.prometheus.client.hotspot.NativeImageChecker" to graalvm native image build command and
+ * the native image will be identified during build time.
+ */
+public final class NativeImageChecker {
+    static final boolean isGraalVmNativeImage = System.getProperty("org.graalvm.nativeimage.imagecode") != null;
+
+    private NativeImageChecker() {}
+}u}(j  (8438e5551ef622f45c08411230bfed4c079e21edj(  prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/ExampleExporterForManualTesting.javaj*  addedj"  Kj#  K j,  Kj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javaj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.javaj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FExampleExporterForManualTesting.java?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  XT  @@ -0,0 +1,21 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
+
+import java.io.IOException;
+
+
+public class ExampleExporterForManualTesting {
+
+  public static void main(String[] args) throws IOException, InterruptedException {
+
+    JvmMetrics.register();
+
+    HTTPServer server = HTTPServer.newBuilder()
+            .withPort(9400)
+            .buildAndStart();
+
+    System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+    Thread.currentThread().join();
+  }
+}u}(j  (25316fe9ab5d1bcbcc5ab26ffb20f3230da6e178j(  yprometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetricsTest.javaj*  addedj"  Kj#  K j,  Kj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javaj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.javaj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Finstrumentation%2Fjvm%2FJvmThreadsMetricsTest.java?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  X2!  @@ -0,0 +1,191 @@
+package io.prometheus.metrics.instrumentation.jvm;
+
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricSnapshots;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class JvmThreadsMetricsTest {
+
+    private ThreadMXBean mockThreadsBean = Mockito.mock(ThreadMXBean.class);
+    private ThreadInfo mockThreadInfoBlocked = Mockito.mock(ThreadInfo.class);
+    private ThreadInfo mockThreadInfoRunnable1 = Mockito.mock(ThreadInfo.class);
+    private ThreadInfo mockThreadInfoRunnable2 = Mockito.mock(ThreadInfo.class);
+
+    @Before
+    public void setUp() {
+        when(mockThreadsBean.getThreadCount()).thenReturn(300);
+        when(mockThreadsBean.getDaemonThreadCount()).thenReturn(200);
+        when(mockThreadsBean.getPeakThreadCount()).thenReturn(301);
+        when(mockThreadsBean.getTotalStartedThreadCount()).thenReturn(503L);
+        when(mockThreadsBean.findDeadlockedThreads()).thenReturn(new long[]{1L, 2L, 3L});
+        when(mockThreadsBean.findMonitorDeadlockedThreads()).thenReturn(new long[]{2L, 3L, 4L});
+        when(mockThreadsBean.getAllThreadIds()).thenReturn(new long[]{3L, 4L, 5L});
+        when(mockThreadInfoBlocked.getThreadState()).thenReturn(Thread.State.BLOCKED);
+        when(mockThreadInfoRunnable1.getThreadState()).thenReturn(Thread.State.RUNNABLE);
+        when(mockThreadInfoRunnable2.getThreadState()).thenReturn(Thread.State.RUNNABLE);
+        when(mockThreadsBean.getThreadInfo(new long[]{3L, 4L, 5L}, 0)).thenReturn(new ThreadInfo[]{
+                mockThreadInfoBlocked, mockThreadInfoRunnable1, mockThreadInfoRunnable2
+        });
+    }
+
+    @Test
+    public void testGoodCase() throws IOException {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmThreadsMetrics.register(false, mockThreadsBean, registry, PrometheusProperties.get());
+        MetricSnapshots snapshots = registry.scrape();
+
+        String expected = "" +
+                "# TYPE jvm_threads_current gauge\n" +
+                "# HELP jvm_threads_current Current thread count of a JVM\n" +
+                "jvm_threads_current 300.0\n" +
+                "# TYPE jvm_threads_daemon gauge\n" +
+                "# HELP jvm_threads_daemon Daemon thread count of a JVM\n" +
+                "jvm_threads_daemon 200.0\n" +
+                "# TYPE jvm_threads_deadlocked gauge\n" +
+                "# HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers\n" +
+                "jvm_threads_deadlocked 3.0\n" +
+                "# TYPE jvm_threads_deadlocked_monitor gauge\n" +
+                "# HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors\n" +
+                "jvm_threads_deadlocked_monitor 3.0\n" +
+                "# TYPE jvm_threads_peak gauge\n" +
+                "# HELP jvm_threads_peak Peak thread count of a JVM\n" +
+                "jvm_threads_peak 301.0\n" +
+                "# TYPE jvm_threads_started counter\n" +
+                "# HELP jvm_threads_started Started thread count of a JVM\n" +
+                "jvm_threads_started_total 503.0\n" +
+                "# TYPE jvm_threads_state gauge\n" +
+                "# HELP jvm_threads_state Current count of threads by state\n" +
+                "jvm_threads_state{state=\"BLOCKED\"} 1.0\n" +
+                "jvm_threads_state{state=\"NEW\"} 0.0\n" +
+                "jvm_threads_state{state=\"RUNNABLE\"} 2.0\n" +
+                "jvm_threads_state{state=\"TERMINATED\"} 0.0\n" +
+                "jvm_threads_state{state=\"TIMED_WAITING\"} 0.0\n" +
+                "jvm_threads_state{state=\"UNKNOWN\"} 0.0\n" +
+                "jvm_threads_state{state=\"WAITING\"} 0.0\n" +
+                "# EOF\n";
+
+        Assert.assertEquals(expected, convertToOpenMetricsFormat(snapshots));
+    }
+
+    private String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true);
+        writer.write(out, snapshots);
+        return out.toString(StandardCharsets.UTF_8.name());
+    }
+
+    @Test
+    public void testIgnoredMetricNotScraped() {
+        MetricNameFilter filter = MetricNameFilter.newBuilder()
+                .nameMustNotBeEqualTo("jvm_threads_deadlocked")
+                .build();
+
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmThreadsMetrics.register(false, mockThreadsBean, registry, PrometheusProperties.get());
+        registry.scrape(filter);
+
+        verify(mockThreadsBean, times(0)).findDeadlockedThreads();
+        verify(mockThreadsBean, times(1)).getThreadCount();
+    }
+
+    @Test
+    public void testInvalidThreadIds() {
+        PrometheusRegistry registry = new PrometheusRegistry();
+        JvmThreadsMetrics.register(registry);
+        MetricSnapshots snapshots = registry.scrape();
+
+        // Number of threads to create with invalid thread ids
+        int numberOfInvalidThreadIds = 2;
+
+        Map<String, Double> expected = getCountByState(snapshots);
+        expected.compute("UNKNOWN", (key, oldValue) -> oldValue == null ? numberOfInvalidThreadIds : oldValue + numberOfInvalidThreadIds);
+
+        final CountDownLatch countDownLatch = new CountDownLatch(numberOfInvalidThreadIds);
+
+        try {
+            // Create and start threads with invalid thread ids (id=0, id=-1, etc.)
+            for (int i = 0; i < numberOfInvalidThreadIds; i++) {
+                new TestThread(-i, new TestRunnable(countDownLatch)).start();
+            }
+
+            Map<String, Double> actual = getCountByState(registry.scrape());
+
+            Assert.assertEquals(expected.size(), actual.size());
+            for (String threadState : expected.keySet()) {
+                Assert.assertEquals(expected.get(threadState), actual.get(threadState), 0.0);
+            }
+        } finally {
+            for (int i = 0; i < numberOfInvalidThreadIds; i++) {
+                countDownLatch.countDown();
+            }
+        }
+    }
+
+    private Map<String, Double> getCountByState(MetricSnapshots snapshots) {
+        Map<String, Double> result = new HashMap<>();
+        for (MetricSnapshot snapshot : snapshots) {
+            if (snapshot.getMetadata().getName().equals("jvm_threads_state")) {
+                for (GaugeSnapshot.GaugeDataPointSnapshot data : ((GaugeSnapshot) snapshot).getData()) {
+                    String state = data.getLabels().get("state");
+                    Assert.assertNotNull(state);
+                    result.put(state, data.getValue());
+                }
+            }
+        }
+        return result;
+    }
+
+    private static class TestThread extends Thread {
+
+        private final long id;
+
+        public TestThread(long id, Runnable runnable) {
+            super(runnable);
+            setDaemon(true);
+            this.id = id;
+        }
+
+        public long getId() {
+            return this.id;
+        }
+    }
+
+    private static class TestRunnable implements Runnable {
+
+        private final CountDownLatch countDownLatch;
+
+        public TestRunnable(CountDownLatch countDownLatch) {
+            this.countDownLatch = countDownLatch;
+        }
+
+        @Override
+        public void run() {
+            try {
+                countDownLatch.await();
+            } catch (InterruptedException e) {
+                // DO NOTHING
+            }
+        }
+    }
+}u}(j  (904c3c3a1167c57a80183120427f6774e8611ffej(  8prometheus-metrics-instrumentation-jvm/version-rules.xmlj*  addedj"  Kj#  K j,  Kj-  https://github.com/prometheus/client_java/blob/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fversion-rules.xmlj/  https://github.com/prometheus/client_java/raw/b987f508316e4b4ec898dee75c3c577656619c4d/prometheus-metrics-instrumentation-jvm%2Fversion-rules.xmlj1  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-instrumentation-jvm%2Fversion-rules.xml?ref=b987f508316e4b4ec898dee75c3c577656619c4dj3  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 9 -->
+                <ignoreVersion type="regex">[^9].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>ueu(e84291fe8c2c7edff59e29e4748272a352f34f98}(sha(e84291fe8c2c7edff59e29e4748272a352f34f98node_idEC_kwDOAHoJt9oAKGU4NDI5MWZlOGMyYzdlZGZmNTllMjllNDc0ODI3MmEzNTJmMzRmOTgcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-29T20:55:31Zu	committer}(jw  Fabian Stäberjy  fabian@fstab.dej{  2023-08-29T20:55:31Zumessage=[maven-release-plugin] prepare for next development iterationtree}(jo  (f9f45074f3c34dc9f35dac94f42dfa1bccdd90e2urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/f9f45074f3c34dc9f35dac94f42dfa1bccdd90e2uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/e84291fe8c2c7edff59e29e4748272a352f34f98
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/e84291fe8c2c7edff59e29e4748272a352f34f98html_urlYhttps://github.com/prometheus/client_java/commit/e84291fe8c2c7edff59e29e4748272a352f34f98comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/e84291fe8c2c7edff59e29e4748272a352f34f98/commentsju  }(loginfstabidJ' jq  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj}  }(j  fstabj  J' jq  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptionsj  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(jo  (de20057419d811cc00b1b70476c7f0cc2253c2eej  dhttps://api.github.com/repos/prometheus/client_java/commits/de20057419d811cc00b1b70476c7f0cc2253c2eej  Yhttps://github.com/prometheus/client_java/commit/de20057419d811cc00b1b70476c7f0cc2253c2eeuastats}(totalK	additionsKQ	deletionsK\ufiles](}(jo  (783ee55eb2c96eb61f59895c54b1e4bd5d544adbfilenamebenchmarks/pom.xmlstatusmodifiedjϜ  KjМ  KchangesKblob_urllhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/benchmarks%2Fpom.xmlraw_urlkhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/benchmarks%2Fpom.xmlcontents_url~https://api.github.com/repos/prometheus/client_java/contents/benchmarks%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98patchX  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>benchmarks</artifactId>u}(jo  (f6ab3646b8e12fd8097bc402db63941ec49e5752j՜  Iexamples/example-exemplars-tail-sampling/example-greeting-service/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-greeting-service%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X7  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-greeting-service</artifactId>u}(jo  (c37ab141835d956ff3dd2139ece0642511d68832j՜  Hexamples/example-exemplars-tail-sampling/example-hello-world-app/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fexample-hello-world-app%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X6  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>example-exemplars-tail-sampling</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-hello-world-app</artifactId>u}(jo  (4f34ee5ab9eefd4a3fe060c6f3a14a5e1571af97j՜  0examples/example-exemplars-tail-sampling/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exemplars-tail-sampling%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exemplars-tail-sampling%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exemplars-tail-sampling</artifactId>u}(jo  (907e7f44e94aafa6c16db9e18752f96aa16f6cb7j՜  ,examples/example-exporter-httpserver/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-httpserver%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-httpserver%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-httpserver%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,12 +5,12 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-httpserver</artifactId>
 
-    <name>>Example - HTTPServer Exporter</name>
+    <name>&gt;Example - HTTPServer Exporter</name>
     <description>
         Prometheus Metrics Example using the HTTPServer for exposing the metrics endpoint
     </description>u}(jo  (076cdd24e791cdc7a2ab31650ceed7379de0116cj՜  /examples/example-exporter-opentelemetry/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-opentelemetry%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X&  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-opentelemetry</artifactId>u}(jo  (345a4328f5202cb8b2c04ae96a8d5c14b976e05fj՜  0examples/example-exporter-servlet-tomcat/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-servlet-tomcat%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>examples</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>example-exporter-servlet-tomcat</artifactId>u}(jo  (bbbe729f6082374c936fc9b817596379aec8337bj՜  examples/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  jhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fpom.xmljܜ  ihttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/examples%2Fpom.xmljޜ  |https://api.github.com/repos/prometheus/client_java/contents/examples%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples</artifactId>u}(jo  (0e3b099c6cb763f2ab18cd36835a97e050531c4bj՜  #integration-tests/it-common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-common%2Fpom.xmljܜ  ~https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-common</artifactId>u}(jo  (d4f83ac829ea27125cfb640f7b69c63c170e0ce0j՜  Cintegration-tests/it-exporter/it-exporter-httpserver-sample/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-httpserver-sample%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-httpserver-sample</artifactId>
@@ -59,8 +58,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.httpserver.HTTPServerSample</mainClass>
                                 </transformer>
                             </transformers>u,      }(jo  (104666b07b9ae5fee4a62ada4310a79dbe1cba8bj՜  Fintegration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-jetty-sample%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-servlet-jetty-sample</artifactId>
@@ -69,8 +68,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.jetty.ExporterServletJettySample</mainClass>
                                 </transformer>
                             </transformers>u}(jo  (ccfbcdc12cddf53c14e3ae3d5a38382a9b1496dcj՜  Gintegration-tests/it-exporter/it-exporter-servlet-tomcat-sample/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-servlet-tomcat-sample%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-servlet-tomcat-sample</artifactId>
@@ -64,8 +63,7 @@
                         </goals>
                         <configuration>
                             <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <mainClass>io.prometheus.metrics.it.exporter.servlet.tomcat.ExporterServletTomcatSample</mainClass>
                                 </transformer>
                             </transformers>u}(jo  (59110421de426807bd67a6cbbb70013d861c61d7j՜  6integration-tests/it-exporter/it-exporter-test/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fit-exporter-test%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>it-exporter</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter-test</artifactId>u}(jo  (b14c5bca60ddc22f2d80ba26573290498ba74495j՜  %integration-tests/it-exporter/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fit-exporter%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fit-exporter%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration-tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it-exporter</artifactId>u}(jo  (223de113f52192f0ab3ebb1854ffce44a927e735j՜  integration-tests/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  shttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fpom.xmljܜ  rhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration-tests%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration-tests%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration-tests</artifactId>u}(jo  (5a36f448938bb6617e0b9ee8d13004b8fbf83527j՜  #integration_tests/it_common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_common%2Fpom.xmljܜ  ~https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_common</artifactId>u}(jo  (625d2c9b91d1f7475acf9ab3ed0ba981f31a47c7j՜  1integration_tests/it_exemplars_otel_agent/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_agent%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_agent</artifactId>u}(jo  (b9cd61ca1094aa5e9cbbbeab353901b7a84f9eefj՜  /integration_tests/it_exemplars_otel_sdk/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_exemplars_otel_sdk%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_exemplars_otel_sdk</artifactId>u}(jo  (dd303f86e73dadd4c9167b4e8c8f3b2e8a767d4bj՜  *integration_tests/it_java_versions/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_java_versions%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_java_versions%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_java_versions%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_java_versions</artifactId>u}(jo  (38bfa4fb337efdc43dc194c7721c27277a3e9769j՜  #integration_tests/it_log4j2/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_log4j2%2Fpom.xmljܜ  ~https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_log4j2%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_log4j2%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>integration_tests</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>it_log4j2</artifactId>u}(jo  (9d3cab3a28516205dbe280fa2c45aa447ff92225j՜  (integration_tests/it_pushgateway/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_pushgateway%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_pushgateway%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_pushgateway%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X	  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_pushgateway</artifactId>u}(jo  (195f5ae460dc1121d5e20f65508b94594ca86fbdj՜  <integration_tests/it_servlet_jakarta_exporter_webxml/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fit_servlet_jakarta_exporter_webxml%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>integration_tests</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>it_servlet_jakarta_exporter_webxml</artifactId>u}(jo  (942b912ab4dc872fa670670eca66da557da9344cj՜  integration_tests/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  shttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fpom.xmljܜ  rhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/integration_tests%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/integration_tests%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration_tests</artifactId>u}(jo  (c6f25cd14838f1d8fde03590dc75fd94c7573a70j՜  pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  _https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/pom.xmljܜ  ^https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/pom.xmljޜ  qhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
 
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
 
     <name>Prometheus Metrics Library</name>
     <url>http://github.com/prometheus/client_java</url>u}(jo  (071cf4a28f4fe5f25c5940fc71d797fa62a52ec3j՜  !prometheus-metrics-config/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  {https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-config%2Fpom.xmljܜ  zhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-config%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-config%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X$  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-config</artifactId>u}(jo  (2151549bd5a2174518d6641d446e78be83961e54j՜  prometheus-metrics-core/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  yhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-core%2Fpom.xmljܜ  xhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-core%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-core%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-core</artifactId>u}(jo  (309674dbdf12371b4ce22a627974a031045b43b5j՜  *prometheus-metrics-exporter-common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-common%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X-  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-common</artifactId>u}(jo  (8675e80474630798070836d821a71a821111ff05j՜  .prometheus-metrics-exporter-httpserver/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-httpserver%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-httpserver%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-httpserver%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X1  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-httpserver</artifactId>u}(jo  (a331de61925b063eb895f68cf438bcf67e933dfej՜  1prometheus-metrics-exporter-opentelemetry/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-opentelemetry%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  XR  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>
@@ -163,7 +162,7 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(jo  (9a369f7995a6cdf0b4e6b0b0a63b0dba15c4505bj՜  3prometheus-metrics-exporter-servlet-jakarta/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-jakarta%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X6  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId>u}(jo  (62f6a806bda3a37a718661e1a17b8b707cc6d88ej՜  -prometheus-metrics-exposition-formats/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exposition-formats%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-exposition-formats%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X0  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-exposition-formats</artifactId>u}(jo  (8a8c20631764c1c6d06376884e2f7aaf2df18fc0j՜   prometheus-metrics-model/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  zhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-model%2Fpom.xmljܜ  yhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-model%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X#  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-model</artifactId>u}(jo  (0e0f4f26604228397aa8b894218a8a6438ef9049j՜  .prometheus-metrics-shaded-dependencies/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X1  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-dependencies</artifactId>u}(jo  (fd69c1689f6ea80820978737585517d5ca3f00fcj՜  Vprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-opentelemetry/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  K	jڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-opentelemetry%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  Xu  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-opentelemetry</artifactId>
@@ -100,8 +99,8 @@
                                 </relocation>
                             </relocations>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
                             </transformers>
                             <filters>
                                 <filter>u}(jo  (47746ea4074501952b65ba25021a9d3e2a399738j՜  Qprometheus-metrics-shaded-dependencies/prometheus-metrics-shaded-protobuf/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-shaded-dependencies%2Fprometheus-metrics-shaded-protobuf%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  XB  @@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>prometheus-metrics-shaded-dependencies</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>prometheus-metrics-shaded-protobuf</artifactId>u}(jo  (d000e3ea615fd5156e1d7a396e68718b259d015ej՜  !prometheus-metrics-tracer/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  {https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fpom.xmljܜ  zhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer</artifactId>u}(jo  (0e01fd462ad3e2be04611f4fdec4f093cc462ccfj՜  Bprometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X#  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-common</artifactId>u}(jo  (4a15f11895a5106081c0b0ce8cdfaffc43b8ecd5j՜  Gprometheus-metrics-tracer/prometheus-metrics-tracer-initializer/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-initializer%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X(  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-initializer</artifactId>u}(jo  (e5bab6fc526f85757b63bc992d13f298fbcfdeb3j՜  Fprometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel-agent%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel-agent</artifactId>u}(jo  (e3c01697f6b1ac31f3ee7788f9fbf3beb946d709j՜  @prometheus-metrics-tracer/prometheus-metrics-tracer-otel/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-tracer%2Fprometheus-metrics-tracer-otel%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X!  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>prometheus-metrics-tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>prometheus-metrics-tracer-otel</artifactId>u}(jo  (f5f030552b7add38d05a6e9175832219e50ee1d9j՜  simpleclient/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  nhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient%2Fpom.xmljܜ  mhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient</artifactId>u}(jo  (f78c01c6ded110701810479f9d7730a0351fdc94j՜  simpleclient_bom/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  rhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_bom%2Fpom.xmljܜ  qhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_bom%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_bom%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_bom</artifactId>u}(jo  (4a820d18c87726b28ff35de32c93761dad928168j՜  simpleclient_caffeine/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  whttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_caffeine%2Fpom.xmljܜ  vhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_caffeine%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_caffeine%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X   @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_caffeine</artifactId>u}(jo  (a3facdc4f41384a24ec2b83c3011dbae1e2db96fj՜  simpleclient_common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  uhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_common%2Fpom.xmljܜ  thttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_common</artifactId>u}(jo  (deede1590f368688e763d8a0a67a468dcdd4a96fj՜  simpleclient_dropwizard/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  yhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_dropwizard%2Fpom.xmljܜ  xhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_dropwizard%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_dropwizard%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_dropwizard</artifactId>u}(jo  (67e48acd2442e4252e539e875f6d438f9d1a732cj՜  $simpleclient_graphite_bridge/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  ~https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_graphite_bridge%2Fpom.xmljܜ  }https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_graphite_bridge%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_graphite_bridge%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_graphite_bridge</artifactId>u}(jo  (50b704b75d5d93001fa0a1f164c5b3f7fe2cb737j՜  simpleclient_guava/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  thttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_guava%2Fpom.xmljܜ  shttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_guava%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_guava%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_guava</artifactId>u}(jo  (df45693846aa3d75eb0128322363aac182be9d33j՜  simpleclient_hibernate/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  xhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_hibernate%2Fpom.xmljܜ  whttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_hibernate%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hibernate%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X!  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hibernate</artifactId>u}(jo  (4dc25a5f50d4ab68a8dcf6dfa6d82edcc6d2c5a9j՜  simpleclient_hotspot/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  vhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_hotspot%2Fpom.xmljܜ  uhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_hotspot%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_hotspot%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_hotspot</artifactId>u}(jo  (c8bcaee09de0c50851657ae4118bc5c5da65f045j՜  simpleclient_httpserver/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  yhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_httpserver%2Fpom.xmljܜ  xhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_httpserver%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_httpserver%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_httpserver</artifactId>u}(jo  (91d9ca76377cc2a37a07a32f3336bf9490bd74a2j՜  simpleclient_jetty/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  thttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_jetty%2Fpom.xmljܜ  shttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_jetty%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty</artifactId>u}(jo  (26c601a776e588a248d9a728a97c85a53767afb6j՜  simpleclient_jetty_jdk8/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  yhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_jetty_jdk8%2Fpom.xmljܜ  xhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_jetty_jdk8%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_jetty_jdk8%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_jetty_jdk8</artifactId>u}(jo  (1d804e9c9e34bed3d9a8c1631e719cb222e83931j՜  simpleclient_log4j/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  thttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_log4j%2Fpom.xmljܜ  shttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_log4j%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j</artifactId>u}(jo  (31805d97d031d22bb22876f638b3b7e11d9da8bfj՜  simpleclient_log4j2/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  uhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_log4j2%2Fpom.xmljܜ  thttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_log4j2%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_log4j2%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_log4j2</artifactId>u}(jo  (39e6acabb08bb9058974f78abc9eacaeffee6440j՜  simpleclient_logback/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  vhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_logback%2Fpom.xmljܜ  uhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_logback%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_logback%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_logback</artifactId>u}(jo  (4fb7ab4b811d8d26fef6511874b9be4f5d87a90bj՜   simpleclient_pushgateway/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  zhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_pushgateway%2Fpom.xmljܜ  yhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_pushgateway%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_pushgateway%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X#  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_pushgateway</artifactId>u}(jo  (4c7e4d4fae4c56874f0a7c757c5afdef1ed77acbj՜  simpleclient_servlet/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  vhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet%2Fpom.xmljܜ  uhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet</artifactId>u}(jo  (ad3ce2f57f4947d3aa656e6746a940a82f5e3d45j՜  #simpleclient_servlet_common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  }https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet_common%2Fpom.xmljܜ  |https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet_common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X&  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_common</artifactId>u}(jo  (d223bc04e8fadc1b8429fb2ea139be3a5f3cbd58j՜  $simpleclient_servlet_jakarta/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  ~https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet_jakarta%2Fpom.xmljܜ  }https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_servlet_jakarta%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_servlet_jakarta%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X'  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_servlet_jakarta</artifactId>u}(jo  (3c36741f6b38825c8e99f764dc28322af6a2796fj՜  simpleclient_spring_web/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  yhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_spring_web%2Fpom.xmljܜ  xhttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_spring_web%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_spring_web%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X"  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_spring_web</artifactId>u}(jo  (74ca017daa1a778fd83f476920fcec09c8aebcf6j՜  simpleclient_tracer/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  uhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fpom.xmljܜ  thttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>client_java</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer</artifactId>u}(jo  (996ccb70da4c061e26b54d6f401b361351e53218j՜  6simpleclient_tracer/simpleclient_tracer_common/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_common%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_common</artifactId>u}(jo  (c86e7c1f578dd32eda89df64350e8392f653f806j՜  4simpleclient_tracer/simpleclient_tracer_otel/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel</artifactId>u}(jo  (71299100b5e2c95de034f3d84b177136dfd5ed7ej՜  :simpleclient_tracer/simpleclient_tracer_otel_agent/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  https://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljܜ  https://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_tracer%2Fsimpleclient_tracer_otel_agent%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
   <parent>
     <groupId>io.prometheus</groupId>
     <artifactId>simpleclient_tracer</artifactId>
-    <version>1.0.0-alpha-3-SNAPSHOT</version>
+    <version>1.0.0-alpha-4-SNAPSHOT</version>
   </parent>
 
   <artifactId>simpleclient_tracer_otel_agent</artifactId>u}(jo  (c2d5b0ee15eb5c5eb4d8613c4f7b4260b35e5673j՜  simpleclient_vertx/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  thttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_vertx%2Fpom.xmljܜ  shttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_vertx%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx</artifactId>u}(jo  (50d3bdeeae5004a5c080e4f022ab130f27e268a7j՜  simpleclient_vertx4/pom.xmljל  modifiedjϜ  KjМ  Kjٜ  Kjڜ  uhttps://github.com/prometheus/client_java/blob/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_vertx4%2Fpom.xmljܜ  thttps://github.com/prometheus/client_java/raw/e84291fe8c2c7edff59e29e4748272a352f34f98/simpleclient_vertx4%2Fpom.xmljޜ  https://api.github.com/repos/prometheus/client_java/contents/simpleclient_vertx4%2Fpom.xml?ref=e84291fe8c2c7edff59e29e4748272a352f34f98j  X  @@ -5,7 +5,7 @@
     <parent>
         <groupId>io.prometheus</groupId>
         <artifactId>client_java</artifactId>
-        <version>1.0.0-alpha-3-SNAPSHOT</version>
+        <version>1.0.0-alpha-4-SNAPSHOT</version>
     </parent>
 
     <artifactId>simpleclient_vertx4</artifactId>ueu(5f64d23ea9a883cdbcee1ffa881d394639bd50e1}(sha(5f64d23ea9a883cdbcee1ffa881d394639bd50e1node_idEC_kwDOAHoJt9oAKDVmNjRkMjNlYTlhODgzY2RiY2VlMWZmYTg4MWQzOTQ2MzliZDUwZTEcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-13T21:32:58Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-13T21:32:58Zumessage Shade the OpenTelemetry exportertree}(j  (1587fd30fcdf815043458742264fdeda8057b6d1urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/1587fd30fcdf815043458742264fdeda8057b6d1uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/5f64d23ea9a883cdbcee1ffa881d394639bd50e1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/5f64d23ea9a883cdbcee1ffa881d394639bd50e1html_urlYhttps://github.com/prometheus/client_java/commit/5f64d23ea9a883cdbcee1ffa881d394639bd50e1comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/5f64d23ea9a883cdbcee1ffa881d394639bd50e1/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj   9https://api.github.com/users/fstab/following{/other_user}j"  2https://api.github.com/users/fstab/gists{/gist_id}j$  9https://api.github.com/users/fstab/starred{/owner}{/repo}j&  0https://api.github.com/users/fstab/subscriptionsj(  'https://api.github.com/users/fstab/orgsj*  (https://api.github.com/users/fstab/reposj,  3https://api.github.com/users/fstab/events{/privacy}j.  2https://api.github.com/users/fstab/received_eventsj0  Userj2  uparents]}(j  (2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  dhttps://api.github.com/repos/prometheus/client_java/commits/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06j  Yhttps://github.com/prometheus/client_java/commit/2b3eb18d19c98e9c27b6885ca8e70572ec6a6d06uastats}(totalKC	additionsK3	deletionsKufiles]}(j  (24b1240e7001f5be4809b6f677740add2f4c735efilename1prometheus-metrics-exporter-opentelemetry/pom.xmlstatusmodifiedjL  K3jM  KchangesKCblob_urlhttps://github.com/prometheus/client_java/blob/5f64d23ea9a883cdbcee1ffa881d394639bd50e1/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlraw_urlhttps://github.com/prometheus/client_java/raw/5f64d23ea9a883cdbcee1ffa881d394639bd50e1/prometheus-metrics-exporter-opentelemetry%2Fpom.xmlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fpom.xml?ref=5f64d23ea9a883cdbcee1ffa881d394639bd50e1patchX  @@ -17,6 +17,11 @@
         Converts Prometheus metrics to OpenTelemetry format and pushes them to an OTLP endpoint
     </description>
 
+    <properties>
+        <otel.version>1.28.0</otel.version>
+        <otel.semconv.version>${otel.version}-alpha</otel.semconv.version>
+    </properties>
+
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
@@ -42,34 +47,22 @@
         <dependency>
             <groupId>io.opentelemetry</groupId>
             <artifactId>opentelemetry-api</artifactId>
-            <version>1.28.0</version>
+            <version>${otel.version}</version>
         </dependency>
         <dependency>
             <groupId>io.opentelemetry</groupId>
             <artifactId>opentelemetry-sdk</artifactId>
-            <version>1.28.0</version>
+            <version>${otel.version}</version>
         </dependency>
         <dependency>
             <groupId>io.opentelemetry</groupId>
             <artifactId>opentelemetry-semconv</artifactId>
-            <version>1.28.0-alpha</version>
-        </dependency>
-        <!--
-        <dependency>
-            <groupId>io.opentelemetry</groupId>
-            <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
-            <version>1.28.0</version>
-        </dependency>
-        <dependency>
-            <groupId>io.opentelemetry</groupId>
-            <artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
-            <version>1.28.0</version>
+            <version>${otel.semconv.version}</version>
         </dependency>
-        -->
         <dependency>
             <groupId>io.opentelemetry</groupId>
             <artifactId>opentelemetry-exporter-otlp</artifactId>
-            <version>1.28.0</version>
+            <version>${otel.version}</version>
         </dependency>
 
         <!-- test dependencies -->
@@ -88,5 +81,47 @@
                 <filtering>true</filtering>
             </resource>
         </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.5.0</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okhttp3</pattern>
+                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.okhttp3</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>kotlin</pattern>
+                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.kotlin</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org</pattern>
+                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.org</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>okio</pattern>
+                                    <shadedPattern>io.prometheus.metrics.io_opentelemetry_2_x.okio</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
 </project>uau(1f26a70f85273fda368514fac5e96be9f1c17859}(sha(1f26a70f85273fda368514fac5e96be9f1c17859node_idEC_kwDOAHoJt9oAKDFmMjZhNzBmODUyNzNmZGEzNjg1MTRmYWM1ZTk2YmU5ZjFjMTc4NTkcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-07-10T21:37:57Zu	committer}(ji  Fabian Stäberjk  fabian@fstab.dejm  2023-07-10T21:37:57ZumessageExporter servlettree}(ja  (ef01f26541621f3e8941b54a1c507e65dead30ffurlfhttps://api.github.com/repos/prometheus/client_java/git/trees/ef01f26541621f3e8941b54a1c507e65dead30ffujy  hhttps://api.github.com/repos/prometheus/client_java/git/commits/1f26a70f85273fda368514fac5e96be9f1c17859
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujy  dhttps://api.github.com/repos/prometheus/client_java/commits/1f26a70f85273fda368514fac5e96be9f1c17859html_urlYhttps://github.com/prometheus/client_java/commit/1f26a70f85273fda368514fac5e96be9f1c17859comments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/1f26a70f85273fda368514fac5e96be9f1c17859/commentsjg  }(loginfstabidJ' jc  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3jy  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminujo  }(j  fstabj  J' jc  MDQ6VXNlcjMzMDUzNQ==j  2https://avatars.githubusercontent.com/u/330535?v=4j  h3jy  "https://api.github.com/users/fstabj  https://github.com/fstabj  ,https://api.github.com/users/fstab/followersj  9https://api.github.com/users/fstab/following{/other_user}j  2https://api.github.com/users/fstab/gists{/gist_id}j  9https://api.github.com/users/fstab/starred{/owner}{/repo}j  0https://api.github.com/users/fstab/subscriptions      j  'https://api.github.com/users/fstab/orgsj  (https://api.github.com/users/fstab/reposj  3https://api.github.com/users/fstab/events{/privacy}j  2https://api.github.com/users/fstab/received_eventsj  Userj  uparents]}(ja  (dcb0e0a253f764884a9ef189323ba6c5e48fafa4jy  dhttps://api.github.com/repos/prometheus/client_java/commits/dcb0e0a253f764884a9ef189323ba6c5e48fafa4j  Yhttps://github.com/prometheus/client_java/commit/dcb0e0a253f764884a9ef189323ba6c5e48fafa4uastats}(totalMz	additionsMj	deletionsKufiles](}(ja  (01bb05c1bd4d31c6cfbb95aa6f5664e4a298552efilenamepom.xmlstatusmodifiedj  Kj  K changesKblob_url_https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/pom.xmlraw_url^https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/pom.xmlcontents_urlqhttps://api.github.com/repos/prometheus/client_java/contents/pom.xml?ref=1f26a70f85273fda368514fac5e96be9f1c17859patchXK  @@ -45,6 +45,7 @@
         <module>prometheus-metrics-model</module>
         <module>prometheus-metrics-tracer</module>
         <module>prometheus-metrics-exposition-formats</module>
+        <module>prometheus-metrics-exporter-servlet-javax</module>
         <module>tmp_example</module>
 
         <module>simpleclient</module>u}(ja  (41f025aa2489a695d6943fa2ff3c5fd0cec1dfb0jǟ  1prometheus-metrics-exporter-servlet-javax/pom.xmljɟ  addedj  K>j  K j˟  K>j̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fpom.xmljΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fpom.xmljП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-javax%2Fpom.xml?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  XO  @@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>io.prometheus</groupId>
+        <artifactId>client_java</artifactId>
+        <version>0.16.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>prometheus-metrics-exporter-servlet-javax</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Prometheus Java Simpleclient Servlet - Javax</name>
+    <description>
+        HTTP servlet exporter for the simpleclient.
+    </description>
+
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <properties>
+      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-model</artifactId>
+            <version>0.16.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exposition-formats</artifactId>
+            <version>0.16.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>u}(ja  (80863fbb538fb5f2badbc4b6172907d26f101c25jǟ  prometheus-metrics-exporter-servlet-javax/src/main/java/io/prometheus/metrics/exporter/servlet/javax/PrometheusMetricsServlet.javajɟ  addedj  KKj  K j˟  KKj̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.javajΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.javajП  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-javax%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fservlet%2Fjavax%2FPrometheusMetricsServlet.java?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  XI  @@ -0,0 +1,75 @@
+package io.prometheus.metrics.exporter.servlet.javax;
+
+import io.prometheus.metrics.config.ExporterFilterProperties;
+import io.prometheus.metrics.config.PrometheusProperties;
+import io.prometheus.metrics.expositionformats.ExpositionFormatWriter;
+import io.prometheus.metrics.expositionformats.ExpositionFormats;
+import io.prometheus.metrics.model.registry.MetricNameFilter;
+import io.prometheus.metrics.model.registry.PrometheusRegistry;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.function.Predicate;
+
+/**
+ * Initial example exporter so that we can try the new metrics library out.
+ * <p>
+ * We'll add a Jakarta servlet, the built-in HTTPServer, etc. soon, and likely move common code into a common module.
+ */
+public class PrometheusMetricsServlet extends HttpServlet {
+
+    private final PrometheusRegistry registry;
+
+    private final ExpositionFormats expositionFormats;
+    private final Predicate<String> nameFilter;
+
+    public PrometheusMetricsServlet(PrometheusProperties config, PrometheusRegistry registry) {
+        this.expositionFormats = ExpositionFormats.init(config.getExporterProperties());
+        this.registry = registry;
+        this.nameFilter = makeNameFilter(config.getExporterFilterProperties());
+    }
+
+    private static Predicate<String> makeNameFilter(ExporterFilterProperties props) {
+        if (props.getAllowedNames() == null && props.getExcludedNames() == null && props.getAllowedPrefixes() == null && props.getExcludedPrefixes() == null) {
+            return null;
+        } else {
+            return MetricNameFilter.newBuilder()
+                    .nameMustBeEqualTo(props.getAllowedNames())
+                    .nameMustNotBeEqualTo(props.getExcludedNames())
+                    .nameMustStartWith(props.getAllowedPrefixes())
+                    .nameMustNotStartWith(props.getExcludedPrefixes())
+                    .build();
+        }
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        Predicate<String> filter = nameFilter;
+        String[] allowedNames = request.getParameterValues("name[]");
+        if (allowedNames != null) {
+            filter = filter.and(MetricNameFilter.newBuilder().nameMustBeEqualTo(allowedNames).build());
+        }
+        switch (request.getParameter("debug")) {
+            case "openmetrics":
+                response.setContentType("text/plain");
+                expositionFormats.getOpenMetricsTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                break;
+            case "text":
+                response.setContentType("text/plain");
+                expositionFormats.getPrometheusTextFormatWriter().write(response.getOutputStream(), registry.scrape(filter));
+                break;
+            case "prometheus-protobuf":
+                response.setContentType("text/plain");
+                String debugString = expositionFormats.getPrometheusProtobufWriter().toDebugString(registry.scrape(filter));
+                response.getWriter().write(debugString);
+                break;
+            default:
+                String acceptHeader = request.getHeader("Accept");
+                ExpositionFormatWriter writer = expositionFormats.findWriter(acceptHeader);
+                response.setContentType(writer.getContentType());
+                writer.write(response.getOutputStream(), registry.scrape(filter));
+        }
+    }
+}u}(ja  (318e865f55bdd893d762a5f4e759a502e8bbc983jǟ  ;prometheus-metrics-exporter-servlet-javax/version-rules.xmljɟ  addedj  Kj  K j˟  Kj̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fversion-rules.xmljΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-exporter-servlet-javax%2Fversion-rules.xmljП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-servlet-javax%2Fversion-rules.xml?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  Xz  @@ -0,0 +1,12 @@
+<ruleset comparisonMethod="maven"
+         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+    <rules>
+        <rule groupId="org.eclipse.jetty" comparisonMethod="maven">
+            <ignoreVersions>
+                <!-- pin to version 8 -->
+                <ignoreVersion type="regex">[^8].*</ignoreVersion>
+            </ignoreVersions>
+        </rule>
+    </rules>
+</ruleset>u}(ja  (b0fba2db102eb9c6ff775289363c8832f7f2ecddjǟ  Zprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/Collector.javajɟ  modifiedj  Kj  Kj˟  K
j̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.javajП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FCollector.java?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  X  @@ -20,16 +20,16 @@ public interface Collector {
     MetricSnapshot collect();
 
     /**
-     * Like {@link #collect()}, but returns {@code null} if {@code excludedNames.test(name)} is {@code true}.
+     * Like {@link #collect()}, but returns {@code null} if {@code includedNames.test(name)} is {@code false}.
      * <p>
      * Override this if there is a more efficient way than first collecting the snapshot and then discarding it.
      */
-    default MetricSnapshot collect(Predicate<String> excludedNames) {
+    default MetricSnapshot collect(Predicate<String> includedNames) {
         MetricSnapshot result = collect();
-        if (excludedNames.test(result.getMetadata().getName())) {
-            return null;
-        } else {
+        if (includedNames.test(result.getMetadata().getName())) {
             return result;
+        } else {
+            return null;
         }
     }
 u}(ja  (e8e8c16217461086dd173575795e6e8f6e4a01c5jǟ  aprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MetricNameFilter.javajɟ  addedj  Kj  K j˟  Kj̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javajΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.javajП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMetricNameFilter.java?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  X  @@ -0,0 +1,196 @@
+package io.prometheus.metrics.model.registry;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.function.Predicate;
+
+import static java.util.Collections.unmodifiableCollection;
+
+/**
+ * Filter samples (i.e. time series) by name.
+ */
+public class MetricNameFilter implements Predicate<String> {
+
+    /**
+     * For convenience, a filter that allows all names.
+     */
+    public static final Predicate<String> ALLOW_ALL = name -> true;
+
+    private final Collection<String> nameIsEqualTo;
+    private final Collection<String> nameIsNotEqualTo;
+    private final Collection<String> nameStartsWith;
+    private final Collection<String> nameDoesNotStartWith;
+
+    private MetricNameFilter(Collection<String> nameIsEqualTo, Collection<String> nameIsNotEqualTo, Collection<String> nameStartsWith, Collection<String> nameDoesNotStartWith) {
+        this.nameIsEqualTo = unmodifiableCollection(new ArrayList<>(nameIsEqualTo));
+        this.nameIsNotEqualTo = unmodifiableCollection(new ArrayList<>(nameIsNotEqualTo));
+        this.nameStartsWith = unmodifiableCollection(new ArrayList<>(nameStartsWith));
+        this.nameDoesNotStartWith = unmodifiableCollection(new ArrayList<>(nameDoesNotStartWith));
+    }
+
+    @Override
+    public boolean test(String sampleName) {
+        return matchesNameEqualTo(sampleName)
+                && !matchesNameNotEqualTo(sampleName)
+                && matchesNameStartsWith(sampleName)
+                && !matchesNameDoesNotStartWith(sampleName);
+    }
+
+    private boolean matchesNameEqualTo(String metricName) {
+        if (nameIsEqualTo.isEmpty()) {
+            return true;
+        }
+        for (String name : nameIsEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameNotEqualTo(String metricName) {
+        if (nameIsNotEqualTo.isEmpty()) {
+            return false;
+        }
+        for (String name : nameIsNotEqualTo) {
+            // The following ignores suffixes like _total.
+            // "request_count" and "request_count_total" both match a metric named "request_count".
+            if (name.startsWith(metricName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameStartsWith(String metricName) {
+        if (nameStartsWith.isEmpty()) {
+            return true;
+        }
+        for (String prefix : nameStartsWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean matchesNameDoesNotStartWith(String metricName) {
+        if (nameDoesNotStartWith.isEmpty()) {
+            return false;
+        }
+        for (String prefix : nameDoesNotStartWith) {
+            if (metricName.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static Builder newBuilder() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private final Collection<String> nameEqualTo = new ArrayList<>();
+        private final Collection<String> nameNotEqualTo = new ArrayList<>();
+        private final Collection<String> nameStartsWith = new ArrayList<>();
+        private final Collection<String> nameDoesNotStartWith = new ArrayList<>();
+
+        private Builder() {
+        }
+
+        /**
+         * @see #nameMustBeEqualTo(Collection)
+         */
+        public Builder nameMustBeEqualTo(String... names) {
+            return nameMustBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * Only samples with one of the {@code names} will be included.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to retrieve all samples from a histogram, you must include the
+         * '_count', '_sum' and '_bucket' names.
+         * <p>
+         * This method should be used by HTTP exporters to implement the {@code ?name[]=} URL parameters.
+         *
+         * @param names empty means no restriction.
+         */
+        public Builder nameMustBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotBeEqualTo(Collection)
+         */
+        public Builder nameMustNotBeEqualTo(String... names) {
+            return nameMustNotBeEqualTo(Arrays.asList(names));
+        }
+
+        /**
+         * All samples that are not in {@code names} will be excluded.
+         * <p>
+         * Note that the provided {@code names} will be matched against the sample name (i.e. the time series name)
+         * and not the metric name. For instance, to exclude all samples from a histogram, you must exclude the
+         * '_count', '_sum' and '_bucket' names.
+         *
+         * @param names empty means no name will be excluded.
+         */
+        public Builder nameMustNotBeEqualTo(Collection<String> names) {
+            if (names != null) {
+                nameNotEqualTo.addAll(names);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustStartWith(Collection)
+         */
+        public Builder nameMustStartWith(String... prefixes) {
+            return nameMustStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Only samples whose name starts with one of the {@code prefixes} will be included.
+         *
+         * @param prefixes empty means no restriction.
+         */
+        public Builder nameMustStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameStartsWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        /**
+         * @see #nameMustNotStartWith(Collection)
+         */
+        public Builder nameMustNotStartWith(String... prefixes) {
+            return nameMustNotStartWith(Arrays.asList(prefixes));
+        }
+
+        /**
+         * Samples with names starting with one of the {@code prefixes} will be excluded.
+         *
+         * @param prefixes empty means no time series will be excluded.
+         */
+        public Builder nameMustNotStartWith(Collection<String> prefixes) {
+            if (prefixes != null) {
+                nameDoesNotStartWith.addAll(prefixes);
+            }
+            return this;
+        }
+
+        public MetricNameFilter build() {
+            return new MetricNameFilter(nameEqualTo, nameNotEqualTo, nameStartsWith, nameDoesNotStartWith);
+        }
+    }
+}u}(ja  (3fd56e493c24336d9109940b2c061941ed86590djǟ  _prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MultiCollector.javajɟ  modifiedj  Kj  Kj˟  Kj̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.javajП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FMultiCollector.java?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  X  @@ -19,15 +19,15 @@ public interface MultiCollector {
     MetricSnapshots collect();
 
     /**
-     * Like {@link #collect()}, but returns only the snapshots where {@code excludedNames.test(name)} is {@code false}.
+     * Like {@link #collect()}, but returns only the snapshots where {@code includedNames.test(name)} is {@code true}.
      * <p>
      * Override this if there is a more efficient way than first collecting all snapshot and then discarding the excluded ones.
      */
-    default MetricSnapshots collect(Predicate<String> excludedNames) {
+    default MetricSnapshots collect(Predicate<String> includedNames) {
         MetricSnapshots allSnapshots = collect();
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (MetricSnapshot snapshot : allSnapshots) {
-            if (!excludedNames.test(snapshot.getMetadata().getName())) {
+            if (includedNames.test(snapshot.getMetadata().getName())) {
                 result.addMetricSnapshot(snapshot);
             }
         }u}(ja  (df7a686def54b61f362bf1e854d13490170552adjǟ  cprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusRegistry.javajɟ  modifiedj  Kj  Kj˟  Kj̟  https://github.com/prometheus/client_java/blob/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajΟ  https://github.com/prometheus/client_java/raw/1f26a70f85273fda368514fac5e96be9f1c17859/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.javajП  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fregistry%2FPrometheusRegistry.java?ref=1f26a70f85273fda368514fac5e96be9f1c17859jҟ  X
  @@ -59,29 +59,29 @@ public MetricSnapshots scrape() {
         return result.build();
     }
 
-    public MetricSnapshots scrape(Predicate<String> excludedNames) {
+    public MetricSnapshots scrape(Predicate<String> includedNames) {
         MetricSnapshots.Builder result = MetricSnapshots.newBuilder();
         for (Collector collector : collectors) {
             String name = collector.getName();
-            if (name == null || !excludedNames.test(name)) {
-                MetricSnapshot snapshot = collector.collect();
-                if (!excludedNames.test(snapshot.getMetadata().getName())) {
+            if (name == null || includedNames.test(name)) {
+                MetricSnapshot snapshot = collector.collect(includedNames);
+                if (snapshot != null) {
                     result.addMetricSnapshot(snapshot);
                 }
             }
         }
         for (MultiCollector collector : multiCollectors) {
             List<String> names = collector.getNames();
-            boolean excluded = true;
+            boolean excluded = true; // the multi-collector is excluded unless at least one name matches
             for (String name : names) {
-                if (!excludedNames.test(name)) {
+                if (includedNames.test(name)) {
                     excluded = false;
                     break;
                 }
             }
             if (!excluded) {
-                for (MetricSnapshot snapshot : collector.collect()) {
-                    if (!excludedNames.test(snapshot.getMetadata().getName())) {
+                for (MetricSnapshot snapshot : collector.collect(includedNames)) {
+                    if (snapshot != null) {
                         result.addMetricSnapshot(snapshot);
                     }
                 }ueu(cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e}(sha(cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00enode_idEC_kwDOAHoJt9oAKGNkOGVhZmZiZDc1YjcwMzg1ZjhkZjVkNTA4MmQ1ZWM2ZWM1ZmUwMGUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-08-27T18:21:21Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-08-27T18:21:48Zumessage(First OTel exponential histogram exampletree}(j  (edbeb3c29f87ba621a2159e9721cdb7ee74ec0c4urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/edbeb3c29f87ba621a2159e9721cdb7ee74ec0c4uj&  hhttps://api.github.com/repos/prometheus/client_java/git/commits/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj&  dhttps://api.github.com/repos/prometheus/client_java/commits/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ehtml_urlYhttps://github.com/prometheus/client_java/commit/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j&  "https://api.github.com/users/fstabj2  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j7  fstabj9  J' j  MDQ6VXNlcjMzMDUzNQ==j;  2https://avatars.githubusercontent.com/u/330535?v=4j=  h3j&  "https://api.github.com/users/fstabj2  https://github.com/fstabj@  ,https://api.github.com/users/fstab/followersjB  9https://api.github.com/users/fstab/following{/other_user}jD  2https://api.github.com/users/fstab/gists{/gist_id}jF  9https://api.github.com/users/fstab/starred{/owner}{/repo}jH  0https://api.github.com/users/fstab/subscriptionsjJ  'https://api.github.com/users/fstab/orgsjL  (https://api.github.com/users/fstab/reposjN  3https://api.github.com/users/fstab/events{/privacy}jP  2https://api.github.com/users/fstab/received_eventsjR  UserjT  uparents]}(j  (9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dj&  dhttps://api.github.com/repos/prometheus/client_java/commits/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2dj2  Yhttps://github.com/prometheus/client_java/commit/9daa5e43fca4f715f1dd8bef298e8ddb43c6ba2duastats}(totalM	additionsMW	deletionsK+ufiles](}(j  (e5d4e01d34dddbb87f4b134cd16c60909caf63affilename>examples/example-exporter-opentelemetry/config/prometheus.yamlstatusmodifiedjn  Kjo  K changesKblob_urlhttps://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlraw_urlhttps://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yamlcontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fconfig%2Fprometheus.yaml?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00epatch@@ -0,0 +1,6 @@
+global:
+  scrape_interval: 10s
+scrape_configs:
+  - job_name: "prometheus-direct"
+    static_configs:
+      - targets: ["localhost:9400"]u}(j  (ba0a58f2101902c5eaca8d6eb7b54ce20e9abcfcjt  /examples/example-exporter-opentelemetry/pom.xmljv  modifiedjn  Kjo  K jx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fpom.xmlj}  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fpom.xml?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X	  @@ -37,6 +37,11 @@
             <artifactId>prometheus-metrics-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.prometheus</groupId>
+            <artifactId>prometheus-metrics-exporter-httpserver</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>io.prometheus</groupId>
             <artifactId>prometheus-metrics-exporter-opentelemetry</artifactId>u}(j  (16a1790a5e6392a377b40d0dc7cfec1460c6aa01jt  lexamples/example-exporter-opentelemetry/src/main/java/io/prometheus/metrics/examples/opentelemetry/Main.javajv  modifiedjn  Kjo  K jx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.javaj}  https://api.github.com/repos/prometheus/client_java/contents/examples%2Fexample-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexamples%2Fopentelemetry%2FMain.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -2,9 +2,13 @@
 
 import io.prometheus.metrics.core.metrics.Counter;
 import io.prometheus.metrics.core.metrics.Gauge;
+import io.prometheus.metrics.core.metrics.Histogram;
+import io.prometheus.metrics.exporter.httpserver.HTTPServer;
 import io.prometheus.metrics.exporter.opentelemetry.OpenTelemetryExporter;
 import io.prometheus.metrics.model.snapshots.Unit;
 
+import java.util.Random;
+
 /**
  * Simple example of an application exposing metrics pushing metrics via OTLP.
  */
@@ -28,6 +32,23 @@ public static void main(String[] args) throws Exception {
         gauge.withLabelValues("inside").set(23.4);
         gauge.withLabelValues("outside").set(9.3);
 
+        Histogram histogram = Histogram.newBuilder()
+                .withName("request_latency_seconds")
+                .withHelp("Request duration in seconds")
+                .withUnit(Unit.SECONDS)
+                .withLabelNames("http_status")
+                .register();
+
+        Random random = new Random(0);
+        for (int i=0; i<1000; i++) {
+            histogram.withLabelValues("200").observe(random.nextGaussian());
+        }
+
+        HTTPServer server = HTTPServer.newBuilder()
+                .withPort(9400)
+                .buildAndStart();
+        System.out.println("HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics");
+
         OpenTelemetryExporter.newBuilder()
                 .withIntervalSeconds(5)
                 .buildAndStart();u}(j  (ce90e4145eb5f72e3c2cb2e9e37a8c58fc142c10jt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.javaj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FOpenTelemetryExporter.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -76,14 +76,14 @@ public static class Builder {
         private PrometheusRegistry registry = null;
         private String protocol;
         private String endpoint;
-        private Map<String, String> headers = new HashMap<>();
+        private final Map<String, String> headers = new HashMap<>();
         private Integer intervalSeconds;
         private Integer timeoutSeconds;
         private String serviceName;
         private String serviceNamespace;
         private String serviceInstanceId;
         private String serviceVersion;
-        private Map<String, String> resourceAttributes = new HashMap<>();
+        private final Map<String, String> resourceAttributes = new HashMap<>();
 
         private Builder(PrometheusProperties config) {
             this.config = config;u}(j  (f890e97391dae4b86bc8267366cd11a01bd5427ajt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusMetricProducer.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.javaj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2FPrometheusMetricProducer.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X>  @@ -1,6 +1,8 @@
 package io.prometheus.metrics.exporter.opentelemetry;
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.MetricMetadata;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.internal.export.MetricProducer;
@@ -34,12 +36,19 @@ public Collection<MetricData> collectAllMetrics() {
         MetricDataFactory factory = new MetricDataFactory(resource, instrumentationScopeInfo, System.currentTimeMillis());
         for (MetricSnapshot snapshot : snapshots) {
             if (snapshot instanceof CounterSnapshot) {
-                result.add(factory.create((CounterSnapshot) snapshot));
+                addUnlessNull(result, factory.create((CounterSnapshot) snapshot));
             } else if (snapshot instanceof GaugeSnapshot) {
-                result.add(factory.create((GaugeSnapshot) snapshot));
+                addUnlessNull(result, factory.create((GaugeSnapshot) snapshot));
+            } else if (snapshot instanceof HistogramSnapshot) {
+                addUnlessNull(result, factory.create((HistogramSnapshot) snapshot));
             }
-
         }
         return result;
     }
+
+    private void addUnlessNull(List<MetricData> result, MetricData data) {
+        if (data != null) {
+            result.add(data);
+        }
+    }
 }u}(j  (6c93f74e7f674aafdbb8fb7bbae0417405dc9e6fjt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FDoublePointDataImpl.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -6,44 +6,17 @@
 
 import java.util.List;
 
-class DoublePointDataImpl implements DoublePointData {
+class DoublePointDataImpl extends PointDataImpl implements DoublePointData {
 
     private final double value;
-    private final long startEpochNanos;
-    private final long epochNanos;
-    private final Attributes attributes;
-    private final List<DoubleExemplarData> exemplars;
 
     public DoublePointDataImpl(double value, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
         this.value = value;
-        this.startEpochNanos = startEpochNanos;
-        this.epochNanos = epochNanos;
-        this.attributes = attributes;
-        this.exemplars = exemplars;
     }
 
     @Override
     public double getValue() {
         return value;
     }
-
-    @Override
-    public long getStartEpochNanos() {
-        return startEpochNanos;
-    }
-
-    @Override
-    public long getEpochNanos() {
-        return epochNanos;
-    }
-
-    @Override
-    public Attributes getAttributes() {
-        return attributes;
-    }
-
-    @Override
-    public List<DoubleExemplarData> getExemplars() {
-        return exemplars;
-    }
 }u}(j  (d365c26fb4969d38448d8e1bd702b7e55e061b2ejt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramBucketsImpl.javajv  addedjn  K.jo  K jx  K.jy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramBucketsImpl.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  XT  @@ -0,0 +1,46 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ExponentialHistogramBucketsImpl implements ExponentialHistogramBuckets {
+
+    private final int scale;
+    private final int offset;
+    private final List<Long> bucketCounts = new ArrayList<>();
+
+    ExponentialHistogramBucketsImpl(int scale, int offset) {
+        this.scale = scale;
+        this.offset = offset;
+    }
+
+    void addCount(long count) {
+        bucketCounts.add(count);
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public int getOffset() {
+        return offset;
+    }
+
+    @Override
+    public List<Long> getBucketCounts() {
+        return bucketCounts;
+    }
+
+    @Override
+    public long getTotalCount() {
+        long result = 0;
+        for (Long count : bucketCounts) {
+            result += count;
+        }
+        return result;
+    }
+}u}(j  (86d56d2d79c660d5d01c2802f73e94787343c22ejt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ExponentialHistogramPointDataImpl.javajv  addedjn  KUjo  K jx  KUjy  X  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj{  X   https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FExponentialHistogramPointDataImpl.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X	  @@ -0,0 +1,85 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+
+import java.util.List;
+
+public class ExponentialHistogramPointDataImpl extends PointDataImpl implements ExponentialHistogramPointData {
+
+    private final int scale;
+    private final double sum;
+    private final long count;
+    private final long zeroCount;
+    private final double min;
+    private final double max;
+
+    private final ExponentialHistogramBuckets positiveBuckets;
+    private final ExponentialHistogramBuckets negativeBuckets;
+
+    ExponentialHistogramPointDataImpl(int scale, double sum, long count, long zeroCount, double min, double max,
+                                      ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets,
+                                      long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        super(startEpochNanos, epochNanos, attributes, exemplars);
+        this.scale = scale;
+        this.sum = sum;
+        this.count = count;
+        this.zeroCount = zeroCount;
+        this.min = min;
+        this.max = max;
+        this.positiveBuckets = positiveBuckets;
+        this.negativeBuckets = negativeBuckets;
+    }
+
+    @Override
+    public int getScale() {
+        return scale;
+    }
+
+    @Override
+    public double getSum() {
+        return sum;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getZeroCount() {
+        return zeroCount;
+    }
+
+    @Override
+    public boolean hasMin() {
+        return !Double.isNaN(min);
+    }
+
+    @Override
+    public double getMin() {
+        return min;
+    }
+
+    @Override
+    public boolean hasMax() {
+        return !Double.isNaN(max);
+    }
+
+    @Override
+    public double getMax() {
+        return max;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getPositiveBuckets() {
+        return positiveBuckets;
+    }
+
+    @Override
+    public ExponentialHistogramBuckets getNegativeBuckets() {
+        return negativeBuckets;
+    }
+}u}(j  (9605ffcb1bf67a030eb87af3d7d6524deed62729jt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/MetricDataFactory.javajv  modifiedjn  K
jo  K jx  K
jy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FMetricDataFactory.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -1,6 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
 import io.prometheus.metrics.model.snapshots.GaugeSnapshot;
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.common.InstrumentationScopeInfo;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricData;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.resources.Resource;
@@ -25,4 +26,16 @@ public MetricData create(CounterSnapshot snapshot) {
     public MetricData create(GaugeSnapshot snapshot) {
         return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusGauge(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
     }
+
+    public MetricData create(HistogramSnapshot snapshot) {
+        if (!snapshot.getData().isEmpty()) {
+            HistogramSnapshot.HistogramDataPointSnapshot firstDataPoint = snapshot.getData().get(0);
+            if (firstDataPoint.hasNativeHistogramData()) {
+                return new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusNativeHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            } else if (firstDataPoint.hasClassicHistogramData()) {
+                return null;//new PrometheusMetricData<>(snapshot.getMetadata(), new PrometheusClassicHistogram(snapshot, currentTimeMillis), instrumentationScopeInfo, resource);
+            }
+        }
+        return null;
+    }
 }u}(j  (a0b4aed8397b8eac69d32d28215f110df28b893bjt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PointDataImpl.javajv  addedjn  K+jo  K jx  K+jy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.javaj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPointDataImpl.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  Xd  @@ -0,0 +1,43 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.DoubleExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExemplarData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.PointData;
+
+import java.util.List;
+
+abstract class PointDataImpl implements PointData {
+
+    private final long startEpochNanos;
+    private final long epochNanos;
+    private final Attributes attributes;
+    private final List<DoubleExemplarData> exemplars;
+
+    PointDataImpl(long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) {
+        this.startEpochNanos = startEpochNanos;
+        this.epochNanos = epochNanos;
+        this.attributes = attributes;
+        this.exemplars = exemplars;
+    }
+
+    @Override
+    public long getStartEpochNanos() {
+        return startEpochNanos;
+    }
+
+    @Override
+    public long getEpochNanos() {
+        return epochNanos;
+    }
+
+    @Override
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    @Override
+    public List<DoubleExemplarData> getExemplars() {
+        return exemplars;
+    }
+}u}(j  (883b06e08475fcbe0e3464b61fa883d3db0a28d1jt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusCounter.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusCounter.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -38,12 +38,10 @@ public Collection<DoublePointData> getPoints() {
     }
 
     private DoublePointData toOtelDataPoint(CounterSnapshot.CounterDataPointSnapshot dataPoint, long currentTimeMillis) {
-        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
-        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
         return new DoublePointDataImpl(
                 dataPoint.getValue(),
-                startEpochNanos,
-                epochNanos,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
                 labelsToAttributes(dataPoint.getLabels()),
                 convertExemplar(dataPoint.getExemplar())
         );u}(j  (353a1623c7ae3932afa295452af773fa7d9aecdbjt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusData.javajv  modifiedjn  Kjo  K jx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.javaj}  X   https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusData.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -1,5 +1,7 @@
 package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
 
+import io.prometheus.metrics.model.snapshots.DataPointSnapshot;
+import io.prometheus.metrics.model.snapshots.Exemplars;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.Attributes;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.api.common.AttributesBuilder;
 import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.Data;
@@ -11,6 +13,7 @@
 
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 abstract class PrometheusData<T extends PointData> implements Data<T> {
 
@@ -37,6 +40,19 @@ protected Attributes labelsToAttributes(Labels labels) {
     }
 
     protected List<DoubleExemplarData> convertExemplar(Exemplar exemplar) {
+        return convertExemplars(Exemplars.of(exemplar));
+    }
+
+    protected List<DoubleExemplarData> convertExemplars(Exemplars exemplars) {
+        // TODO: Exemplars not implemented yet.
         return Collections.emptyList();
     }
+
+    protected long getStartEpochNanos(DataPointSnapshot dataPoint) {
+        return dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
+    }
+
+    protected long getEpochNanos(DataPointSnapshot dataPoint, long currentTimeMillis) {
+        return dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
+    }
 }u}(j  (16c307059c9e17bbe682b5f0b35b72b6a2b69d77jt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusGauge.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusGauge.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -27,12 +27,10 @@ public Collection<DoublePointData> getPoints() {
     }
 
     private DoublePointData toOtelDataPoint(GaugeSnapshot.GaugeDataPointSnapshot dataPoint, long currentTimeMillis) {
-        long startEpochNanos = dataPoint.hasCreatedTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getCreatedTimestampMillis()) : 0L;
-        long epochNanos = dataPoint.hasScrapeTimestamp() ? TimeUnit.MILLISECONDS.toNanos(dataPoint.getScrapeTimestampMillis()) : TimeUnit.MILLISECONDS.toNanos(currentTimeMillis);
         return new DoublePointDataImpl(
                 dataPoint.getValue(),
-                startEpochNanos,
-                epochNanos,
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
                 labelsToAttributes(dataPoint.getLabels()),
                 convertExemplar(dataPoint.getExemplar())
         );u}(j  (c9d11623e817271e498174f1bee39cb8b344be6ejt  prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/PrometheusNativeHistogram.javajv  addedjn  KWjo  K jx  KWjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.javaj}  X  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exporter-opentelemetry%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexporter%2Fopentelemetry%2Fotelmodel%2FPrometheusNativeHistogram.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -0,0 +1,87 @@
+package io.prometheus.metrics.exporter.opentelemetry.otelmodel;
+
+import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
+import io.prometheus.metrics.model.snapshots.NativeHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.AggregationTemporality;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramBuckets;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.ExponentialHistogramPointData;
+import io.prometheus.metrics.shaded.io_opentelemetry_1_28_0.sdk.metrics.data.MetricDataType;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+class PrometheusNativeHistogram extends PrometheusData<ExponentialHistogramPointData> implements ExponentialHistogramData {
+
+    private final List<ExponentialHistogramPointData> points;
+
+    public PrometheusNativeHistogram(HistogramSnapshot snapshot, long currentTimeMillis) {
+        super(MetricDataType.EXPONENTIAL_HISTOGRAM);
+        this.points = snapshot.getData().stream()
+                .map(dataPoint -> toOtelDataPoint(dataPoint, currentTimeMillis))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality() {
+        return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public Collection<ExponentialHistogramPointData> getPoints() {
+        return points;
+    }
+
+    private ExponentialHistogramPointData toOtelDataPoint(HistogramSnapshot.HistogramDataPointSnapshot dataPoint, long currentTimeMillis) {
+        if (!dataPoint.hasNativeHistogramData()) {
+            return null;
+        }
+        return new ExponentialHistogramPointDataImpl(
+                dataPoint.getNativeSchema(),
+                dataPoint.hasSum() ? dataPoint.getSum() : Double.NaN,
+                dataPoint.hasCount() ? dataPoint.getCount() : calculateCount(dataPoint),
+                dataPoint.getNativeZeroCount(),
+                Double.NaN,
+                Double.NaN,
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForPositiveValues()),
+                convertBuckets(dataPoint.getNativeSchema(), dataPoint.getNativeBucketsForNegativeValues()),
+                getStartEpochNanos(dataPoint),
+                getEpochNanos(dataPoint, currentTimeMillis),
+                labelsToAttributes(dataPoint.getLabels()),
+                convertExemplars(dataPoint.getExemplars())
+        );
+    }
+
+    private ExponentialHistogramBuckets convertBuckets(int scale, NativeHistogramBuckets buckets) {
+        if (buckets.size() == 0) {
+            return new ExponentialHistogramBucketsImpl(scale, 0);
+        }
+        int offset = buckets.getBucketIndex(0);
+        ExponentialHistogramBucketsImpl result = new ExponentialHistogramBucketsImpl(scale, offset-1);
+        int currentBucket = 0;
+        for (int i=offset; i<=buckets.getBucketIndex(buckets.size()-1); i++) {
+            if (buckets.getBucketIndex(currentBucket) == i) {
+                result.addCount(buckets.getCount(currentBucket));
+                currentBucket++;
+            } else {
+                result.addCount(0);
+            }
+        }
+        return result;
+    }
+
+    private long calculateCount(HistogramSnapshot.HistogramDataPointSnapshot dataPoint) {
+        long result = 0L;
+        for (int i=0; i<dataPoint.getNativeBucketsForPositiveValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForPositiveValues().getCount(i);
+        }
+        for (int i=0; i<dataPoint.getNativeBucketsForNegativeValues().size(); i++) {
+            result += dataPoint.getNativeBucketsForNegativeValues().getCount(i);
+        }
+        result += dataPoint.getNativeZeroCount();
+        return result;
+    }
+}u}(j  (6cad6a6a39a5d85d46c0c9ae08240896f2754bbejt  hprometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBuckets.javajv  modifiedjn  Kjo  Kjx  Kjy  https://github.com/prometheus/client_java/blob/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj{  https://github.com/prometheus/client_java/raw/cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00e/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.javaj}  https://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-model%2Fsrc%2Fmain%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fmodel%2Fsnapshots%2FNativeHistogramBuckets.java?ref=cd8eaffbd75b70385f8df5d5082d5ec6ec5fe00ej  X  @@ -21,7 +21,7 @@
 public class NativeHistogramBuckets implements Iterable<NativeHistogramBucket> {
 
     public static final NativeHistogramBuckets EMPTY = new NativeHistogramBuckets(new int[]{}, new long[]{});
-    private final int[] bucketIndexes;
+    private final int[] bucketIndexes; // sorted
     private final long[] counts;
 
     private NativeHistogramBuckets(int[] bucketIndexes, long[] counts) {ueu(f3657401b0732204c613be640f2d9caed84b4cfe}(sha(f3657401b0732204c613be640f2d9caed84b4cfenode_idEC_kwDOAHoJt9oAKGYzNjU3NDAxYjA3MzIyMDRjNjEzYmU2NDBmMmQ5Y2FlZDg0YjRjZmUcommit}(author}(nameFabian Stäberemailfabian@fstab.dedate2023-06-12T20:33:20Zu	committer}(j  Fabian Stäberj  fabian@fstab.dej  2023-06-12T20:33:20Zumessage#Move core expositionformats packagetree}(j  (c6443202949ba51c92060eca9a2a87e757705854urlfhttps://api.github.com/repos/prometheus/client_java/git/trees/c6443202949ba51c92060eca9a2a87e757705854uj  hhttps://api.github.com/repos/prometheus/client_java/git/commits/f3657401b0732204c613be640f2d9caed84b4cfe
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  dhttps://api.github.com/repos/prometheus/client_java/commits/f3657401b0732204c613be640f2d9caed84b4cfehtml_urlYhttps://github.com/prometheus/client_java/commit/f3657401b0732204c613be640f2d9caed84b4cfecomments_urlmhttps://api.github.com/repos/prometheus/client_java/commits/f3657401b0732204c613be640f2d9caed84b4cfe/commentsj  }(loginfstabidJ' j  MDQ6VXNlcjMzMDUzNQ==
avatar_url2https://avatars.githubusercontent.com/u/330535?v=4gravatar_idh3j  "https://api.github.com/users/fstabj  https://github.com/fstab
followers_url,https://api.github.com/users/fstab/followers
following_url9https://api.github.com/users/fstab/following{/other_user}	gists_url2https://api.github.com/users/fstab/gists{/gist_id}starred_url9https://api.github.com/users/fstab/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/fstab/subscriptionsorganizations_url'https://api.github.com/users/fstab/orgs	repos_url(https://api.github.com/users/fstab/repos
events_url3https://api.github.com/users/fstab/events{/privacy}received_events_url2https://api.github.com/users/fstab/received_eventstypeUser
site_adminuj  }(j  fstabj  J' j  MDQ6VXNlcjMzMDUzNQ==j   2https://avatars.githubusercontent.com/u/330535?v=4j"  h3j  "https://api.github.com/users/fstabj  https://github.com/fstabj%  ,https://api.github.com/users/fstab/followersj'  9https://api.github.com/users/fstab/following{/other_user}j)  2https://api.github.com/users/fstab/gists{/gist_id}j+  9https://api.github.com/users/fstab/starred{/owner}{/repo}j-  0https://api.github.com/users/fstab/subscriptionsj/  'https://api.github.com/users/fstab/orgsj1  (https://api.github.com/users/fstab/reposj3  3https://api.github.com/users/fstab/events{/privacy}j5  2https://api.github.com/users/fstab/received_eventsj7  Userj9  uparents]}(j  (2879e247ed5c7078288a74883041a7f7bbc5284fj  dhttps://api.github.com/repos/prometheus/client_java/commits/2879e247ed5c7078288a74883041a7f7bbc5284fj  Yhttps://github.com/prometheus/client_java/commit/2879e247ed5c7078288a74883041a7f7bbc5284fuastats}(totalK	additionsK	deletionsKufiles]}(j  (1bcca07aae7db2288ffdb033fd151e51f8e74d48filenamevprometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.javastatusrenamedjS  KjT  KchangesKblob_urlhttps://github.com/prometheus/client_java/blob/f3657401b0732204c613be640f2d9caed84b4cfe/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javaraw_urlhttps://github.com/prometheus/client_java/raw/f3657401b0732204c613be640f2d9caed84b4cfe/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.javacontents_urlhttps://api.github.com/repos/prometheus/client_java/contents/prometheus-metrics-exposition-formats%2Fsrc%2Ftest%2Fjava%2Fio%2Fprometheus%2Fmetrics%2Fexpositionformats%2FExpositionFormatsTest.java?ref=f3657401b0732204c613be640f2d9caed84b4cfe      patch@@ -1,4 +1,4 @@
-package io.prometheus.expositionformat.text;
+package io.prometheus.metrics.expositionformats;
 
 import io.prometheus.com_google_protobuf_3_21_7.TextFormat;
 import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;previous_filenamerprometheus-metrics-exposition-formats/src/test/java/io/prometheus/expositionformat/text/ExpositionFormatsTest.javauauu.